diff --git a/examples/darwin-framework-tool/templates/commands.zapt b/examples/darwin-framework-tool/templates/commands.zapt index 6ad1b9f1bc3005..b29be757406711 100644 --- a/examples/darwin-framework-tool/templates/commands.zapt +++ b/examples/darwin-framework-tool/templates/commands.zapt @@ -56,7 +56,7 @@ public: uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster {{asLowerCamelCase name}}With{{#if (hasArguments)}}Params:params completionHandler:{{else}}CompletionHandler:{{/if}} + [cluster {{asLowerCamelCase name}}WithParams:params completionHandler: {{#if hasSpecificResponse}} ^(CHIP{{asUpperCamelCase clusterName}}Cluster{{asUpperCamelCase responseName}}Params * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index c4257897b8b90d..b301b197ad678c 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -1150,16 +1150,17 @@ class AccountLoginLogout : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster logoutWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster logoutWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1650,16 +1651,17 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster revokeCommissioningWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4619,16 +4621,17 @@ class BarrierControlBarrierControlStop : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster barrierControlStopWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster barrierControlStopWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -5947,16 +5950,17 @@ class BasicMfgSpecificPing : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster mfgSpecificPingWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster mfgSpecificPingWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -25269,16 +25273,17 @@ class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster getProfileInfoCommandWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster getProfileInfoCommandWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -35376,16 +35381,17 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster resetCountsWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -38924,18 +38930,20 @@ class GeneralCommissioningCommissioningComplete : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster commissioningCompleteWithCompletionHandler:^( - CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster commissioningCompleteWithParams:params + completionHandler:^( + CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -41996,16 +42004,17 @@ class GroupsRemoveAllGroups : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster removeAllGroupsWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster removeAllGroupsWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -44616,16 +44625,17 @@ class LevelControlStopWithOnOff : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopWithOnOffWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster stopWithOnOffWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -46821,16 +46831,17 @@ class LowPowerSleep : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster sleepWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster sleepWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -47262,16 +47273,17 @@ class MediaInputShowInputStatus : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster showInputStatusWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster showInputStatusWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -47302,16 +47314,17 @@ class MediaInputHideInputStatus : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster hideInputStatusWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster hideInputStatusWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -47894,18 +47907,19 @@ class MediaPlaybackPlay : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster playWithCompletionHandler:^( - CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + playWithParams:params + completionHandler:^(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -47936,18 +47950,19 @@ class MediaPlaybackPause : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster pauseWithCompletionHandler:^( - CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + pauseWithParams:params + completionHandler:^(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -47978,18 +47993,19 @@ class MediaPlaybackStopPlayback : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopPlaybackWithCompletionHandler:^( - CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster stopPlaybackWithParams:params + completionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -48020,18 +48036,19 @@ class MediaPlaybackStartOver : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster startOverWithCompletionHandler:^( - CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster startOverWithParams:params + completionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -48062,18 +48079,19 @@ class MediaPlaybackPrevious : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster previousWithCompletionHandler:^( - CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + previousWithParams:params + completionHandler:^(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -48104,18 +48122,19 @@ class MediaPlaybackNext : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster nextWithCompletionHandler:^( - CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + nextWithParams:params + completionHandler:^(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -48146,18 +48165,19 @@ class MediaPlaybackRewind : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster rewindWithCompletionHandler:^( - CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + rewindWithParams:params + completionHandler:^(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -48188,18 +48208,19 @@ class MediaPlaybackFastForward : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster fastForwardWithCompletionHandler:^( - CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster fastForwardWithParams:params + completionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -54448,16 +54469,17 @@ class OnOffOff : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster offWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster offWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -54488,16 +54510,17 @@ class OnOffOn : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster onWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster onWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -54528,16 +54551,17 @@ class OnOffToggle : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster toggleWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster toggleWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -54614,16 +54638,17 @@ class OnOffOnWithRecallGlobalScene : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster onWithRecallGlobalSceneWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster onWithRecallGlobalSceneWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -65511,16 +65536,17 @@ class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetWatermarksWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster resetWatermarksWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68087,16 +68113,17 @@ class TestClusterTest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster testWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68127,16 +68154,17 @@ class TestClusterTestNotHandled : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testNotHandledWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster testNotHandledWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68167,18 +68195,19 @@ class TestClusterTestSpecific : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testSpecificWithCompletionHandler:^( - CHIPTestClusterClusterTestSpecificResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster testSpecificWithParams:params + completionHandler:^( + CHIPTestClusterClusterTestSpecificResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68209,16 +68238,17 @@ class TestClusterTestUnknownCommand : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testUnknownCommandWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster testUnknownCommandWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -69418,16 +69448,17 @@ class TestClusterTimedInvokeRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster timedInvokeRequestWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster timedInvokeRequestWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -79030,16 +79061,17 @@ class ThermostatClearWeeklySchedule : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster clearWeeklyScheduleWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster clearWeeklyScheduleWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -84564,16 +84596,17 @@ class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster resetCountsWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -91598,16 +91631,17 @@ class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster resetCountsWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -92972,16 +93006,17 @@ class WindowCoveringUpOrOpen : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster upOrOpenWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster upOrOpenWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -93012,16 +93047,17 @@ class WindowCoveringDownOrClose : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster downOrCloseWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -93052,16 +93088,17 @@ class WindowCoveringStopMotion : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopMotionWithCompletionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster stopMotionWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; }