Change script for apply upstream code
[platform/upstream/connectedhomeip.git] / src / app / zap-templates / print-cluster.zapt
1 {{chip_header}}
2
3 // Prevent multiple inclusion
4 #pragma once
5
6 // This is the mapping of IDs to cluster names assuming a format according
7 // to the "EmberAfClusterName" defined in the ZCL header.
8 // The names of clusters that are not present, are removed.
9
10 {{#zcl_clusters}}
11 #if defined(ZCL_USING_{{asDelimitedMacro this.define}}_SERVER) || defined(ZCL_USING_{{asDelimitedMacro this.define}}_CLIENT)
12     #define CHIP_PRINTCLUSTER_{{asDelimitedMacro this.define}} {ZCL_{{asDelimitedMacro this.define}}_ID, {{this.code}}, "{{this.label}}" },
13 #else
14     #define CHIP_PRINTCLUSTER_{{asDelimitedMacro this.define}}
15 #endif
16
17 {{/zcl_clusters}}
18
19 #define CLUSTER_IDS_TO_NAMES \
20 {{#zcl_clusters}}
21     CHIP_PRINTCLUSTER_{{asDelimitedMacro this.define}} \
22 {{/zcl_clusters}}
23
24 #define MAX_CLUSTER_NAME_LENGTH  {{zcl_cluster_largest_label_length}}