3 * Copyright (c) 2021 Project CHIP Authors
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 // THIS FILE IS GENERATED BY ZAP
20 // Prevent multiple inclusion
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.
27 #define GENERATED_DEFAULTS \
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, \
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, \
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 */ \
75 #else // !BIGENDIAN_CPU
76 #define GENERATED_DEFAULTS \
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 */ \
126 #endif // BIGENDIAN_CPU
128 #define GENERATED_DEFAULTS_COUNT (14)
130 #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE
131 #define ZAP_LONG_DEFAULTS_INDEX(index) \
133 (uint8_t *) (&generatedDefaults[index]) \
135 #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \
137 (uint8_t *) (&minMaxDefault[index]) \
140 // This is an array of EmberAfAttributeMinMaxValue structures.
141 #define GENERATED_MIN_MAX_DEFAULT_COUNT 0
142 #define GENERATED_MIN_MAX_DEFAULTS \
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 \
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 */ \
156 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 3 } \
157 }, /* Basic (server): cluster revision */ \
159 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0 } \
160 }, /* Basic (server): InteractionModelVersion */ \
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 */ \
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 */ \
170 ZAP_TYPE(CHAR_STRING), \
172 ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \
173 { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(64) } }, /* Basic (server): UserLabel */ \
175 ZAP_TYPE(CHAR_STRING), \
177 ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \
178 { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(96) } }, /* Basic (server): Location */ \
180 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0x00 } \
181 }, /* Basic (server): HardwareVersion */ \
183 0x0008, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(112) } \
184 }, /* Basic (server): HardwareVersionString */ \
186 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(176) } \
187 }, /* Basic (server): SoftwareVersion */ \
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 */ \
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 */ \
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 */ \
205 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0x00 } \
206 }, /* Level Control (server): options */ \
208 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0 } \
209 }, /* Level Control (server): start up current level */ \
211 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 3 } \
212 }, /* Basic (server): cluster revision */ \
214 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0 } \
215 }, /* Basic (server): InteractionModelVersion */ \
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 */ \
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 */ \
225 ZAP_TYPE(CHAR_STRING), \
227 ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \
228 { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(308) } }, /* Basic (server): UserLabel */ \
230 ZAP_TYPE(CHAR_STRING), \
232 ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \
233 { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(340) } }, /* Basic (server): Location */ \
235 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) 0x00 } \
236 }, /* Basic (server): HardwareVersion */ \
238 0x0008, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(356) } \
239 }, /* Basic (server): HardwareVersionString */ \
241 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), { (uint8_t *) ZAP_LONG_DEFAULTS_INDEX(420) } \
242 }, /* Basic (server): SoftwareVersion */ \
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 */ \
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 */ \
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 */ \
260 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0x00 } \
261 }, /* Level Control (server): options */ \
263 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), { (uint8_t *) 0 } \
264 }, /* Level Control (server): start up current level */ \
267 // This is an array of EmberAfCluster structures.
268 #define ZAP_ATTRIBUTE_INDEX(index) ((EmberAfAttributeMetadata *) (&generatedAttributes[index]))
270 // Cluster function static arrays
271 #define GENERATED_FUNCTION_ARRAYS \
272 const EmberAfGenericClusterFunction chipFuncArrayOnOffServer[] = { \
273 (EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback, \
275 const EmberAfGenericClusterFunction chipFuncArrayLevelControlServer[] = { \
276 (EmberAfGenericClusterFunction) emberAfLevelControlClusterServerInitCallback, \
279 #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask
280 #define GENERATED_CLUSTER_COUNT 8
281 #define GENERATED_CLUSTERS \
285 ZAP_ATTRIBUTE_INDEX(0), \
288 ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \
289 chipFuncArrayOnOffServer \
290 }, /* Endpoint: 1, Cluster: On/off (server) */ \
292 ZAP_ATTRIBUTE_INDEX(2), \
295 ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \
296 chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \
298 0x0028, ZAP_ATTRIBUTE_INDEX(4), 12, 254, ZAP_CLUSTER_MASK(SERVER), NULL \
299 }, /* Endpoint: 1, Cluster: Basic (server) */ \
301 ZAP_ATTRIBUTE_INDEX(16), \
304 ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \
305 chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/off (server) */ \
307 ZAP_ATTRIBUTE_INDEX(22), \
310 ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \
311 chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \
313 0x0028, ZAP_ATTRIBUTE_INDEX(27), 12, 254, ZAP_CLUSTER_MASK(SERVER), NULL \
314 }, /* Endpoint: 2, Cluster: Basic (server) */ \
316 ZAP_ATTRIBUTE_INDEX(39), \
319 ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \
320 chipFuncArrayOnOffServer }, /* Endpoint: 3, Cluster: On/off (server) */ \
322 ZAP_ATTRIBUTE_INDEX(45), \
325 ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \
326 chipFuncArrayLevelControlServer }, /* Endpoint: 3, Cluster: Level Control (server) */ \
329 #define ZAP_CLUSTER_INDEX(index) ((EmberAfCluster *) (&generatedClusters[index]))
331 // This is an array of EmberAfEndpointType structures.
332 #define GENERATED_ENDPOINT_TYPES \
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 }, \
338 // Largest attribute size is needed for various buffers
339 #define ATTRIBUTE_LARGEST (64)
341 // Total size of singleton attributes
342 #define ATTRIBUTE_SINGLETONS_SIZE (508)
344 // Total size of attribute storage
345 #define ATTRIBUTE_MAX_SIZE (546)
347 // Number of fixed endpoints
348 #define FIXED_ENDPOINT_COUNT (4)
350 // Array of endpoints that are supported, the data inside
351 // the array is the endpoint number.
352 #define FIXED_ENDPOINT_ARRAY \
354 0x0000, 0x0001, 0x0002, 0x0003 \
357 // Array of profile ids
358 #define FIXED_PROFILE_IDS \
360 0xABCD, 0x0104, 0x0104, 0x0104 \
363 // Array of device ids
364 #define FIXED_DEVICE_IDS \
369 // Array of device versions
370 #define FIXED_DEVICE_VERSIONS \
375 // Array of endpoint types supported on each endpoint
376 #define FIXED_ENDPOINT_TYPES \
381 // Array of networks supported on each endpoint
382 #define FIXED_NETWORKS \
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 \
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 */ \
439 // Array of EmberAfManufacturerCodeEntry structures for commands.
440 #define GENERATED_COMMAND_MANUFACTURER_CODE_COUNT (0)
441 #define GENERATED_COMMAND_MANUFACTURER_CODES \
448 // This is an array of EmberAfManufacturerCodeEntry structures for clusters.
449 #define GENERATED_CLUSTER_MANUFACTURER_CODE_COUNT (0)
450 #define GENERATED_CLUSTER_MANUFACTURER_CODES \
457 // This is an array of EmberAfManufacturerCodeEntry structures for attributes.
458 #define GENERATED_ATTRIBUTE_MANUFACTURER_CODE_COUNT (0)
459 #define GENERATED_ATTRIBUTE_MANUFACTURER_CODES \
466 // Array of EmberAfPluginReportingEntry structures.
467 #define ZRD(x) EMBER_ZCL_REPORTING_DIRECTION_##x
468 #define ZAP_REPORT_DIRECTION(x) ZRD(x)
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
476 #define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS_TABLE_SIZE (2)
477 #define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS \
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 */ \
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 */ \