-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug/non determinism commands/GitHub#342 (#14708)
* - Adding changes to the zap templates such that the incoming and outgoing commands are generated with determinism. Using the upto date helpers in the *.zapt templates Currently pointing to a zap repo which has new helpers as well. These changes have not been merged into the github zap repo gihub#342 * - Generation for outgoing commands which originate from the client side only. - All commands originating on the server sides are response commands which do not need to be generated here Github#342 * - Reverting from zcl_command_arguments to chip_cluster_command_arguments_with_structs_expanded - Applying changes to chip_cluster_command_arguments_with_structs_expanded such that it can be used within all_outgoing_commands_for_cluster block helper instead of chip_cluster_command_arguments - Github#342 * - Cleaning the templates further such that we have lesser diff to what we generated before Github#342 * Making sure that outgoing commands are generated for both mfg and non-mfg specific clusters and commands Github#342 * Generating for clusters which do not have any outgoing commands because there is code which depends on this generated code Github#342 * Using chip_client_clusters instead of all_user_clusters_with_outgoing_commands in CHIPClusters-src.zapt just like we do in CHIPClusters.zapt to maintain consistency Also reverting the changes in helper.js since those are no longer required Github#342 * Cleaning up asBlock and regening Github#342 * Regening light switch app with the right content after rebasing from upstream master Github#342 * Cleaning up the typo in helper.js Github#342 * Restore the previous asBlocks behavior * Fixing the request structs for commands in .matter generated files such that request struct should be defined for all incoming commands from client to server and outgoing commands from client to server Github#342 * Fixing the response structs for commands in .matter generated files such that response struct should be defined for all incoming commands from server to client and outgoing commands from server to client Github#342 * Regening after rebasing master Github#342 * Remove unnecessary isMfgSpecific="false" and fix rebase problem in cluster-objects.h * Cleaning up the remaining non determinism in MatterIDL template Github#342 * Formatting the MatterIDL.zapt template Github#342 * Formatting the MatterIDL.zapt template Github#342 * Adding partials to remove duplication in the template and cleaning up Github#342 * minor cleanup Github#342 * Using responseRef instead of the complicated logic in the template Adding some endpoint config changes which came up after pulling the latest zap repo Github#342 * Regening after rebase Github#342 * Remove stray CommandSenderHandle bit that is not used. Co-authored-by: Boris Zbarsky <[email protected]>
- Loading branch information
Showing
11 changed files
with
115 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/app/zap-templates/partials/idl/command_request_response.zapt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{#first}} | ||
|
||
{{/first}} | ||
{{#if mustUseTimedInvoke}} | ||
{{~indent 1~}}timed command | ||
{{~else}} | ||
{{~indent 1~}}command | ||
{{~/if}} {{asUpperCamelCase commandName}}( | ||
{{~#zcl_command_arguments~}} | ||
{{~#first~}} | ||
{{asUpperCamelCase parent.commandName}}Request | ||
{{~/first~}} | ||
{{~/zcl_command_arguments~}} | ||
): {{#if responseRef~}} | ||
{{getResponseCommandName responseRef}} | ||
{{~else~}} | ||
DefaultSuccess | ||
{{~/if~}} | ||
{{~indent 0}} = {{code}}; |
10 changes: 10 additions & 0 deletions
10
src/app/zap-templates/partials/idl/command_request_struct.zapt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{#zcl_command_arguments}} | ||
{{#first}} | ||
{{~new_line 1~}}{{~indent 1~}}request struct {{asUpperCamelCase parent.commandName}}Request { | ||
{{/first}} | ||
{{~indent 2~}}{{> idl_structure_member}} | ||
{{#last}} | ||
|
||
{{~indent 1~}}} | ||
{{/last}} | ||
{{/zcl_command_arguments}} |
10 changes: 10 additions & 0 deletions
10
src/app/zap-templates/partials/idl/command_response_struct.zapt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{#zcl_command_arguments}} | ||
{{#first}} | ||
{{~new_line 1~}}{{~indent 1~}}response struct {{asUpperCamelCase parent.commandName}} { | ||
{{/first}} | ||
{{~indent 2~}}{{> idl_structure_member}} | ||
{{#last}} | ||
|
||
{{~indent 1~}}} | ||
{{/last}} | ||
{{/zcl_command_arguments}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule repo
updated
22 files