Skip to content

Commit

Permalink
Generate cluster objects for all clusters. (#10156)
Browse files Browse the repository at this point in the history
We're only generating them for the ones enabled in controller-clusters.zap.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Nov 9, 2021
1 parent 501a524 commit cb4ff7c
Show file tree
Hide file tree
Showing 4 changed files with 2,255 additions and 1,097 deletions.
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

0 comments on commit cb4ff7c

Please sign in to comment.