Skip to content

Commit

Permalink
Resolve wait on subscriptions for attributes. (#16644)
Browse files Browse the repository at this point in the history
* Allow waiting for subscription notifications.

* Generated code.
  • Loading branch information
krypton36 authored and pull[bot] committed Jul 26, 2023
1 parent a266602 commit 5360561
Show file tree
Hide file tree
Showing 2 changed files with 2,367 additions and 825 deletions.
4 changes: 3 additions & 1 deletion examples/chip-tool-darwin/templates/commands.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 5360561

Please sign in to comment.