From b3a01ccfce6739c1ff4893a2974b1b61d799f87d Mon Sep 17 00:00:00 2001 From: krypton36 Date: Thu, 24 Mar 2022 17:36:32 -0700 Subject: [PATCH] Resolve wait on subscriptions for attributes. (#16644) * Allow waiting for subscription notifications. * Generated code. --- .../chip-tool-darwin/templates/commands.zapt | 4 +- .../zap-generated/cluster/Commands.h | 3188 ++++++++++++----- 2 files changed, 2367 insertions(+), 825 deletions(-) diff --git a/examples/chip-tool-darwin/templates/commands.zapt b/examples/chip-tool-darwin/templates/commands.zapt index 66b97aebb9bdeb..61ad1914a2abbd 100644 --- a/examples/chip-tool-darwin/templates/commands.zapt +++ b/examples/chip-tool-darwin/templates/commands.zapt @@ -235,7 +235,9 @@ public: params:params subscriptionEstablished: NULL reportHandler:^({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error) { NSLog(@"{{asUpperCamelCase parent.name}}.{{asUpperCamelCase name}} response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait){ + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h index 610f0d56a7f960..c3a5302311b1c8 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h @@ -230,7 +230,9 @@ class SubscribeAttributeAccessControlAcl : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.Acl response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -307,7 +309,9 @@ class SubscribeAttributeAccessControlExtension : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.Extension response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -383,7 +387,9 @@ class SubscribeAttributeAccessControlGeneratedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -459,7 +465,9 @@ class SubscribeAttributeAccessControlAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -534,7 +542,9 @@ class SubscribeAttributeAccessControlAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -609,7 +619,9 @@ class SubscribeAttributeAccessControlClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -809,7 +821,9 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public ModelCommand { reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -885,7 +899,9 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -960,7 +976,9 @@ class SubscribeAttributeAccountLoginAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -1035,7 +1053,9 @@ class SubscribeAttributeAccountLoginClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -1251,7 +1271,9 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public ModelCom subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -1331,7 +1353,9 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Mode reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -1411,7 +1435,9 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -1491,7 +1517,9 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -1571,7 +1599,9 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public M reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -1651,7 +1681,9 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public ModelCo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -1731,7 +1763,9 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -1833,7 +1867,9 @@ class SubscribeAttributeApplicationBasicVendorName : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorName response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -1912,7 +1948,9 @@ class SubscribeAttributeApplicationBasicVendorID : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorID response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -1991,7 +2029,9 @@ class SubscribeAttributeApplicationBasicApplicationName : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -2070,7 +2110,9 @@ class SubscribeAttributeApplicationBasicProductID : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ProductID response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -2152,7 +2194,9 @@ class SubscribeAttributeApplicationBasicApplication : public ModelCommand { reportHandler:^(CHIPApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Application response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -2231,7 +2275,9 @@ class SubscribeAttributeApplicationBasicStatus : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Status response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -2311,7 +2357,9 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public ModelCommand reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -2391,7 +2439,9 @@ class SubscribeAttributeApplicationBasicAllowedVendorList : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -2471,7 +2521,9 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public ModelComma reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -2551,7 +2603,9 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public ModelComman reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -2630,7 +2684,9 @@ class SubscribeAttributeApplicationBasicAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -2709,7 +2765,9 @@ class SubscribeAttributeApplicationBasicClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -2919,7 +2977,9 @@ class SubscribeAttributeApplicationLauncherCatalogList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -3034,7 +3094,9 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public ModelCommand { reportHandler:^(CHIPApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -3114,7 +3176,9 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public ModelCo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -3194,7 +3258,9 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public ModelCom reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -3273,7 +3339,9 @@ class SubscribeAttributeApplicationLauncherAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -3353,7 +3421,9 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -3518,7 +3588,9 @@ class SubscribeAttributeAudioOutputOutputList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.OutputList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -3593,7 +3665,9 @@ class SubscribeAttributeAudioOutputCurrentOutput : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -3669,7 +3743,9 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -3745,7 +3821,9 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -3820,7 +3898,9 @@ class SubscribeAttributeAudioOutputAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -3895,7 +3975,9 @@ class SubscribeAttributeAudioOutputClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4061,7 +4143,9 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4137,7 +4221,9 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4213,7 +4299,9 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4288,7 +4376,9 @@ class SubscribeAttributeBarrierControlBarrierPosition : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4364,7 +4454,9 @@ class SubscribeAttributeBarrierControlGeneratedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4440,7 +4532,9 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4515,7 +4609,9 @@ class SubscribeAttributeBarrierControlAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4590,7 +4686,9 @@ class SubscribeAttributeBarrierControlClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4704,7 +4802,9 @@ class SubscribeAttributeBasicDataModelRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.DataModelRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4779,7 +4879,9 @@ class SubscribeAttributeBasicVendorName : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.VendorName response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4854,7 +4956,9 @@ class SubscribeAttributeBasicVendorID : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.VendorID response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -4929,7 +5033,9 @@ class SubscribeAttributeBasicProductName : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductName response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5004,7 +5110,9 @@ class SubscribeAttributeBasicProductID : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductID response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5115,7 +5223,9 @@ class SubscribeAttributeBasicNodeLabel : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.NodeLabel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5226,7 +5336,9 @@ class SubscribeAttributeBasicLocation : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.Location response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5301,7 +5413,9 @@ class SubscribeAttributeBasicHardwareVersion : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.HardwareVersion response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5377,7 +5491,9 @@ class SubscribeAttributeBasicHardwareVersionString : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.HardwareVersionString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5452,7 +5568,9 @@ class SubscribeAttributeBasicSoftwareVersion : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SoftwareVersion response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5528,7 +5646,9 @@ class SubscribeAttributeBasicSoftwareVersionString : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SoftwareVersionString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5603,7 +5723,9 @@ class SubscribeAttributeBasicManufacturingDate : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ManufacturingDate response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5678,7 +5800,9 @@ class SubscribeAttributeBasicPartNumber : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.PartNumber response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5753,7 +5877,9 @@ class SubscribeAttributeBasicProductURL : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductURL response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5828,7 +5954,9 @@ class SubscribeAttributeBasicProductLabel : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductLabel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -5903,7 +6031,9 @@ class SubscribeAttributeBasicSerialNumber : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SerialNumber response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6012,7 +6142,9 @@ class SubscribeAttributeBasicLocalConfigDisabled : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.LocalConfigDisabled response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6087,7 +6219,9 @@ class SubscribeAttributeBasicReachable : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.Reachable response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6162,7 +6296,9 @@ class SubscribeAttributeBasicUniqueID : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.UniqueID response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6237,7 +6373,9 @@ class SubscribeAttributeBasicGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6312,7 +6450,9 @@ class SubscribeAttributeBasicAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6387,7 +6527,9 @@ class SubscribeAttributeBasicAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6462,7 +6604,9 @@ class SubscribeAttributeBasicClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6601,7 +6745,9 @@ class SubscribeAttributeBinaryInputBasicOutOfService : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.OutOfService response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6716,7 +6862,9 @@ class SubscribeAttributeBinaryInputBasicPresentValue : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.PresentValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6795,7 +6943,9 @@ class SubscribeAttributeBinaryInputBasicStatusFlags : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.StatusFlags response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6875,7 +7025,9 @@ class SubscribeAttributeBinaryInputBasicGeneratedCommandList : public ModelComma reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -6955,7 +7107,9 @@ class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public ModelComman reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7034,7 +7188,9 @@ class SubscribeAttributeBinaryInputBasicAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7113,7 +7269,9 @@ class SubscribeAttributeBinaryInputBasicClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7206,7 +7364,9 @@ class SubscribeAttributeBindingBinding : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.Binding response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7282,7 +7442,9 @@ class SubscribeAttributeBindingGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7357,7 +7519,9 @@ class SubscribeAttributeBindingAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7432,7 +7596,9 @@ class SubscribeAttributeBindingAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7507,7 +7673,9 @@ class SubscribeAttributeBindingClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7599,7 +7767,9 @@ class SubscribeAttributeBooleanStateStateValue : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.StateValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7675,7 +7845,9 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public ModelCommand { reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7751,7 +7923,9 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7826,7 +8000,9 @@ class SubscribeAttributeBooleanStateAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -7901,7 +8077,9 @@ class SubscribeAttributeBooleanStateClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -8467,7 +8645,9 @@ class SubscribeAttributeBridgedActionsActionList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.ActionList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -8542,7 +8722,9 @@ class SubscribeAttributeBridgedActionsEndpointList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.EndpointList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -8617,7 +8799,9 @@ class SubscribeAttributeBridgedActionsSetupUrl : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.SetupUrl response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -8693,7 +8877,9 @@ class SubscribeAttributeBridgedActionsGeneratedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -8769,7 +8955,9 @@ class SubscribeAttributeBridgedActionsAcceptedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -8844,7 +9032,9 @@ class SubscribeAttributeBridgedActionsAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -8919,7 +9109,9 @@ class SubscribeAttributeBridgedActionsClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedActions.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9032,7 +9224,9 @@ class SubscribeAttributeBridgedDeviceBasicVendorName : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.VendorName response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9111,7 +9305,9 @@ class SubscribeAttributeBridgedDeviceBasicVendorID : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.VendorID response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9190,7 +9386,9 @@ class SubscribeAttributeBridgedDeviceBasicProductName : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductName response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9307,7 +9505,9 @@ class SubscribeAttributeBridgedDeviceBasicNodeLabel : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.NodeLabel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9387,7 +9587,9 @@ class SubscribeAttributeBridgedDeviceBasicHardwareVersion : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.HardwareVersion response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9467,7 +9669,9 @@ class SubscribeAttributeBridgedDeviceBasicHardwareVersionString : public ModelCo reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.HardwareVersionString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9547,7 +9751,9 @@ class SubscribeAttributeBridgedDeviceBasicSoftwareVersion : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SoftwareVersion response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9627,7 +9833,9 @@ class SubscribeAttributeBridgedDeviceBasicSoftwareVersionString : public ModelCo reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SoftwareVersionString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9707,7 +9915,9 @@ class SubscribeAttributeBridgedDeviceBasicManufacturingDate : public ModelComman reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ManufacturingDate response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9786,7 +9996,9 @@ class SubscribeAttributeBridgedDeviceBasicPartNumber : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.PartNumber response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9865,7 +10077,9 @@ class SubscribeAttributeBridgedDeviceBasicProductURL : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductURL response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -9944,7 +10158,9 @@ class SubscribeAttributeBridgedDeviceBasicProductLabel : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductLabel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -10023,7 +10239,9 @@ class SubscribeAttributeBridgedDeviceBasicSerialNumber : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SerialNumber response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -10102,7 +10320,9 @@ class SubscribeAttributeBridgedDeviceBasicReachable : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.Reachable response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -10181,7 +10401,9 @@ class SubscribeAttributeBridgedDeviceBasicUniqueID : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.UniqueID response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -10261,7 +10483,9 @@ class SubscribeAttributeBridgedDeviceBasicGeneratedCommandList : public ModelCom reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -10341,7 +10565,9 @@ class SubscribeAttributeBridgedDeviceBasicAcceptedCommandList : public ModelComm reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -10420,7 +10646,9 @@ class SubscribeAttributeBridgedDeviceBasicAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -10500,7 +10728,9 @@ class SubscribeAttributeBridgedDeviceBasicClusterRevision : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -10703,7 +10933,9 @@ class SubscribeAttributeChannelChannelList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ChannelList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -10780,7 +11012,9 @@ class SubscribeAttributeChannelLineup : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(CHIPChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.Lineup response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -10857,7 +11091,9 @@ class SubscribeAttributeChannelCurrentChannel : public ModelCommand { reportHandler:^( CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.CurrentChannel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -10933,7 +11169,9 @@ class SubscribeAttributeChannelGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -11008,7 +11246,9 @@ class SubscribeAttributeChannelAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -11083,7 +11323,9 @@ class SubscribeAttributeChannelAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -11158,7 +11400,9 @@ class SubscribeAttributeChannelClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -12181,7 +12425,9 @@ class SubscribeAttributeColorControlCurrentHue : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentHue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -12256,7 +12502,9 @@ class SubscribeAttributeColorControlCurrentSaturation : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -12331,7 +12579,9 @@ class SubscribeAttributeColorControlRemainingTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.RemainingTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -12406,7 +12656,9 @@ class SubscribeAttributeColorControlCurrentX : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentX response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -12481,7 +12733,9 @@ class SubscribeAttributeColorControlCurrentY : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentY response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -12556,7 +12810,9 @@ class SubscribeAttributeColorControlDriftCompensation : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.DriftCompensation response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -12631,7 +12887,9 @@ class SubscribeAttributeColorControlCompensationText : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CompensationText response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -12706,7 +12964,9 @@ class SubscribeAttributeColorControlColorTemperature : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTemperature response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -12781,7 +13041,9 @@ class SubscribeAttributeColorControlColorMode : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -12892,7 +13154,9 @@ class SubscribeAttributeColorControlColorControlOptions : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorControlOptions response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -12967,7 +13231,9 @@ class SubscribeAttributeColorControlNumberOfPrimaries : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13042,7 +13308,9 @@ class SubscribeAttributeColorControlPrimary1X : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1X response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13117,7 +13385,9 @@ class SubscribeAttributeColorControlPrimary1Y : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Y response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13192,7 +13462,9 @@ class SubscribeAttributeColorControlPrimary1Intensity : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13267,7 +13539,9 @@ class SubscribeAttributeColorControlPrimary2X : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2X response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13342,7 +13616,9 @@ class SubscribeAttributeColorControlPrimary2Y : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Y response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13417,7 +13693,9 @@ class SubscribeAttributeColorControlPrimary2Intensity : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13492,7 +13770,9 @@ class SubscribeAttributeColorControlPrimary3X : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3X response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13567,7 +13847,9 @@ class SubscribeAttributeColorControlPrimary3Y : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Y response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13642,7 +13924,9 @@ class SubscribeAttributeColorControlPrimary3Intensity : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13717,7 +14001,9 @@ class SubscribeAttributeColorControlPrimary4X : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4X response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13792,7 +14078,9 @@ class SubscribeAttributeColorControlPrimary4Y : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Y response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13867,7 +14155,9 @@ class SubscribeAttributeColorControlPrimary4Intensity : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -13942,7 +14232,9 @@ class SubscribeAttributeColorControlPrimary5X : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5X response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -14017,7 +14309,9 @@ class SubscribeAttributeColorControlPrimary5Y : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Y response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -14092,7 +14386,9 @@ class SubscribeAttributeColorControlPrimary5Intensity : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -14167,7 +14463,9 @@ class SubscribeAttributeColorControlPrimary6X : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6X response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -14242,7 +14540,9 @@ class SubscribeAttributeColorControlPrimary6Y : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Y response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -14317,7 +14617,9 @@ class SubscribeAttributeColorControlPrimary6Intensity : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -14426,7 +14728,9 @@ class SubscribeAttributeColorControlWhitePointX : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointX response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -14535,7 +14839,9 @@ class SubscribeAttributeColorControlWhitePointY : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointY response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -14644,7 +14950,9 @@ class SubscribeAttributeColorControlColorPointRX : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRX response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -14753,7 +15061,9 @@ class SubscribeAttributeColorControlColorPointRY : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRY response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -14864,7 +15174,9 @@ class SubscribeAttributeColorControlColorPointRIntensity : public ModelCommand { reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -14973,7 +15285,9 @@ class SubscribeAttributeColorControlColorPointGX : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGX response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -15082,7 +15396,9 @@ class SubscribeAttributeColorControlColorPointGY : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGY response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -15193,7 +15509,9 @@ class SubscribeAttributeColorControlColorPointGIntensity : public ModelCommand { reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -15302,7 +15620,9 @@ class SubscribeAttributeColorControlColorPointBX : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBX response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -15411,7 +15731,9 @@ class SubscribeAttributeColorControlColorPointBY : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBY response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -15522,7 +15844,9 @@ class SubscribeAttributeColorControlColorPointBIntensity : public ModelCommand { reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -15598,7 +15922,9 @@ class SubscribeAttributeColorControlEnhancedCurrentHue : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -15673,7 +15999,9 @@ class SubscribeAttributeColorControlEnhancedColorMode : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -15748,7 +16076,9 @@ class SubscribeAttributeColorControlColorLoopActive : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -15824,7 +16154,9 @@ class SubscribeAttributeColorControlColorLoopDirection : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -15899,7 +16231,9 @@ class SubscribeAttributeColorControlColorLoopTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -15977,7 +16311,9 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public ModelComm reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -16055,7 +16391,9 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -16130,7 +16468,9 @@ class SubscribeAttributeColorControlColorCapabilities : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -16206,7 +16546,9 @@ class SubscribeAttributeColorControlColorTempPhysicalMin : public ModelCommand { reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMin response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -16282,7 +16624,9 @@ class SubscribeAttributeColorControlColorTempPhysicalMax : public ModelCommand { reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMax response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -16362,7 +16706,9 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Mod NSLog( @"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -16477,7 +16823,9 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Model NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -16553,7 +16901,9 @@ class SubscribeAttributeColorControlGeneratedCommandList : public ModelCommand { reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -16629,7 +16979,9 @@ class SubscribeAttributeColorControlAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -16704,7 +17056,9 @@ class SubscribeAttributeColorControlAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -16779,7 +17133,9 @@ class SubscribeAttributeColorControlClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -16957,7 +17313,9 @@ class SubscribeAttributeContentLauncherAcceptHeader : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17071,7 +17429,9 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Mode reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17147,7 +17507,9 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public ModelComman reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17223,7 +17585,9 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17298,7 +17662,9 @@ class SubscribeAttributeContentLauncherAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17373,7 +17739,9 @@ class SubscribeAttributeContentLauncherClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17467,7 +17835,9 @@ class SubscribeAttributeDescriptorDeviceList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.DeviceList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17542,7 +17912,9 @@ class SubscribeAttributeDescriptorServerList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ServerList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17617,7 +17989,9 @@ class SubscribeAttributeDescriptorClientList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClientList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17692,7 +18066,9 @@ class SubscribeAttributeDescriptorPartsList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.PartsList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17768,7 +18144,9 @@ class SubscribeAttributeDescriptorGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17844,7 +18222,9 @@ class SubscribeAttributeDescriptorAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17919,7 +18299,9 @@ class SubscribeAttributeDescriptorAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -17994,7 +18376,9 @@ class SubscribeAttributeDescriptorClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -18129,7 +18513,9 @@ class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -18205,7 +18591,9 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -18280,7 +18668,9 @@ class SubscribeAttributeDiagnosticLogsAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19039,7 +19429,9 @@ class SubscribeAttributeDoorLockLockState : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockState response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19114,7 +19506,9 @@ class SubscribeAttributeDoorLockLockType : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockType response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19189,7 +19583,9 @@ class SubscribeAttributeDoorLockActuatorEnabled : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19264,7 +19660,9 @@ class SubscribeAttributeDoorLockDoorState : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorState response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19342,7 +19740,9 @@ class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public ModelComman reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19420,7 +19820,9 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19498,7 +19900,9 @@ class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19579,8 +19983,10 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi @"NumberOfWeekDaySchedulesSupportedPerUser " @"response %@", [value description]); - SetCommandExitStatus( - [CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus( + [CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19661,8 +20067,10 @@ class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : publi @"NumberOfYearDaySchedulesSupportedPerUser " @"response %@", [value description]); - SetCommandExitStatus( - [CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus( + [CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19737,7 +20145,9 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19812,7 +20222,9 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19887,7 +20299,9 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -19962,7 +20376,9 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -20073,7 +20489,9 @@ class SubscribeAttributeDoorLockLanguage : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.Language response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -20182,7 +20600,9 @@ class SubscribeAttributeDoorLockAutoRelockTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -20291,7 +20711,9 @@ class SubscribeAttributeDoorLockSoundVolume : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SoundVolume response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -20400,7 +20822,9 @@ class SubscribeAttributeDoorLockOperatingMode : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OperatingMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -20477,7 +20901,9 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public ModelCommand { reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -20588,7 +21014,9 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -20700,7 +21128,9 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public ModelCommand { reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -20809,7 +21239,9 @@ class SubscribeAttributeDoorLockWrongCodeEntryLimit : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -20885,7 +21317,9 @@ class SubscribeAttributeDoorLockGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -20960,7 +21394,9 @@ class SubscribeAttributeDoorLockAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -21035,7 +21471,9 @@ class SubscribeAttributeDoorLockAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -21110,7 +21548,9 @@ class SubscribeAttributeDoorLockClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -21335,7 +21775,9 @@ class SubscribeAttributeElectricalMeasurementMeasurementType : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -21415,7 +21857,9 @@ class SubscribeAttributeElectricalMeasurementTotalActivePower : public ModelComm reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -21494,7 +21938,9 @@ class SubscribeAttributeElectricalMeasurementRmsVoltage : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -21574,7 +22020,9 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -21654,7 +22102,9 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -21733,7 +22183,9 @@ class SubscribeAttributeElectricalMeasurementRmsCurrent : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -21813,7 +22265,9 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -21893,7 +22347,9 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -21972,7 +22428,9 @@ class SubscribeAttributeElectricalMeasurementActivePower : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22052,7 +22510,9 @@ class SubscribeAttributeElectricalMeasurementActivePowerMin : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22132,7 +22592,9 @@ class SubscribeAttributeElectricalMeasurementActivePowerMax : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22212,7 +22674,9 @@ class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public Model reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22292,7 +22756,9 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public ModelC reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22372,7 +22838,9 @@ class SubscribeAttributeElectricalMeasurementAttributeList : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22452,7 +22920,9 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22587,7 +23057,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22666,7 +23138,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22746,7 +23220,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22826,7 +23302,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22905,7 +23383,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -22985,7 +23465,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -23065,7 +23547,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public ModelCom subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -23145,7 +23629,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -23225,7 +23711,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -23305,7 +23793,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -23385,7 +23875,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public M reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -23465,7 +23957,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public ModelCo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -23544,7 +24038,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -23624,7 +24120,9 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -23750,7 +24248,9 @@ class SubscribeAttributeFanControlFanMode : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -23859,7 +24359,9 @@ class SubscribeAttributeFanControlFanModeSequence : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanModeSequence response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -23935,7 +24437,9 @@ class SubscribeAttributeFanControlGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24011,7 +24515,9 @@ class SubscribeAttributeFanControlAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24086,7 +24592,9 @@ class SubscribeAttributeFanControlAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24161,7 +24669,9 @@ class SubscribeAttributeFanControlFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24236,7 +24746,9 @@ class SubscribeAttributeFanControlClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24327,7 +24839,9 @@ class SubscribeAttributeFixedLabelLabelList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.LabelList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24403,7 +24917,9 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24479,7 +24995,9 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24554,7 +25072,9 @@ class SubscribeAttributeFixedLabelAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24629,7 +25149,9 @@ class SubscribeAttributeFixedLabelClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24723,7 +25245,9 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24799,7 +25323,9 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24875,7 +25401,9 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -24950,7 +25478,9 @@ class SubscribeAttributeFlowMeasurementTolerance : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -25026,7 +25556,9 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public ModelComman reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -25102,7 +25634,9 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -25177,7 +25711,9 @@ class SubscribeAttributeFlowMeasurementAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -25252,7 +25788,9 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -25516,7 +26054,9 @@ class SubscribeAttributeGeneralCommissioningBreadcrumb : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -25600,7 +26140,9 @@ class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public Mode NSError * _Nullable error) { NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -25680,7 +26222,9 @@ class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public ModelComma reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -25760,7 +26304,9 @@ class SubscribeAttributeGeneralCommissioningLocationCapability : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -25840,7 +26386,9 @@ class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public ModelC reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -25920,7 +26468,9 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public ModelCo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -25999,7 +26549,9 @@ class SubscribeAttributeGeneralCommissioningAttributeList : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26079,7 +26631,9 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26186,7 +26740,9 @@ class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public ModelComman reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26265,7 +26821,9 @@ class SubscribeAttributeGeneralDiagnosticsRebootCount : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26344,7 +26902,9 @@ class SubscribeAttributeGeneralDiagnosticsUpTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26424,7 +26984,9 @@ class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26503,7 +27065,9 @@ class SubscribeAttributeGeneralDiagnosticsBootReasons : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.BootReasons response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26583,7 +27147,9 @@ class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public ModelCom reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26663,7 +27229,9 @@ class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public ModelComman reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26743,7 +27311,9 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public ModelComm reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26823,7 +27393,9 @@ class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public ModelCom reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26903,7 +27475,9 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public ModelComm reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -26982,7 +27556,9 @@ class SubscribeAttributeGeneralDiagnosticsAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -27062,7 +27638,9 @@ class SubscribeAttributeGeneralDiagnosticsClusterRevision : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -27311,7 +27889,9 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -27392,7 +27972,9 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -27472,7 +28054,9 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public ModelComma reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -27552,7 +28136,9 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -27632,7 +28218,9 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public ModelCom reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -27712,7 +28300,9 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public ModelComm reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -27791,7 +28381,9 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -27871,7 +28463,9 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -28180,7 +28774,9 @@ class SubscribeAttributeGroupsNameSupport : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.NameSupport response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -28255,7 +28851,9 @@ class SubscribeAttributeGroupsGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -28330,7 +28928,9 @@ class SubscribeAttributeGroupsAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -28405,7 +29005,9 @@ class SubscribeAttributeGroupsAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -28480,7 +29082,9 @@ class SubscribeAttributeGroupsClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -28711,7 +29315,9 @@ class SubscribeAttributeIdentifyIdentifyTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -28786,7 +29392,9 @@ class SubscribeAttributeIdentifyIdentifyType : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyType response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -28862,7 +29470,9 @@ class SubscribeAttributeIdentifyGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -28937,7 +29547,9 @@ class SubscribeAttributeIdentifyAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29012,7 +29624,9 @@ class SubscribeAttributeIdentifyAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29087,7 +29701,9 @@ class SubscribeAttributeIdentifyClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29187,7 +29803,9 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29267,7 +29885,9 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29347,7 +29967,9 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29426,7 +30048,9 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29506,7 +30130,9 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public ModelComm reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29586,7 +30212,9 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Mode reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29666,7 +30294,9 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Model reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29746,7 +30376,9 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29826,7 +30458,9 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public ModelComm reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -29953,7 +30587,9 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -30029,7 +30665,9 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -30104,7 +30742,9 @@ class SubscribeAttributeKeypadInputAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -30179,7 +30819,9 @@ class SubscribeAttributeKeypadInputClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -30603,7 +31245,9 @@ class SubscribeAttributeLevelControlCurrentLevel : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentLevel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -30678,7 +31322,9 @@ class SubscribeAttributeLevelControlRemainingTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.RemainingTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -30753,7 +31399,9 @@ class SubscribeAttributeLevelControlMinLevel : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinLevel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -30828,7 +31476,9 @@ class SubscribeAttributeLevelControlMaxLevel : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxLevel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -30903,7 +31553,9 @@ class SubscribeAttributeLevelControlCurrentFrequency : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentFrequency response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -30978,7 +31630,9 @@ class SubscribeAttributeLevelControlMinFrequency : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinFrequency response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -31053,7 +31707,9 @@ class SubscribeAttributeLevelControlMaxFrequency : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxFrequency response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -31162,7 +31818,9 @@ class SubscribeAttributeLevelControlOptions : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.Options response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -31273,7 +31931,9 @@ class SubscribeAttributeLevelControlOnOffTransitionTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnOffTransitionTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -31382,7 +32042,9 @@ class SubscribeAttributeLevelControlOnLevel : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnLevel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -31491,7 +32153,9 @@ class SubscribeAttributeLevelControlOnTransitionTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnTransitionTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -31600,7 +32264,9 @@ class SubscribeAttributeLevelControlOffTransitionTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OffTransitionTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -31709,7 +32375,9 @@ class SubscribeAttributeLevelControlDefaultMoveRate : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.DefaultMoveRate response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -31820,7 +32488,9 @@ class SubscribeAttributeLevelControlStartUpCurrentLevel : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.StartUpCurrentLevel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -31896,7 +32566,9 @@ class SubscribeAttributeLevelControlGeneratedCommandList : public ModelCommand { reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -31972,7 +32644,9 @@ class SubscribeAttributeLevelControlAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32047,7 +32721,9 @@ class SubscribeAttributeLevelControlAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32122,7 +32798,9 @@ class SubscribeAttributeLevelControlFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32197,7 +32875,9 @@ class SubscribeAttributeLevelControlClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32333,7 +33013,9 @@ class SubscribeAttributeLocalizationConfigurationActiveLocale : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32413,7 +33095,9 @@ class SubscribeAttributeLocalizationConfigurationSupportedLocales : public Model reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32493,7 +33177,9 @@ class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public M reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32573,7 +33259,9 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Mo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32653,7 +33341,9 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32774,7 +33464,9 @@ class SubscribeAttributeLowPowerGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32849,7 +33541,9 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32924,7 +33618,9 @@ class SubscribeAttributeLowPowerAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -32999,7 +33695,9 @@ class SubscribeAttributeLowPowerClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -33224,7 +33922,9 @@ class SubscribeAttributeMediaInputInputList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.InputList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -33299,7 +33999,9 @@ class SubscribeAttributeMediaInputCurrentInput : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.CurrentInput response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -33375,7 +34077,9 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -33451,7 +34155,9 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -33526,7 +34232,9 @@ class SubscribeAttributeMediaInputAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -33601,7 +34309,9 @@ class SubscribeAttributeMediaInputClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34064,7 +34774,9 @@ class SubscribeAttributeMediaPlaybackCurrentState : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.CurrentState response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34139,7 +34851,9 @@ class SubscribeAttributeMediaPlaybackStartTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.StartTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34214,7 +34928,9 @@ class SubscribeAttributeMediaPlaybackDuration : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.Duration response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34291,7 +35007,9 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public ModelCommand { reportHandler:^(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34366,7 +35084,9 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34441,7 +35161,9 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34516,7 +35238,9 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34592,7 +35316,9 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34668,7 +35394,9 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34743,7 +35471,9 @@ class SubscribeAttributeMediaPlaybackAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34818,7 +35548,9 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -34949,7 +35681,9 @@ class SubscribeAttributeModeSelectDescription : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.Description response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -35024,7 +35758,9 @@ class SubscribeAttributeModeSelectStandardNamespace : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -35099,7 +35835,9 @@ class SubscribeAttributeModeSelectSupportedModes : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.SupportedModes response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -35174,7 +35912,9 @@ class SubscribeAttributeModeSelectCurrentMode : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.CurrentMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -35283,7 +36023,9 @@ class SubscribeAttributeModeSelectStartUpMode : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StartUpMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -35392,7 +36134,9 @@ class SubscribeAttributeModeSelectOnMode : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.OnMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -35468,7 +36212,9 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -35544,7 +36290,9 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -35619,7 +36367,9 @@ class SubscribeAttributeModeSelectAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -35694,7 +36444,9 @@ class SubscribeAttributeModeSelectFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -35769,7 +36521,9 @@ class SubscribeAttributeModeSelectClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -36129,7 +36883,9 @@ class SubscribeAttributeNetworkCommissioningMaxNetworks : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -36208,7 +36964,9 @@ class SubscribeAttributeNetworkCommissioningNetworks : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.Networks response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -36288,7 +37046,9 @@ class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -36368,7 +37128,9 @@ class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -36485,7 +37247,9 @@ class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public ModelComma reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -36565,7 +37329,9 @@ class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -36644,7 +37410,9 @@ class SubscribeAttributeNetworkCommissioningLastNetworkID : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -36724,7 +37492,9 @@ class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -36804,7 +37574,9 @@ class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public ModelC reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -36884,7 +37656,9 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public ModelCo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -36963,7 +37737,9 @@ class SubscribeAttributeNetworkCommissioningFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -37043,7 +37819,9 @@ class SubscribeAttributeNetworkCommissioningClusterRevision : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -37278,7 +38056,9 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public ModelCom subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -37358,7 +38138,9 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -37513,7 +38295,9 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOtaProviders : public M reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.DefaultOtaProviders response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -37593,7 +38377,9 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.UpdatePossible response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -37673,7 +38459,9 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.UpdateState response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -37753,7 +38541,9 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public M reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -37833,7 +38623,9 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public ModelCo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -37913,7 +38705,9 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -38019,7 +38813,9 @@ class SubscribeAttributeOccupancySensingOccupancy : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.Occupancy response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -38099,7 +38895,9 @@ class SubscribeAttributeOccupancySensingOccupancySensorType : public ModelComman reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -38181,7 +38979,9 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -38261,7 +39061,9 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public ModelComma reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -38341,7 +39143,9 @@ class SubscribeAttributeOccupancySensingAcceptedCommandList : public ModelComman reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -38420,7 +39224,9 @@ class SubscribeAttributeOccupancySensingAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -38499,7 +39305,9 @@ class SubscribeAttributeOccupancySensingClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -38793,7 +39601,9 @@ class SubscribeAttributeOnOffOnOff : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnOff response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -38868,7 +39678,9 @@ class SubscribeAttributeOnOffGlobalSceneControl : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -38977,7 +39789,9 @@ class SubscribeAttributeOnOffOnTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -39086,7 +39900,9 @@ class SubscribeAttributeOnOffOffWaitTime : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OffWaitTime response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -39195,7 +40011,9 @@ class SubscribeAttributeOnOffStartUpOnOff : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.StartUpOnOff response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -39270,7 +40088,9 @@ class SubscribeAttributeOnOffGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -39345,7 +40165,9 @@ class SubscribeAttributeOnOffAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -39420,7 +40242,9 @@ class SubscribeAttributeOnOffAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -39495,7 +40319,9 @@ class SubscribeAttributeOnOffFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -39570,7 +40396,9 @@ class SubscribeAttributeOnOffClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -39666,7 +40494,9 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchType : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -39783,7 +40613,9 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchActions : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -39863,7 +40695,9 @@ class SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList : public Mo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -39943,7 +40777,9 @@ class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public Mod reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -40023,7 +40859,9 @@ class SubscribeAttributeOnOffSwitchConfigurationAttributeList : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -40103,7 +40941,9 @@ class SubscribeAttributeOnOffSwitchConfigurationClusterRevision : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -40569,7 +41409,9 @@ class SubscribeAttributeOperationalCredentialsNOCs : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.NOCs response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -40650,7 +41492,9 @@ class SubscribeAttributeOperationalCredentialsFabrics : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -40730,7 +41574,9 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -40810,7 +41656,9 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -40890,7 +41738,9 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public M reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -40970,7 +41820,9 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41050,7 +41902,9 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Mode reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41130,7 +41984,9 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Model reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41210,7 +42066,9 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41290,7 +42148,9 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public ModelComm reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41411,7 +42271,9 @@ class SubscribeAttributePowerSourceStatus : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Status response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41486,7 +42348,9 @@ class SubscribeAttributePowerSourceOrder : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Order response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41561,7 +42425,9 @@ class SubscribeAttributePowerSourceDescription : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Description response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41636,7 +42502,9 @@ class SubscribeAttributePowerSourceBatteryVoltage : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatteryVoltage response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41713,7 +42581,9 @@ class SubscribeAttributePowerSourceBatteryPercentRemaining : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatteryPercentRemaining response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41789,7 +42659,9 @@ class SubscribeAttributePowerSourceBatteryTimeRemaining : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatteryTimeRemaining response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41865,7 +42737,9 @@ class SubscribeAttributePowerSourceBatteryChargeLevel : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatteryChargeLevel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -41941,7 +42815,9 @@ class SubscribeAttributePowerSourceActiveBatteryFaults : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatteryFaults response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42017,7 +42893,9 @@ class SubscribeAttributePowerSourceBatteryChargeState : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatteryChargeState response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42093,7 +42971,9 @@ class SubscribeAttributePowerSourceGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42169,7 +43049,9 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42244,7 +43126,9 @@ class SubscribeAttributePowerSourceAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42319,7 +43203,9 @@ class SubscribeAttributePowerSourceFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42394,7 +43280,9 @@ class SubscribeAttributePowerSourceClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42489,7 +43377,9 @@ class SubscribeAttributePowerSourceConfigurationSources : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42569,7 +43459,9 @@ class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public Mo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42649,7 +43541,9 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Mod reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42729,7 +43623,9 @@ class SubscribeAttributePowerSourceConfigurationAttributeList : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42809,7 +43705,9 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42912,7 +43810,9 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -42992,7 +43892,9 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -43072,7 +43974,9 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -43151,7 +44055,9 @@ class SubscribeAttributePressureMeasurementAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -43231,7 +44137,9 @@ class SubscribeAttributePressureMeasurementClusterRevision : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -43367,7 +44275,9 @@ class SubscribeAttributePumpConfigurationAndControlMaxPressure : public ModelCom subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -43446,7 +44356,9 @@ class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -43525,7 +44437,9 @@ class SubscribeAttributePumpConfigurationAndControlMaxFlow : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -43605,7 +44519,9 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Mod reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -43685,7 +44601,9 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Mod reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -43765,7 +44683,9 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Mode reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -43845,7 +44765,9 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Mode reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -43925,7 +44847,9 @@ class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44005,7 +44929,9 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44085,7 +45011,9 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public ModelCo subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44165,7 +45093,9 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public ModelCo subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44245,7 +45175,9 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public ModelCo subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44325,7 +45257,9 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public ModelCo subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44405,7 +45339,9 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44486,7 +45422,9 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44566,7 +45504,9 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44645,7 +45585,9 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44724,7 +45666,9 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44841,7 +45785,9 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -44920,7 +45866,9 @@ class SubscribeAttributePumpConfigurationAndControlPower : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -45039,7 +45987,9 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -45156,7 +46106,9 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -45273,7 +46225,9 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public ModelCom subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -45352,7 +46306,9 @@ class SubscribeAttributePumpConfigurationAndControlAlarmMask : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AlarmMask response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -45432,7 +46388,9 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -45512,7 +46470,9 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -45592,7 +46552,9 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public ModelC reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -45672,7 +46634,9 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -45752,7 +46716,9 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Mode reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -45851,7 +46817,9 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -45931,7 +46899,9 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Mod reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -46011,7 +46981,9 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Mod reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -46090,7 +47062,9 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -46170,7 +47144,9 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -46250,7 +47226,9 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -46330,7 +47308,9 @@ class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public ModelC reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -46410,7 +47390,9 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Mode reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -46789,7 +47771,9 @@ class SubscribeAttributeScenesSceneCount : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -46864,7 +47848,9 @@ class SubscribeAttributeScenesCurrentScene : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentScene response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -46939,7 +47925,9 @@ class SubscribeAttributeScenesCurrentGroup : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentGroup response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47014,7 +48002,9 @@ class SubscribeAttributeScenesSceneValid : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneValid response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47089,7 +48079,9 @@ class SubscribeAttributeScenesNameSupport : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.NameSupport response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47164,7 +48156,9 @@ class SubscribeAttributeScenesGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47239,7 +48233,9 @@ class SubscribeAttributeScenesAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47314,7 +48310,9 @@ class SubscribeAttributeScenesAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47389,7 +48387,9 @@ class SubscribeAttributeScenesClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47520,7 +48520,9 @@ class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47600,7 +48602,9 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47680,7 +48684,9 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47762,7 +48768,9 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public Mod reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47842,7 +48850,9 @@ class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public ModelCo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -47922,7 +48932,9 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public ModelCom reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48001,7 +49013,9 @@ class SubscribeAttributeSoftwareDiagnosticsAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48080,7 +49094,9 @@ class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48160,7 +49176,9 @@ class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48260,7 +49278,9 @@ class SubscribeAttributeSwitchNumberOfPositions : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.NumberOfPositions response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48335,7 +49355,9 @@ class SubscribeAttributeSwitchCurrentPosition : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.CurrentPosition response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48410,7 +49432,9 @@ class SubscribeAttributeSwitchMultiPressMax : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.MultiPressMax response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48485,7 +49509,9 @@ class SubscribeAttributeSwitchGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48560,7 +49586,9 @@ class SubscribeAttributeSwitchAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48635,7 +49663,9 @@ class SubscribeAttributeSwitchAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48710,7 +49740,9 @@ class SubscribeAttributeSwitchFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48785,7 +49817,9 @@ class SubscribeAttributeSwitchClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48917,7 +49951,9 @@ class SubscribeAttributeTargetNavigatorTargetList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.TargetList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -48992,7 +50028,9 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -49068,7 +50106,9 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public ModelComman reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -49144,7 +50184,9 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -49219,7 +50261,9 @@ class SubscribeAttributeTargetNavigatorAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -49294,7 +50338,9 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -49393,7 +50439,9 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -49473,7 +50521,9 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -49553,7 +50603,9 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -49632,7 +50684,9 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -49712,7 +50766,9 @@ class SubscribeAttributeTemperatureMeasurementAttributeList : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -49792,7 +50848,9 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public ModelComm reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -50632,7 +51690,9 @@ class SubscribeAttributeTestClusterBoolean : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Boolean response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -50741,7 +51801,9 @@ class SubscribeAttributeTestClusterBitmap8 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap8 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -50850,7 +51912,9 @@ class SubscribeAttributeTestClusterBitmap16 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap16 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -50959,7 +52023,9 @@ class SubscribeAttributeTestClusterBitmap32 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap32 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -51068,7 +52134,9 @@ class SubscribeAttributeTestClusterBitmap64 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap64 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -51177,7 +52245,9 @@ class SubscribeAttributeTestClusterInt8u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int8u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -51286,7 +52356,9 @@ class SubscribeAttributeTestClusterInt16u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int16u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -51395,7 +52467,9 @@ class SubscribeAttributeTestClusterInt24u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int24u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -51504,7 +52578,9 @@ class SubscribeAttributeTestClusterInt32u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int32u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -51613,7 +52689,9 @@ class SubscribeAttributeTestClusterInt40u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int40u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -51722,7 +52800,9 @@ class SubscribeAttributeTestClusterInt48u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int48u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -51831,7 +52911,9 @@ class SubscribeAttributeTestClusterInt56u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int56u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -51940,7 +53022,9 @@ class SubscribeAttributeTestClusterInt64u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int64u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -52049,7 +53133,9 @@ class SubscribeAttributeTestClusterInt8s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int8s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -52158,7 +53244,9 @@ class SubscribeAttributeTestClusterInt16s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int16s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -52267,7 +53355,9 @@ class SubscribeAttributeTestClusterInt24s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int24s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -52376,7 +53466,9 @@ class SubscribeAttributeTestClusterInt32s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int32s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -52485,7 +53577,9 @@ class SubscribeAttributeTestClusterInt40s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int40s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -52594,7 +53688,9 @@ class SubscribeAttributeTestClusterInt48s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int48s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -52703,7 +53799,9 @@ class SubscribeAttributeTestClusterInt56s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int56s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -52812,7 +53910,9 @@ class SubscribeAttributeTestClusterInt64s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int64s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -52921,7 +54021,9 @@ class SubscribeAttributeTestClusterEnum8 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Enum8 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -53030,7 +54132,9 @@ class SubscribeAttributeTestClusterEnum16 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Enum16 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -53139,7 +54243,9 @@ class SubscribeAttributeTestClusterFloatSingle : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.FloatSingle response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -53248,7 +54354,9 @@ class SubscribeAttributeTestClusterFloatDouble : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.FloatDouble response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -53357,7 +54465,9 @@ class SubscribeAttributeTestClusterOctetString : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.OctetString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -53432,7 +54542,9 @@ class SubscribeAttributeTestClusterListInt8u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListInt8u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -53507,7 +54619,9 @@ class SubscribeAttributeTestClusterListOctetString : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListOctetString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -53583,7 +54697,9 @@ class SubscribeAttributeTestClusterListStructOctetString : public ModelCommand { reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListStructOctetString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -53692,7 +54808,9 @@ class SubscribeAttributeTestClusterLongOctetString : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.LongOctetString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -53803,7 +54921,9 @@ class SubscribeAttributeTestClusterCharString : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.CharString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -53914,7 +55034,9 @@ class SubscribeAttributeTestClusterLongCharString : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.LongCharString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -54023,7 +55145,9 @@ class SubscribeAttributeTestClusterEpochUs : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EpochUs response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -54132,7 +55256,9 @@ class SubscribeAttributeTestClusterEpochS : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EpochS response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -54241,7 +55367,9 @@ class SubscribeAttributeTestClusterVendorId : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.VendorId response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -54320,7 +55448,9 @@ class SubscribeAttributeTestClusterListNullablesAndOptionalsStruct : public Mode NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListNullablesAndOptionalsStruct response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -54429,7 +55559,9 @@ class SubscribeAttributeTestClusterEnumAttr : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EnumAttr response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -54538,7 +55670,9 @@ class SubscribeAttributeTestClusterStructAttr : public ModelCommand { reportHandler:^(CHIPTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.StructAttr response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -54649,7 +55783,9 @@ class SubscribeAttributeTestClusterRangeRestrictedInt8u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt8u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -54760,7 +55896,9 @@ class SubscribeAttributeTestClusterRangeRestrictedInt8s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt8s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -54871,7 +56009,9 @@ class SubscribeAttributeTestClusterRangeRestrictedInt16u : public ModelCommand { reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt16u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -54982,7 +56122,9 @@ class SubscribeAttributeTestClusterRangeRestrictedInt16s : public ModelCommand { reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt16s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -55058,7 +56200,9 @@ class SubscribeAttributeTestClusterListLongOctetString : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListLongOctetString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -55135,7 +56279,9 @@ class SubscribeAttributeTestClusterListFabricScoped : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListFabricScoped response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -55244,7 +56390,9 @@ class SubscribeAttributeTestClusterTimedWriteBoolean : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.TimedWriteBoolean response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -55355,7 +56503,9 @@ class SubscribeAttributeTestClusterGeneralErrorBoolean : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.GeneralErrorBoolean response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -55466,7 +56616,9 @@ class SubscribeAttributeTestClusterClusterErrorBoolean : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ClusterErrorBoolean response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -55575,7 +56727,9 @@ class SubscribeAttributeTestClusterUnsupported : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Unsupported response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -55684,7 +56838,9 @@ class SubscribeAttributeTestClusterNullableBoolean : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBoolean response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -55793,7 +56949,9 @@ class SubscribeAttributeTestClusterNullableBitmap8 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap8 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -55902,7 +57060,9 @@ class SubscribeAttributeTestClusterNullableBitmap16 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap16 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -56011,7 +57171,9 @@ class SubscribeAttributeTestClusterNullableBitmap32 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap32 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -56120,7 +57282,9 @@ class SubscribeAttributeTestClusterNullableBitmap64 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap64 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -56229,7 +57393,9 @@ class SubscribeAttributeTestClusterNullableInt8u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt8u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -56338,7 +57504,9 @@ class SubscribeAttributeTestClusterNullableInt16u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt16u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -56447,7 +57615,9 @@ class SubscribeAttributeTestClusterNullableInt24u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt24u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -56556,7 +57726,9 @@ class SubscribeAttributeTestClusterNullableInt32u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt32u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -56665,7 +57837,9 @@ class SubscribeAttributeTestClusterNullableInt40u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt40u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -56774,7 +57948,9 @@ class SubscribeAttributeTestClusterNullableInt48u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt48u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -56883,7 +58059,9 @@ class SubscribeAttributeTestClusterNullableInt56u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt56u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -56992,7 +58170,9 @@ class SubscribeAttributeTestClusterNullableInt64u : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt64u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -57101,7 +58281,9 @@ class SubscribeAttributeTestClusterNullableInt8s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt8s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -57210,7 +58392,9 @@ class SubscribeAttributeTestClusterNullableInt16s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt16s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -57319,7 +58503,9 @@ class SubscribeAttributeTestClusterNullableInt24s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt24s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -57428,7 +58614,9 @@ class SubscribeAttributeTestClusterNullableInt32s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt32s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -57537,7 +58725,9 @@ class SubscribeAttributeTestClusterNullableInt40s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt40s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -57646,7 +58836,9 @@ class SubscribeAttributeTestClusterNullableInt48s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt48s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -57755,7 +58947,9 @@ class SubscribeAttributeTestClusterNullableInt56s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt56s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -57864,7 +59058,9 @@ class SubscribeAttributeTestClusterNullableInt64s : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt64s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -57973,7 +59169,9 @@ class SubscribeAttributeTestClusterNullableEnum8 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnum8 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -58082,7 +59280,9 @@ class SubscribeAttributeTestClusterNullableEnum16 : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnum16 response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -58193,7 +59393,9 @@ class SubscribeAttributeTestClusterNullableFloatSingle : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableFloatSingle response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -58304,7 +59506,9 @@ class SubscribeAttributeTestClusterNullableFloatDouble : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableFloatDouble response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -58415,7 +59619,9 @@ class SubscribeAttributeTestClusterNullableOctetString : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableOctetString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -58528,7 +59734,9 @@ class SubscribeAttributeTestClusterNullableCharString : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableCharString response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -58637,7 +59845,9 @@ class SubscribeAttributeTestClusterNullableEnumAttr : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnumAttr response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -58746,7 +59956,9 @@ class SubscribeAttributeTestClusterNullableStruct : public ModelCommand { reportHandler:^(CHIPTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableStruct response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -58859,7 +60071,9 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt8u : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt8u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -58972,7 +60186,9 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt8s : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt8s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -59087,7 +60303,9 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt16u : public ModelC NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt16u response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -59202,7 +60420,9 @@ class SubscribeAttributeTestClusterNullableRangeRestrictedInt16s : public ModelC NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt16s response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -59278,7 +60498,9 @@ class SubscribeAttributeTestClusterGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -59354,7 +60576,9 @@ class SubscribeAttributeTestClusterAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -59429,7 +60653,9 @@ class SubscribeAttributeTestClusterAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -59504,7 +60730,9 @@ class SubscribeAttributeTestClusterClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -59819,7 +61047,9 @@ class SubscribeAttributeThermostatLocalTemperature : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperature response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -59896,7 +61126,9 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -59973,7 +61205,9 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -60050,7 +61284,9 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -60127,7 +61363,9 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -60239,7 +61477,9 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -60351,7 +61591,9 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -60462,7 +61704,9 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -60573,7 +61817,9 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -60684,7 +61930,9 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -60795,7 +62043,9 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -60906,7 +62156,9 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -61019,7 +62271,9 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public ModelComma reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -61128,7 +62382,9 @@ class SubscribeAttributeThermostatSystemMode : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SystemMode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -61203,7 +62459,9 @@ class SubscribeAttributeThermostatStartOfWeek : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.StartOfWeek response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -61281,7 +62539,9 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public ModelComman reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -61359,7 +62619,9 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -61434,7 +62696,9 @@ class SubscribeAttributeThermostatAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -61509,7 +62773,9 @@ class SubscribeAttributeThermostatFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -61584,7 +62850,9 @@ class SubscribeAttributeThermostatClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -61718,7 +62986,9 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMo NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode " @"response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -61832,7 +63102,9 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : publ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -61943,17 +63215,20 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingV CHIPThermostatUserInterfaceConfiguration * cluster = [[CHIPThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; CHIPSubscribeParams * params = [[CHIPSubscribeParams alloc] init]; - [cluster subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params - subscriptionEstablished:NULL - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration." - @"ScheduleProgrammingVisibility response %@", - [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); - }]; + [cluster + subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:NULL + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration." + @"ScheduleProgrammingVisibility response %@", + [value description]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } + }]; return CHIP_NO_ERROR; } @@ -62031,7 +63306,9 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList " @"response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -62111,7 +63388,9 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList NSLog( @"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -62189,7 +63468,9 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : publ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -62267,7 +63548,9 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : pu reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -62457,7 +63740,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannel : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -62536,7 +63821,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -62615,7 +63902,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -62694,7 +63983,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsPanId : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -62774,7 +64065,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -62854,7 +64147,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public ModelCo reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -62934,7 +64229,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63014,7 +64311,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsNeighborTableList : public Model reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NeighborTableList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63094,7 +64393,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouteTableList : public ModelCom reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouteTableList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63173,7 +64474,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63252,7 +64555,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63331,7 +64636,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63411,7 +64718,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63491,7 +64800,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63571,7 +64882,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63651,7 +64964,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63731,7 +65046,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63811,7 +65128,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63891,7 +65210,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public Mode reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -63971,7 +65292,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -64045,18 +65368,20 @@ class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCoun endpoint:endpointId queue:callbackQueue]; CHIPSubscribeParams * params = [[CHIPSubscribeParams alloc] init]; - [cluster - subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params - subscriptionEstablished:NULL - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics." - @"BetterPartitionAttachAttemptCount response %@", - [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); - }]; + [cluster subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:NULL + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics." + @"BetterPartitionAttachAttemptCount response %@", + [value description]); + if (error || !mWait) { + SetCommandExitStatus( + [CHIPError errorToCHIPErrorCode:error]); + } + }]; return CHIP_NO_ERROR; } @@ -64135,7 +65460,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -64215,7 +65542,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -64295,7 +65624,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -64375,7 +65706,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -64455,7 +65788,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public Mod reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -64535,7 +65870,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -64615,7 +65952,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public M reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -64694,7 +66033,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -64774,7 +66115,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -64854,7 +66197,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -64934,7 +66279,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public Mo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65014,7 +66361,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65094,7 +66443,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65177,7 +66528,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : pu NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount " @"response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65251,17 +66604,20 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : endpoint:endpointId queue:callbackQueue]; CHIPSubscribeParams * params = [[CHIPSubscribeParams alloc] init]; - [cluster subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params - subscriptionEstablished:NULL - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics." - @"TxIndirectMaxRetryExpiryCount response %@", - [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); - }]; + [cluster + subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:NULL + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount " + @"response %@", + [value description]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } + }]; return CHIP_NO_ERROR; } @@ -65340,7 +66696,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65420,7 +66778,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65500,7 +66860,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public M reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65580,7 +66942,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65660,7 +67024,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65740,7 +67106,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65819,7 +67187,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65899,7 +67269,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -65979,7 +67351,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66059,7 +67433,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public Mo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66139,7 +67515,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66219,7 +67597,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66301,7 +67681,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66381,7 +67763,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66461,7 +67845,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public Model reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66544,7 +67930,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : publ NSLog( @"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66626,7 +68014,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : publi reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66706,7 +68096,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66786,7 +68178,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66866,7 +68260,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -66946,7 +68342,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67026,7 +68424,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67105,7 +68505,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsDelay : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67185,7 +68587,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public ModelCom reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67264,7 +68668,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannelMask : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChannelMask response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67347,7 +68753,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : p NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents " @"response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67428,7 +68836,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67508,7 +68918,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public Mo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67588,7 +69000,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Mod reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67668,7 +69082,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public ModelComm subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67747,7 +69163,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67827,7 +69245,9 @@ class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public ModelCo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -67960,7 +69380,9 @@ class SubscribeAttributeTimeFormatLocalizationHourFormat : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -68077,7 +69499,9 @@ class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public ModelC reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -68157,7 +69581,9 @@ class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public Mo reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -68237,7 +69663,9 @@ class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public Mode reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -68317,7 +69745,9 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Model reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -68397,7 +69827,9 @@ class SubscribeAttributeTimeFormatLocalizationClusterRevision : public ModelComm reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -68528,7 +69960,9 @@ class SubscribeAttributeUnitLocalizationTemperatureUnit : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -68607,7 +70041,9 @@ class SubscribeAttributeUnitLocalizationAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -68686,7 +70122,9 @@ class SubscribeAttributeUnitLocalizationFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -68765,7 +70203,9 @@ class SubscribeAttributeUnitLocalizationClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -68856,7 +70296,9 @@ class SubscribeAttributeUserLabelLabelList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.LabelList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -68932,7 +70374,9 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69008,7 +70452,9 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69083,7 +70529,9 @@ class SubscribeAttributeUserLabelClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69174,7 +70622,9 @@ class SubscribeAttributeWakeOnLanMACAddress : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.MACAddress response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69250,7 +70700,9 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69326,7 +70778,9 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69401,7 +70855,9 @@ class SubscribeAttributeWakeOnLanAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69476,7 +70932,9 @@ class SubscribeAttributeWakeOnLanClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69618,7 +71076,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.Bssid response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69697,7 +71157,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69776,7 +71238,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69856,7 +71320,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -69935,7 +71401,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.Rssi response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70015,7 +71483,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public ModelComm reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70095,7 +71565,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70175,7 +71647,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public Mo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70255,7 +71729,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public Mo reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70335,7 +71811,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public Mode reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70415,7 +71893,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public Mode reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70495,7 +71975,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public ModelComma subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70574,7 +72056,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public ModelCommand subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70654,7 +72138,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public Mode reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70734,7 +72220,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Model reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70814,7 +72302,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public ModelComman subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70893,7 +72383,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -70973,7 +72465,9 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public ModelComm reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -71321,7 +72815,9 @@ class SubscribeAttributeWindowCoveringType : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Type response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -71397,7 +72893,9 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -71473,7 +72971,9 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public ModelCommand reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -71548,7 +73048,9 @@ class SubscribeAttributeWindowCoveringConfigStatus : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -71627,7 +73129,9 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Mod NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -71706,7 +73210,9 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Mod NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -71782,7 +73288,9 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -71862,7 +73370,9 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public M NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response " @"%@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -71942,7 +73452,9 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public M NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response " @"%@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -72017,7 +73529,9 @@ class SubscribeAttributeWindowCoveringEndProductType : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EndProductType response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -72087,18 +73601,20 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; CHIPSubscribeParams * params = [[CHIPSubscribeParams alloc] init]; - [cluster - subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params - subscriptionEstablished:NULL - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths " - @"response %@", - [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); - }]; + [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:NULL + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths " + @"response %@", + [value description]); + if (error || !mWait) { + SetCommandExitStatus( + [CHIPError errorToCHIPErrorCode:error]); + } + }]; return CHIP_NO_ERROR; } @@ -72167,18 +73683,20 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; CHIPSubscribeParams * params = [[CHIPSubscribeParams alloc] init]; - [cluster - subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] - maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] - params:params - subscriptionEstablished:NULL - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths " - @"response %@", - [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); - }]; + [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:NULL + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths " + @"response %@", + [value description]); + if (error || !mWait) { + SetCommandExitStatus( + [CHIPError errorToCHIPErrorCode:error]); + } + }]; return CHIP_NO_ERROR; } @@ -72253,7 +73771,9 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public ModelComma reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -72331,7 +73851,9 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -72407,7 +73929,9 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public ModelComma reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -72485,7 +74009,9 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public ModelCom reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -72594,7 +74120,9 @@ class SubscribeAttributeWindowCoveringMode : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Mode response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -72669,7 +74197,9 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -72745,7 +74275,9 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -72821,7 +74353,9 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public ModelCommand reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -72896,7 +74430,9 @@ class SubscribeAttributeWindowCoveringAttributeList : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AttributeList response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -72971,7 +74507,9 @@ class SubscribeAttributeWindowCoveringFeatureMap : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.FeatureMap response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR; @@ -73046,7 +74584,9 @@ class SubscribeAttributeWindowCoveringClusterRevision : public ModelCommand { subscriptionEstablished:NULL reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); - SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } }]; return CHIP_NO_ERROR;