-
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.
Move emberAfClusterInitCallback out from callback-stub.cpp (#31474)
* Move emberAfClusterInitCallback out from callback-stub.cpp * fixes matter idl test
- Loading branch information
Showing
16 changed files
with
365 additions
and
333 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
19 changes: 0 additions & 19 deletions
19
scripts/py_matter_idl/matter_idl/generators/cpp/application/CallbackStubSource.jinja
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
22 changes: 22 additions & 0 deletions
22
scripts/py_matter_idl/matter_idl/generators/cpp/application/ClusterInitCallbackSource.jinja
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,22 @@ | ||
#include <app-common/zap-generated/callback.h> | ||
#include <app-common/zap-generated/ids/Clusters.h> | ||
#include <lib/support/Span.h> | ||
#include <protocols/interaction_model/Constants.h> | ||
|
||
using namespace chip; | ||
|
||
// Cluster Init Functions | ||
void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) | ||
{ | ||
switch (clusterId) | ||
{ | ||
{%- for name in clusters | sort(attribute='name') | map(attribute='name') | unique %} | ||
case app::Clusters::{{name}}::Id: | ||
emberAf{{name}}ClusterInitCallback(endpoint); | ||
break; | ||
{%- endfor %} | ||
default: | ||
// Unrecognized cluster ID | ||
break; | ||
} | ||
} |
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
203 changes: 0 additions & 203 deletions
203
...s/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp
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
Oops, something went wrong.