Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-execution command callback. #20361

Closed
lnikulin opened this issue Jul 6, 2022 · 0 comments · Fixed by #20357
Closed

Add pre-execution command callback. #20361

lnikulin opened this issue Jul 6, 2022 · 0 comments · Fixed by #20357

Comments

@lnikulin
Copy link
Contributor

lnikulin commented Jul 6, 2022

Problem
Sometimes it is required to perform some kind of preparation work before command is handled. As it seems, there's no way for app to be notified before the command is executed.

Change overview
Add the callback that could be implemented by application uses Matter. This callback is called before every command gets executed.

lnikulin added a commit to lnikulin/connectedhomeip that referenced this issue Jul 7, 2022
- move MatterPreExecuteCommandCallback() into DispatchSingleClusterCommand()
- regenerate all IMClusterCommandHandler.cpp files
lnikulin added a commit to lnikulin/connectedhomeip that referenced this issue Jul 11, 2022
andy31415 added a commit that referenced this issue Jul 14, 2022
* Added the callback that could be implemented by application uses Matter. This callback is called before every command gets executed.

* Restyled by astyle

* Restyled by clang-format

* Restyled by whitespace

* Regenerate all callback-stub.cpp and IMCLusterCommandHandler.cpp

* Restyled by astyle

* Restyled by clang-format

* Add pre-execution command callback. #20361
- move MatterPreExecuteCommandCallback() into DispatchSingleClusterCommand()
- regenerate all IMClusterCommandHandler.cpp files

* Restyled by astyle

* Restyled by clang-format

* Removed a modified MTRCallbackBridge.mm file from pull request

* Removed a modified zzz_generated/chip-tool/zap-generated/test/Commands.h file from pull request

* remove all autogenerated files from PR

* Use existing callback MatterPreCommandReceivedCallback to notify "cmd exec" (add fabricIndex parameter)

* Added parameter subjectDescriptor into callbacks Matter(Pre/Post)CommandReceivedCallback (#20361)

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
github-actions bot pushed a commit that referenced this issue Jul 14, 2022
* Added the callback that could be implemented by application uses Matter. This callback is called before every command gets executed.

* Restyled by astyle

* Restyled by clang-format

* Restyled by whitespace

* Regenerate all callback-stub.cpp and IMCLusterCommandHandler.cpp

* Restyled by astyle

* Restyled by clang-format

* Add pre-execution command callback. #20361
- move MatterPreExecuteCommandCallback() into DispatchSingleClusterCommand()
- regenerate all IMClusterCommandHandler.cpp files

* Restyled by astyle

* Restyled by clang-format

* Removed a modified MTRCallbackBridge.mm file from pull request

* Removed a modified zzz_generated/chip-tool/zap-generated/test/Commands.h file from pull request

* remove all autogenerated files from PR

* Use existing callback MatterPreCommandReceivedCallback to notify "cmd exec" (add fabricIndex parameter)

* Added parameter subjectDescriptor into callbacks Matter(Pre/Post)CommandReceivedCallback (#20361)

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant