Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate cluster objects for all clusters. #10156

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/app/zap-templates/templates/app/cluster-objects-src.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
namespace chip {
namespace app {
namespace clusters {
{{#all_user_clusters}}
{{#if (user_cluster_has_enabled_command name side)}}
namespace {{asCamelCased name false}} {
{{#zcl_clusters}}
namespace {{asUpperCamelCase name}} {
{{#zcl_structs}}
namespace {{asType label}} {
CHIP_ERROR Type::Encode(TLV::TLVWriter &writer, uint64_t tag) const{
Expand Down Expand Up @@ -91,8 +90,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader &reader) {
{{/zcl_structs}}
}

{{/if}}
{{/all_user_clusters}}
{{/zcl_clusters}}

} // namespace clusters
} // namespace app
Expand Down
10 changes: 5 additions & 5 deletions src/app/zap-templates/templates/app/cluster-objects.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ namespace chip {
namespace app {
namespace clusters {

{{#all_user_clusters}}
namespace {{asCamelCased name false}} {
{{#zcl_clusters}}
namespace {{asUpperCamelCase name}} {
{{#zcl_enums}}
// Enum for {{label}}
enum class {{asType label}} : {{asUnderlyingZclType type}} {
Expand Down Expand Up @@ -60,11 +60,11 @@ namespace {{name}} {
};
{{/if}}

}// namespace for {{name}}
} // namespace {{name}}
{{/zcl_structs}}

}// namespace for {{name}}
{{/all_user_clusters}}
} // namespace {{asUpperCamelCase name}}
{{/zcl_clusters}}

} // namespace clusters
} // namespace app
Expand Down
Loading