Skip to content

Commit 0805ff2

Browse files
tcarmelveilleuxtennessee-googlerestyled-commits
authored andcommitted
Remove an unused partial (project-chip#29690)
* Remove an unused partial Problem: - `src/app/zap-templates/partials/im_command_handler_cluster_commands.zapt` had legacy-preserving code that is now 100% obsolete. The remaining part of it that was used can now be inlined in the primary command handling template. This PR: - Removed the dead partial and updated templates Testing done: - Regenerated ZAP and found no changes to code. * Restyled by prettier-json * Fix build --------- Co-authored-by: tennessee.carmelveilleux@gmail.com <tennessee@google.com> Co-authored-by: Restyled.io <commits@restyled.io>
1 parent d6e7cde commit 0805ff2

File tree

5 files changed

+6
-98
lines changed

5 files changed

+6
-98
lines changed

build/chip/chip_codegen.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ function(chip_zapgen TARGET_NAME)
161161
# out links of template files and zap files and such
162162
SET(EXTRA_DEPENDENCIES
163163
"${CHIP_ROOT}/src/app/zap-templates/partials/header.zapt"
164-
"${CHIP_ROOT}/src/app/zap-templates/partials/im_command_handler_cluster_commands.zapt"
165164
"${CHIP_ROOT}/src/app/zap-templates/templates/app/access.zapt"
166165
"${CHIP_ROOT}/src/app/zap-templates/templates/app/CHIPClusters.zapt"
167166
"${CHIP_ROOT}/src/app/zap-templates/templates/app/endpoint_config.zapt"

build/chip/chip_codegen.gni

-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ template("_chip_build_time_zapgen") {
141141
# out links of template files and zap files and such
142142
_extra_dependencies = [
143143
"${_partials_dir}/header.zapt",
144-
"${_partials_dir}/im_command_handler_cluster_commands.zapt",
145144

146145
# Application templates, actually generating files
147146
"${_template_dir}/access.zapt",

src/app/zap-templates/app-templates.json

-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
{
1818
"name": "header",
1919
"path": "partials/header.zapt"
20-
},
21-
{
22-
"name": "im_command_handler_cluster_commands",
23-
"path": "partials/im_command_handler_cluster_commands.zapt"
2420
}
2521
],
2622
"templates": [

src/app/zap-templates/partials/im_command_handler_cluster_commands.zapt

-91
This file was deleted.

src/app/zap-templates/templates/app/im-cluster-command-handler.zapt

+6-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP
3636
{
3737
{{/first}}
3838
case Commands::{{asUpperCamelCase commandName}}::Id: {
39-
{{> im_command_handler_cluster_commands}}
39+
Commands::{{asUpperCamelCase commandName}}::DecodableType commandData;
40+
TLVError = DataModel::Decode(aDataTlv, commandData);
41+
if (TLVError == CHIP_NO_ERROR)
42+
{
43+
wasHandled = emberAf{{asUpperCamelCase parent.clusterName}}Cluster{{asUpperCamelCase commandName}}Callback(apCommandObj, aCommandPath, commandData);
44+
}
4045
break;
4146
}
4247
{{#last}}

0 commit comments

Comments
 (0)