Apply Upstream code (2021-03-15)
[platform/upstream/connectedhomeip.git] / examples / bridge-app / bridge-common / gen / endpoint_config.h
1 /*
2  *
3  *    Copyright (c) 2021 Project CHIP Authors
4  *
5  *    Licensed under the Apache License, Version 2.0 (the "License");
6  *    you may not use this file except in compliance with the License.
7  *    You may obtain a copy of the License at
8  *
9  *        http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *    Unless required by applicable law or agreed to in writing, software
12  *    distributed under the License is distributed on an "AS IS" BASIS,
13  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *    See the License for the specific language governing permissions and
15  *    limitations under the License.
16  */
17
18 // THIS FILE IS GENERATED BY ZAP
19
20 // Prevent multiple inclusion
21 #pragma once
22
23 // Default values for the attributes longer than a pointer,
24 // in a form of a binary blob
25 // Separate block is generated for big-endian and little-endian cases.
26 #if BIGENDIAN_CPU
27 #define GENERATED_DEFAULTS                                                                                                         \
28     {                                                                                                                              \
29         /* 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  \
30             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                          \
31             /* Default for cluster: "Basic", attribute: "VendorName". side: server, big-endian */ /* 32 */ 0x00, 0x00, 0x00, 0x00, \
32             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
33             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                                  \
34             /* Default for cluster: "Basic", attribute: "ProductName". side: server, big-endian */ /* 64 */ 0x00, 0x00, 0x00,      \
35             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
36             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                            \
37             /* Default for cluster: "Basic", attribute: "UserLabel". side: server, big-endian */ /* 96 */ 0x00, 0x00, 0x00, 0x00,  \
38             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                \
39             /* Default for cluster: "Basic", attribute: "Location". side: server, big-endian */ /* 112 */ 0x00, 0x00, 0x00, 0x00,  \
40             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
41             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
42             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
43             0x00, 0x00, 0x00,                                                                                                      \
44             /* Default for cluster: "Basic", attribute: "HardwareVersionString". side: server, big-endian */ /* 176 */ 0x00, 0x00, \
45             0x00, 0x00, /* Default for cluster: "Basic", attribute: "SoftwareVersion". side: server, big-endian */ /* 180 */ 0x00, \
46             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
47             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
48             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
49             0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                                                    \
50             /* Default for cluster: "Basic", attribute: "SoftwareVersionString". side: server, big-endian */ /* 244 */ 0x00, 0x00, \
51             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
52             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                      \
53             /* Default for cluster: "Basic", attribute: "VendorName". side: server, big-endian */ /* 276 */ 0x00, 0x00, 0x00,      \
54             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
55             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                            \
56             /* Default for cluster: "Basic", attribute: "ProductName". side: server, big-endian */ /* 308 */ 0x00, 0x00, 0x00,     \
57             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
58             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                            \
59             /* Default for cluster: "Basic", attribute: "UserLabel". side: server, big-endian */ /* 340 */ 0x00, 0x00, 0x00, 0x00, \
60             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                \
61             /* Default for cluster: "Basic", attribute: "Location". side: server, big-endian */ /* 356 */ 0x00, 0x00, 0x00, 0x00,  \
62             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
63             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
64             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
65             0x00, 0x00, 0x00,                                                                                                      \
66             /* Default for cluster: "Basic", attribute: "HardwareVersionString". side: server, big-endian */ /* 420 */ 0x00, 0x00, \
67             0x00, 0x00, /* Default for cluster: "Basic", attribute: "SoftwareVersion". side: server, big-endian */ /* 424 */ 0x00, \
68             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
69             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
70             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
71             0x00, 0x00, 0x00, 0x00, 0x00,                                                                                          \
72             0x00, /* Default for cluster: "Basic", attribute: "SoftwareVersionString". side: server, big-endian */                 \
73     }
74
75 #else // !BIGENDIAN_CPU
76 #define GENERATED_DEFAULTS                                                                                                         \
77     {                                                                                                                              \
78         /* 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  \
79             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                          \
80             /* Default for cluster: "Basic", attribute: "VendorName". side: server, little-endian */ /* 32 */ 0x00, 0x00, 0x00,    \
81             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
82             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                            \
83             /* Default for cluster: "Basic", attribute: "ProductName". side: server, little-endian */ /* 64 */ 0x00, 0x00, 0x00,   \
84             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
85             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                            \
86             /* Default for cluster: "Basic", attribute: "UserLabel". side: server, little-endian */ /* 96 */ 0x00, 0x00, 0x00,     \
87             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                          \
88             /* Default for cluster: "Basic", attribute: "Location". side: server, little-endian */ /* 112 */ 0x00, 0x00, 0x00,     \
89             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
90             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
91             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
92             0x00, 0x00, 0x00, 0x00,                                                                                                \
93             /* Default for cluster: "Basic", attribute: "HardwareVersionString". side: server, little-endian */ /* 176 */          \
94             0x00, 0x00, 0x00, 0x00,                                                                                                \
95             /* Default for cluster: "Basic", attribute: "SoftwareVersion". side: server, little-endian */ /* 180 */ 0x00, 0x00,    \
96             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
97             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
98             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
99             0x00, 0x00, 0x00, 0x00, 0x00,                                                                                          \
100             /* Default for cluster: "Basic", attribute: "SoftwareVersionString". side: server, little-endian */ /* 244 */          \
101             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
102             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                          \
103             /* Default for cluster: "Basic", attribute: "VendorName". side: server, little-endian */ /* 276 */ 0x00, 0x00, 0x00,   \
104             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
105             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                            \
106             /* Default for cluster: "Basic", attribute: "ProductName". side: server, little-endian */ /* 308 */ 0x00, 0x00, 0x00,  \
107             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
108             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                            \
109             /* Default for cluster: "Basic", attribute: "UserLabel". side: server, little-endian */ /* 340 */ 0x00, 0x00, 0x00,    \
110             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                          \
111             /* Default for cluster: "Basic", attribute: "Location". side: server, little-endian */ /* 356 */ 0x00, 0x00, 0x00,     \
112             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
113             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
114             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
115             0x00, 0x00, 0x00, 0x00,                                                                                                \
116             /* Default for cluster: "Basic", attribute: "HardwareVersionString". side: server, little-endian */ /* 420 */          \
117             0x00, 0x00, 0x00, 0x00,                                                                                                \
118             /* Default for cluster: "Basic", attribute: "SoftwareVersion". side: server, little-endian */ /* 424 */ 0x00, 0x00,    \
119             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
120             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
121             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      \
122             0x00, 0x00, 0x00, 0x00,                                                                                                \
123             0x00, /* Default for cluster: "Basic", attribute: "SoftwareVersionString". side: server, little-endian */              \
124     }
125
126 #endif // BIGENDIAN_CPU
127
128 #define GENERATED_DEFAULTS_COUNT (14)
129
130 #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE
131 #define ZAP_LONG_DEFAULTS_INDEX(index)                                                                                             \
132     {                                                                                                                              \
133         (uint8_t *) (&generatedDefaults[index])                                                                                    \
134     }
135 #define ZAP_MIN_MAX_DEFAULTS_INDEX(index)                                                                                          \
136     {                                                                                                                              \
137         (uint8_t *) (&minMaxDefault[index])                                                                                        \
138     }
139
140 // This is an array of EmberAfAttributeMinMaxValue structures.
141 #define GENERATED_MIN_MAX_DEFAULT_COUNT 0
142 #define GENERATED_MIN_MAX_DEFAULTS                                                                                                 \
143     {                                                                                                                              \
144     }
145
146 #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask
147 // This is an array of EmberAfAttributeMetadata structures.
148 #define GENERATED_ATTRIBUTE_COUNT 50
149 #define GENERATED_ATTRIBUTES                                                                                                       \
150     {                                                                                                                              \
151         { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, { (uint8_t *) 2 } },         /* On/off (server): cluster revision */                     \
152             { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, { (uint8_t *) 0x00 } }, /* On/off (server): on/off */                               \
153             { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, { (uint8_t *) 3 } },     /* Level Control (server): cluster revision */              \
154             { 0x0000, ZAP_TYPE(INT8U), 1, 0, { (uint8_t *) 0x00 } },   /* Level Control (server): current level */                 \
155             {                                                                                                                      \
156                 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 3 }                                      \
157             }, /* Basic (server): cluster revision */                                                                              \
158             {                                                                                                                      \
159                 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0 }                                      \
160             }, /* Basic (server): InteractionModelVersion */                                                                       \
161             {                                                                                                                      \
162                 0x0001, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(0) }       \
163             },                                                                                 /* Basic (server): VendorName */    \
164             { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0 } }, /* Basic (server): VendorID */      \
165             {                                                                                                                      \
166                 0x0003, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(32) }      \
167             },                                                                                 /* Basic (server): ProductName */   \
168             { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0 } }, /* Basic (server): ProductID */     \
169             { 0x0005,                                                                                                              \
170               ZAP_TYPE(CHAR_STRING),                                                                                               \
171               32,                                                                                                                  \
172               ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE),                                                        \
173               { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(64) } }, /* Basic (server): UserLabel */                                       \
174             { 0x0006,                                                                                                              \
175               ZAP_TYPE(CHAR_STRING),                                                                                               \
176               16,                                                                                                                  \
177               ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE),                                                        \
178               { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(96) } }, /* Basic (server): Location */                                        \
179             {                                                                                                                      \
180                 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0x00 }                                   \
181             }, /* Basic (server): HardwareVersion */                                                                               \
182             {                                                                                                                      \
183                 0x0008, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(112) }     \
184             }, /* Basic (server): HardwareVersionString */                                                                         \
185             {                                                                                                                      \
186                 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(176) }           \
187             }, /* Basic (server): SoftwareVersion */                                                                               \
188             {                                                                                                                      \
189                 0x000A, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(180) }     \
190             },                                                         /* Basic (server): SoftwareVersionString */                 \
191             { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, { (uint8_t *) 2 } },     /* On/off (server): cluster revision */                     \
192             { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, { (uint8_t *) 0x00 } }, /* On/off (server): on/off */                               \
193             {                                                                                                                      \
194                 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0 }                                        \
195             },                                                         /* On/off (server): start up on off */                      \
196             { 0x4000, ZAP_TYPE(BOOLEAN), 1, 0, { (uint8_t *) 0x01 } }, /* On/off (server): global scene control */                 \
197             { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0x0000 } }, /* On/off (server): on time */  \
198             {                                                                                                                      \
199                 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0x0000 }                                  \
200             },                                                          /* On/off (server): off wait time */                       \
201             { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, { (uint8_t *) 3 } },      /* Level Control (server): cluster revision */             \
202             { 0x0000, ZAP_TYPE(INT8U), 1, 0, { (uint8_t *) 0x00 } },    /* Level Control (server): current level */                \
203             { 0x0001, ZAP_TYPE(INT16U), 2, 0, { (uint8_t *) 0x0000 } }, /* Level Control (server): remaining time */               \
204             {                                                                                                                      \
205                 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0x00 }                                   \
206             }, /* Level Control (server): options */                                                                               \
207             {                                                                                                                      \
208                 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0 }                                        \
209             }, /* Level Control (server): start up current level */                                                                \
210             {                                                                                                                      \
211                 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 3 }                                      \
212             }, /* Basic (server): cluster revision */                                                                              \
213             {                                                                                                                      \
214                 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0 }                                      \
215             }, /* Basic (server): InteractionModelVersion */                                                                       \
216             {                                                                                                                      \
217                 0x0001, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(244) }     \
218             },                                                                                 /* Basic (server): VendorName */    \
219             { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0 } }, /* Basic (server): VendorID */      \
220             {                                                                                                                      \
221                 0x0003, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(276) }     \
222             },                                                                                 /* Basic (server): ProductName */   \
223             { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0 } }, /* Basic (server): ProductID */     \
224             { 0x0005,                                                                                                              \
225               ZAP_TYPE(CHAR_STRING),                                                                                               \
226               32,                                                                                                                  \
227               ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE),                                                        \
228               { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(308) } }, /* Basic (server): UserLabel */                                      \
229             { 0x0006,                                                                                                              \
230               ZAP_TYPE(CHAR_STRING),                                                                                               \
231               16,                                                                                                                  \
232               ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE),                                                        \
233               { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(340) } }, /* Basic (server): Location */                                       \
234             {                                                                                                                      \
235                 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0x00 }                                   \
236             }, /* Basic (server): HardwareVersion */                                                                               \
237             {                                                                                                                      \
238                 0x0008, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(356) }     \
239             }, /* Basic (server): HardwareVersionString */                                                                         \
240             {                                                                                                                      \
241                 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(420) }           \
242             }, /* Basic (server): SoftwareVersion */                                                                               \
243             {                                                                                                                      \
244                 0x000A, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(424) }     \
245             },                                                         /* Basic (server): SoftwareVersionString */                 \
246             { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, { (uint8_t *) 2 } },     /* On/off (server): cluster revision */                     \
247             { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, { (uint8_t *) 0x00 } }, /* On/off (server): on/off */                               \
248             {                                                                                                                      \
249                 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0 }                                        \
250             },                                                         /* On/off (server): start up on off */                      \
251             { 0x4000, ZAP_TYPE(BOOLEAN), 1, 0, { (uint8_t *) 0x01 } }, /* On/off (server): global scene control */                 \
252             { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0x0000 } }, /* On/off (server): on time */  \
253             {                                                                                                                      \
254                 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0x0000 }                                  \
255             },                                                          /* On/off (server): off wait time */                       \
256             { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, { (uint8_t *) 3 } },      /* Level Control (server): cluster revision */             \
257             { 0x0000, ZAP_TYPE(INT8U), 1, 0, { (uint8_t *) 0x00 } },    /* Level Control (server): current level */                \
258             { 0x0001, ZAP_TYPE(INT16U), 2, 0, { (uint8_t *) 0x0000 } }, /* Level Control (server): remaining time */               \
259             {                                                                                                                      \
260                 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0x00 }                                   \
261             }, /* Level Control (server): options */                                                                               \
262             {                                                                                                                      \
263                 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0 }                                        \
264             }, /* Level Control (server): start up current level */                                                                \
265     }
266
267 // This is an array of EmberAfCluster structures.
268 #define ZAP_ATTRIBUTE_INDEX(index) ((EmberAfAttributeMetadata *) (&generatedAttributes[index]))
269
270 // Cluster function static arrays
271 #define GENERATED_FUNCTION_ARRAYS                                                                                                  \
272     const EmberAfGenericClusterFunction chipFuncArrayOnOffServer[] = {                                                             \
273         (EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback,                                                     \
274     };                                                                                                                             \
275     const EmberAfGenericClusterFunction chipFuncArrayLevelControlServer[] = {                                                      \
276         (EmberAfGenericClusterFunction) emberAfLevelControlClusterServerInitCallback,                                              \
277     };
278
279 #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask
280 #define GENERATED_CLUSTER_COUNT 8
281 #define GENERATED_CLUSTERS                                                                                                         \
282     {                                                                                                                              \
283         {                                                                                                                          \
284             0x0006,                                                                                                                \
285             ZAP_ATTRIBUTE_INDEX(0),                                                                                                \
286             2,                                                                                                                     \
287             3,                                                                                                                     \
288             ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION),                                                            \
289             chipFuncArrayOnOffServer                                                                                               \
290         }, /* Endpoint: 1, Cluster: On/off (server) */                                                                             \
291             { 0x0008,                                                                                                              \
292               ZAP_ATTRIBUTE_INDEX(2),                                                                                              \
293               2,                                                                                                                   \
294               3,                                                                                                                   \
295               ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION),                                                          \
296               chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */                                \
297             {                                                                                                                      \
298                 0x0028, ZAP_ATTRIBUTE_INDEX(4), 12, 254, ZAP_CLUSTER_MASK(SERVER), NULL                                            \
299             }, /* Endpoint: 1, Cluster: Basic (server) */                                                                          \
300             { 0x0006,                                                                                                              \
301               ZAP_ATTRIBUTE_INDEX(16),                                                                                             \
302               6,                                                                                                                   \
303               9,                                                                                                                   \
304               ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION),                                                          \
305               chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/off (server) */                                              \
306             { 0x0008,                                                                                                              \
307               ZAP_ATTRIBUTE_INDEX(22),                                                                                             \
308               5,                                                                                                                   \
309               7,                                                                                                                   \
310               ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION),                                                          \
311               chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */                                \
312             {                                                                                                                      \
313                 0x0028, ZAP_ATTRIBUTE_INDEX(27), 12, 254, ZAP_CLUSTER_MASK(SERVER), NULL                                           \
314             }, /* Endpoint: 2, Cluster: Basic (server) */                                                                          \
315             { 0x0006,                                                                                                              \
316               ZAP_ATTRIBUTE_INDEX(39),                                                                                             \
317               6,                                                                                                                   \
318               9,                                                                                                                   \
319               ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION),                                                          \
320               chipFuncArrayOnOffServer }, /* Endpoint: 3, Cluster: On/off (server) */                                              \
321             { 0x0008,                                                                                                              \
322               ZAP_ATTRIBUTE_INDEX(45),                                                                                             \
323               5,                                                                                                                   \
324               7,                                                                                                                   \
325               ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION),                                                          \
326               chipFuncArrayLevelControlServer }, /* Endpoint: 3, Cluster: Level Control (server) */                                \
327     }
328
329 #define ZAP_CLUSTER_INDEX(index) ((EmberAfCluster *) (&generatedClusters[index]))
330
331 // This is an array of EmberAfEndpointType structures.
332 #define GENERATED_ENDPOINT_TYPES                                                                                                   \
333     {                                                                                                                              \
334         { ZAP_CLUSTER_INDEX(0), 0, 0 }, { ZAP_CLUSTER_INDEX(0), 3, 260 }, { ZAP_CLUSTER_INDEX(3), 3, 270 },                        \
335             { ZAP_CLUSTER_INDEX(6), 2, 16 },                                                                                       \
336     }
337
338 // Largest attribute size is needed for various buffers
339 #define ATTRIBUTE_LARGEST (64)
340
341 // Total size of singleton attributes
342 #define ATTRIBUTE_SINGLETONS_SIZE (508)
343
344 // Total size of attribute storage
345 #define ATTRIBUTE_MAX_SIZE (546)
346
347 // Number of fixed endpoints
348 #define FIXED_ENDPOINT_COUNT (4)
349
350 // Array of endpoints that are supported, the data inside
351 // the array is the endpoint number.
352 #define FIXED_ENDPOINT_ARRAY                                                                                                       \
353     {                                                                                                                              \
354         0x0000, 0x0001, 0x0002, 0x0003                                                                                             \
355     }
356
357 // Array of profile ids
358 #define FIXED_PROFILE_IDS                                                                                                          \
359     {                                                                                                                              \
360         0xABCD, 0x0104, 0x0104, 0x0104                                                                                             \
361     }
362
363 // Array of device ids
364 #define FIXED_DEVICE_IDS                                                                                                           \
365     {                                                                                                                              \
366         0, 0, 0, 0                                                                                                                 \
367     }
368
369 // Array of device versions
370 #define FIXED_DEVICE_VERSIONS                                                                                                      \
371     {                                                                                                                              \
372         1, 1, 1, 1                                                                                                                 \
373     }
374
375 // Array of endpoint types supported on each endpoint
376 #define FIXED_ENDPOINT_TYPES                                                                                                       \
377     {                                                                                                                              \
378         0, 1, 2, 3                                                                                                                 \
379     }
380
381 // Array of networks supported on each endpoint
382 #define FIXED_NETWORKS                                                                                                             \
383     {                                                                                                                              \
384         0, 0, 0, 0                                                                                                                 \
385     }
386
387 // Array of EmberAfCommandMetadata structs.
388 #define ZAP_COMMAND_MASK(mask) COMMAND_MASK_##mask
389 #define EMBER_AF_GENERATED_COMMAND_COUNT (45)
390 #define GENERATED_COMMANDS                                                                                                         \
391     {                                                                                                                              \
392         { 0x0006, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) },     /* On/off (server): Off */                                        \
393             { 0x0006, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): Off */                                        \
394             { 0x0006, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): Off */                                        \
395             { 0x0006, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): On */                                         \
396             { 0x0006, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): On */                                         \
397             { 0x0006, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): On */                                         \
398             { 0x0006, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): Toggle */                                     \
399             { 0x0006, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): Toggle */                                     \
400             { 0x0006, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): Toggle */                                     \
401             { 0x0006, 0x40, 0 },                                 /* On/off (server): OffWithEffect */                              \
402             { 0x0006, 0x40, 0 },                                 /* On/off (server): OffWithEffect */                              \
403             { 0x0006, 0x41, 0 },                                 /* On/off (server): OnWithRecallGlobalScene */                    \
404             { 0x0006, 0x41, 0 },                                 /* On/off (server): OnWithRecallGlobalScene */                    \
405             { 0x0006, 0x42, 0 },                                 /* On/off (server): OnWithTimedOff */                             \
406             { 0x0006, 0x42, 0 },                                 /* On/off (server): OnWithTimedOff */                             \
407             { 0x0008, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): MoveToLevel */                         \
408             { 0x0008, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): MoveToLevel */                         \
409             { 0x0008, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): MoveToLevel */                         \
410             { 0x0008, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): Move */                                \
411             { 0x0008, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): Move */                                \
412             { 0x0008, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): Move */                                \
413             { 0x0008, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): Step */                                \
414             { 0x0008, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): Step */                                \
415             { 0x0008, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): Step */                                \
416             { 0x0008, 0x03, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): Stop */                                \
417             { 0x0008, 0x03, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): Stop */                                \
418             { 0x0008, 0x03, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): Stop */                                \
419             { 0x0008, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): MoveToLevelWithOnOff */                \
420             { 0x0008, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): MoveToLevelWithOnOff */                \
421             { 0x0008, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): MoveToLevelWithOnOff */                \
422             { 0x0008, 0x05, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): MoveWithOnOff */                       \
423             { 0x0008, 0x05, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): MoveWithOnOff */                       \
424             { 0x0008, 0x05, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): MoveWithOnOff */                       \
425             { 0x0008, 0x06, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): StepWithOnOff */                       \
426             { 0x0008, 0x06, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): StepWithOnOff */                       \
427             { 0x0008, 0x06, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): StepWithOnOff */                       \
428             { 0x0008, 0x07, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): StopWithOnOff */                       \
429             { 0x0008, 0x07, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): StopWithOnOff */                       \
430             { 0x0008, 0x07, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): StopWithOnOff */                       \
431             { 0x0028, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* Basic (server): StartUp */                                     \
432             { 0x0028, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* Basic (server): StartUp */                                     \
433             { 0x0028, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* Basic (server): ShutDown */                                    \
434             { 0x0028, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* Basic (server): ShutDown */                                    \
435             { 0x0028, 0x02, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* Basic (server): Leave */                                       \
436             { 0x0028, 0x02, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* Basic (server): Leave */                                       \
437     }
438
439 // Array of EmberAfManufacturerCodeEntry structures for commands.
440 #define GENERATED_COMMAND_MANUFACTURER_CODE_COUNT (0)
441 #define GENERATED_COMMAND_MANUFACTURER_CODES                                                                                       \
442     {                                                                                                                              \
443         {                                                                                                                          \
444             0x00, 0x00                                                                                                             \
445         }                                                                                                                          \
446     }
447
448 // This is an array of EmberAfManufacturerCodeEntry structures for clusters.
449 #define GENERATED_CLUSTER_MANUFACTURER_CODE_COUNT (0)
450 #define GENERATED_CLUSTER_MANUFACTURER_CODES                                                                                       \
451     {                                                                                                                              \
452         {                                                                                                                          \
453             0x00, 0x00                                                                                                             \
454         }                                                                                                                          \
455     }
456
457 // This is an array of EmberAfManufacturerCodeEntry structures for attributes.
458 #define GENERATED_ATTRIBUTE_MANUFACTURER_CODE_COUNT (0)
459 #define GENERATED_ATTRIBUTE_MANUFACTURER_CODES                                                                                     \
460     {                                                                                                                              \
461         {                                                                                                                          \
462             0x00, 0x00                                                                                                             \
463         }                                                                                                                          \
464     }
465
466 // Array of EmberAfPluginReportingEntry structures.
467 #define ZRD(x) EMBER_ZCL_REPORTING_DIRECTION_##x
468 #define ZAP_REPORT_DIRECTION(x) ZRD(x)
469
470 // Use this macro to check if Reporting plugin is included
471 #define EMBER_AF_PLUGIN_REPORTING
472 // User options for plugin Reporting
473 #define EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE (2)
474 #define EMBER_AF_PLUGIN_REPORTING_ENABLE_GROUP_BOUND_REPORTS
475
476 #define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS_TABLE_SIZE (2)
477 #define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS                                                                               \
478     {                                                                                                                              \
479         {                                                                                                                          \
480             ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0006, 0x0000, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } }          \
481         }, /* Reporting for cluster: "On/off", attribute: "on/off". side: server */                                                \
482             {                                                                                                                      \
483                 ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0008, 0x0000, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } }      \
484             }, /* Reporting for cluster: "Level Control", attribute: "current level". side: server */                              \
485     }