Skip to content

Commit

Permalink
[chip-tool] Get chip-tool template to generate write commands for str…
Browse files Browse the repository at this point in the history
…uct attributes now that complex types are supported (#14593)

* [chip-tool] Get chip-tool template to generate write commands for struct attributes now that complex types are supported

* Update generated content
  • Loading branch information
vivien-apple authored and pull[bot] committed Jun 24, 2023
1 parent 494dc78 commit 1096824
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 6 deletions.
6 changes: 0 additions & 6 deletions examples/chip-tool/templates/commands.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ private:
{{/chip_cluster_commands}}

{{#chip_server_cluster_attributes}}
{{! TODO: Various types (floats, structs) not supported here. }}
{{#unless (isStrEqual chipCallback.name "Unsupported")}}
{{#if isWritableAttribute}}
class Write{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}: public WriteAttribute
{
Expand Down Expand Up @@ -92,7 +90,6 @@ private:
};

{{/if}}
{{/unless}}
{{/chip_server_cluster_attributes}}
{{/chip_client_clusters}}

Expand Down Expand Up @@ -123,12 +120,9 @@ void registerCluster{{asUpperCamelCase name}}(Commands & commands, CredentialIss
{{/chip_server_cluster_attributes}}
make_unique<WriteAttribute>(Id, credsIssuerConfig), //
{{#chip_server_cluster_attributes}}
{{! TODO: Various types (floats, structs) not supported here. }}
{{#unless (isStrEqual chipCallback.name "Unsupported")}}
{{#if isWritableAttribute}}
make_unique<Write{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}>(credsIssuerConfig), //
{{/if}}
{{/unless}}
{{/chip_server_cluster_attributes}}
make_unique<SubscribeAttribute>(Id, credsIssuerConfig), //
{{#chip_server_cluster_attributes}}
Expand Down
72 changes: 72 additions & 0 deletions zzz_generated/chip-tool/zap-generated/cluster/Commands.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1096824

Please sign in to comment.