Change script for apply upstream code
[platform/upstream/connectedhomeip.git] / src / app / zap-templates / af-structs.zapt
1 {{chip_header}}
2
3 // Prevent multiple inclusion
4 #pragma once
5
6 #include <stdint.h>
7 #include "basic-types.h"
8 #include "enums.h"
9
10 {{#zcl_structs}}
11
12 // Struct for {{label}}
13 typedef struct _{{asType label}} {
14 {{#zcl_struct_items}}
15 {{#if (isStrEqual label "endpoint")}}
16 {{ident}}chip::EndpointId {{asSymbol label}};
17 {{else if (isStrEqual label "endpointId")}}
18 {{ident}}chip::EndpointId {{asSymbol label}};
19 {{else if (isStrEqual type "CLUSTER_ID")}}
20 {{ident}}chip::ClusterId {{asSymbol label}};
21 {{else if (isStrEqual type "ATTRIBUTE_ID")}}
22 {{ident}}chip::AttributeId {{asSymbol label}};
23 {{else if (isStrEqual label "groupId")}}
24 {{ident}}chip::GroupId {{asSymbol label}};
25 {{else if (isStrEqual label "commandId")}}
26 {{ident}}chip::CommandId {{asSymbol label}};
27 {{else}}
28 {{ident}}{{asUnderlyingType type}} {{asSymbol label}};
29 {{/if}}
30 {{/zcl_struct_items}}
31 } {{asUnderlyingType label}};
32 {{/zcl_structs}}