Skip to content

Commit

Permalink
Enable reporting for all non-list attributes. (#11995)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Feb 13, 2024
1 parent e76a525 commit 5956245
Show file tree
Hide file tree
Showing 48 changed files with 105,024 additions and 25,542 deletions.
1,570 changes: 785 additions & 785 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

Large diffs are not rendered by default.

394 changes: 197 additions & 197 deletions examples/bridge-app/bridge-common/bridge-app.zap

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions examples/chip-tool/templates/commands.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ private:
{{/unless}}
{{/if}}
{{#if isReportableAttribute}}
{{#unless isList}}
class Report{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}: public ModelCommand
{
public:
Expand Down Expand Up @@ -548,6 +549,7 @@ private:
bool mWait;
};

{{/unless}}
{{/if}}
{{/chip_server_cluster_attributes}}
{{/chip_client_clusters}}
Expand All @@ -574,7 +576,9 @@ void registerCluster{{asUpperCamelCase name}}(Commands & commands)
{{/unless}}
{{/if}}
{{#if isReportableAttribute}}
{{#unless isList}}
make_unique<Report{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}>(), //
{{/unless}}
{{/if}}
{{/chip_server_cluster_attributes}}
};
Expand Down
6 changes: 6 additions & 0 deletions examples/chip-tool/templates/reporting-commands.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public:
{{#chip_client_clusters}}
{{#chip_server_cluster_attributes}}
{{#if isReportableAttribute}}
{{#unless isList}}
delete onReport{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Callback;
{{/unless}}
{{/if}}
{{/chip_server_cluster_attributes}}
{{/chip_client_clusters}}
Expand All @@ -31,7 +33,9 @@ public:
{{#chip_client_clusters}}
{{#chip_server_cluster_attributes}}
{{#if isReportableAttribute}}
{{#unless isList}}
callbacksMgr.AddReportCallback(remoteId, endpointId, {{asHex parent.code 4}}, {{asHex code 4}}, onReport{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Callback->Cancel(), BasicAttributeFilter<{{chipCallback.name}}AttributeCallback>);
{{/unless}}
{{/if}}
{{/chip_server_cluster_attributes}}
{{/chip_client_clusters}}
Expand Down Expand Up @@ -76,7 +80,9 @@ private:
{{#chip_client_clusters}}
{{#chip_server_cluster_attributes}}
{{#if isReportableAttribute}}
{{#unless isList}}
chip::Callback::Callback<{{chipCallback.name}}AttributeCallback> * onReport{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Callback = new chip::Callback::Callback<{{chipCallback.name}}AttributeCallback>(On{{chipCallback.name}}AttributeResponse, this);
{{/unless}}
{{/if}}
{{/chip_server_cluster_attributes}}
{{/chip_client_clusters}}
Expand Down
Loading

0 comments on commit 5956245

Please sign in to comment.