Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / controller / python / chip / clusters / CHIPClusters.cpp
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 #include <core/CHIPCore.h>
21
22 #include <app/CommandSender.h>
23 #include <app/InteractionModelEngine.h>
24 #include <lib/support/Span.h>
25
26 #include <controller/CHIPClusters.h>
27 #include <controller/CHIPDevice.h>
28
29 using namespace chip;
30 using namespace chip::app;
31
32 extern "C" {
33
34 // Cluster ApplicationBasic
35
36 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_VendorName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
37                                                               chip::GroupId ZCLgroupId)
38 {
39     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
40     chip::Controller::ApplicationBasicCluster cluster;
41     (void) ZCLgroupId;
42     cluster.Associate(device, ZCLendpointId);
43     return cluster.ReadAttributeVendorName(nullptr, nullptr);
44 }
45 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_VendorId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
46                                                             chip::GroupId ZCLgroupId)
47 {
48     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
49     chip::Controller::ApplicationBasicCluster cluster;
50     (void) ZCLgroupId;
51     cluster.Associate(device, ZCLendpointId);
52     return cluster.ReadAttributeVendorId(nullptr, nullptr);
53 }
54 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ApplicationName(chip::Controller::Device * device,
55                                                                    chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
56 {
57     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
58     chip::Controller::ApplicationBasicCluster cluster;
59     (void) ZCLgroupId;
60     cluster.Associate(device, ZCLendpointId);
61     return cluster.ReadAttributeApplicationName(nullptr, nullptr);
62 }
63 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ProductId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
64                                                              chip::GroupId ZCLgroupId)
65 {
66     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
67     chip::Controller::ApplicationBasicCluster cluster;
68     (void) ZCLgroupId;
69     cluster.Associate(device, ZCLendpointId);
70     return cluster.ReadAttributeProductId(nullptr, nullptr);
71 }
72 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ApplicationId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
73                                                                  chip::GroupId ZCLgroupId)
74 {
75     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
76     chip::Controller::ApplicationBasicCluster cluster;
77     (void) ZCLgroupId;
78     cluster.Associate(device, ZCLendpointId);
79     return cluster.ReadAttributeApplicationId(nullptr, nullptr);
80 }
81 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId(chip::Controller::Device * device,
82                                                                    chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
83 {
84     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
85     chip::Controller::ApplicationBasicCluster cluster;
86     (void) ZCLgroupId;
87     cluster.Associate(device, ZCLendpointId);
88     return cluster.ReadAttributeCatalogVendorId(nullptr, nullptr);
89 }
90 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ApplicationSatus(chip::Controller::Device * device,
91                                                                     chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
92 {
93     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
94     chip::Controller::ApplicationBasicCluster cluster;
95     (void) ZCLgroupId;
96     cluster.Associate(device, ZCLendpointId);
97     return cluster.ReadAttributeApplicationSatus(nullptr, nullptr);
98 }
99 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision(chip::Controller::Device * device,
100                                                                    chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
101 {
102     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
103     chip::Controller::ApplicationBasicCluster cluster;
104     (void) ZCLgroupId;
105     cluster.Associate(device, ZCLendpointId);
106     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
107 }
108
109 // End of Cluster ApplicationBasic
110 // Cluster BarrierControl
111
112 CHIP_ERROR chip_ime_AppendCommand_BarrierControl_BarrierControlGoToPercent(chip::Controller::Device * device,
113                                                                            chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
114                                                                            uint8_t percentOpen)
115 {
116     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
117     chip::Controller::BarrierControlCluster cluster;
118     (void) ZCLgroupId;
119     cluster.Associate(device, ZCLendpointId);
120     return cluster.BarrierControlGoToPercent(nullptr, nullptr, percentOpen);
121 }
122 CHIP_ERROR chip_ime_AppendCommand_BarrierControl_BarrierControlStop(chip::Controller::Device * device,
123                                                                     chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
124 {
125     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
126     chip::Controller::BarrierControlCluster cluster;
127     (void) ZCLgroupId;
128     cluster.Associate(device, ZCLendpointId);
129     return cluster.BarrierControlStop(nullptr, nullptr);
130 }
131
132 CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierMovingState(chip::Controller::Device * device,
133                                                                     chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
134 {
135     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
136     chip::Controller::BarrierControlCluster cluster;
137     (void) ZCLgroupId;
138     cluster.Associate(device, ZCLendpointId);
139     return cluster.ReadAttributeBarrierMovingState(nullptr, nullptr);
140 }
141 CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus(chip::Controller::Device * device,
142                                                                      chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
143 {
144     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
145     chip::Controller::BarrierControlCluster cluster;
146     (void) ZCLgroupId;
147     cluster.Associate(device, ZCLendpointId);
148     return cluster.ReadAttributeBarrierSafetyStatus(nullptr, nullptr);
149 }
150 CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities(chip::Controller::Device * device,
151                                                                      chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
152 {
153     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
154     chip::Controller::BarrierControlCluster cluster;
155     (void) ZCLgroupId;
156     cluster.Associate(device, ZCLendpointId);
157     return cluster.ReadAttributeBarrierCapabilities(nullptr, nullptr);
158 }
159 CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierPosition(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
160                                                                  chip::GroupId ZCLgroupId)
161 {
162     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
163     chip::Controller::BarrierControlCluster cluster;
164     (void) ZCLgroupId;
165     cluster.Associate(device, ZCLendpointId);
166     return cluster.ReadAttributeBarrierPosition(nullptr, nullptr);
167 }
168 CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
169                                                                  chip::GroupId ZCLgroupId)
170 {
171     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
172     chip::Controller::BarrierControlCluster cluster;
173     (void) ZCLgroupId;
174     cluster.Associate(device, ZCLendpointId);
175     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
176 }
177
178 // End of Cluster BarrierControl
179 // Cluster Basic
180
181 CHIP_ERROR chip_ime_AppendCommand_Basic_MfgSpecificPing(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
182                                                         chip::GroupId ZCLgroupId)
183 {
184     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
185     chip::Controller::BasicCluster cluster;
186     (void) ZCLgroupId;
187     cluster.Associate(device, ZCLendpointId);
188     return cluster.MfgSpecificPing(nullptr, nullptr);
189 }
190
191 CHIP_ERROR chip_ime_ReadAttribute_Basic_InteractionModelVersion(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
192                                                                 chip::GroupId ZCLgroupId)
193 {
194     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
195     chip::Controller::BasicCluster cluster;
196     (void) ZCLgroupId;
197     cluster.Associate(device, ZCLendpointId);
198     return cluster.ReadAttributeInteractionModelVersion(nullptr, nullptr);
199 }
200 CHIP_ERROR chip_ime_ReadAttribute_Basic_VendorName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
201                                                    chip::GroupId ZCLgroupId)
202 {
203     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
204     chip::Controller::BasicCluster cluster;
205     (void) ZCLgroupId;
206     cluster.Associate(device, ZCLendpointId);
207     return cluster.ReadAttributeVendorName(nullptr, nullptr);
208 }
209 CHIP_ERROR chip_ime_ReadAttribute_Basic_VendorID(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
210                                                  chip::GroupId ZCLgroupId)
211 {
212     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
213     chip::Controller::BasicCluster cluster;
214     (void) ZCLgroupId;
215     cluster.Associate(device, ZCLendpointId);
216     return cluster.ReadAttributeVendorID(nullptr, nullptr);
217 }
218 CHIP_ERROR chip_ime_ReadAttribute_Basic_ProductName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
219                                                     chip::GroupId ZCLgroupId)
220 {
221     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
222     chip::Controller::BasicCluster cluster;
223     (void) ZCLgroupId;
224     cluster.Associate(device, ZCLendpointId);
225     return cluster.ReadAttributeProductName(nullptr, nullptr);
226 }
227 CHIP_ERROR chip_ime_ReadAttribute_Basic_ProductID(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
228                                                   chip::GroupId ZCLgroupId)
229 {
230     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
231     chip::Controller::BasicCluster cluster;
232     (void) ZCLgroupId;
233     cluster.Associate(device, ZCLendpointId);
234     return cluster.ReadAttributeProductID(nullptr, nullptr);
235 }
236 CHIP_ERROR chip_ime_ReadAttribute_Basic_UserLabel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
237                                                   chip::GroupId ZCLgroupId)
238 {
239     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
240     chip::Controller::BasicCluster cluster;
241     (void) ZCLgroupId;
242     cluster.Associate(device, ZCLendpointId);
243     return cluster.ReadAttributeUserLabel(nullptr, nullptr);
244 }
245 CHIP_ERROR chip_ime_ReadAttribute_Basic_Location(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
246                                                  chip::GroupId ZCLgroupId)
247 {
248     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
249     chip::Controller::BasicCluster cluster;
250     (void) ZCLgroupId;
251     cluster.Associate(device, ZCLendpointId);
252     return cluster.ReadAttributeLocation(nullptr, nullptr);
253 }
254 CHIP_ERROR chip_ime_ReadAttribute_Basic_HardwareVersion(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
255                                                         chip::GroupId ZCLgroupId)
256 {
257     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
258     chip::Controller::BasicCluster cluster;
259     (void) ZCLgroupId;
260     cluster.Associate(device, ZCLendpointId);
261     return cluster.ReadAttributeHardwareVersion(nullptr, nullptr);
262 }
263 CHIP_ERROR chip_ime_ReadAttribute_Basic_HardwareVersionString(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
264                                                               chip::GroupId ZCLgroupId)
265 {
266     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
267     chip::Controller::BasicCluster cluster;
268     (void) ZCLgroupId;
269     cluster.Associate(device, ZCLendpointId);
270     return cluster.ReadAttributeHardwareVersionString(nullptr, nullptr);
271 }
272 CHIP_ERROR chip_ime_ReadAttribute_Basic_SoftwareVersion(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
273                                                         chip::GroupId ZCLgroupId)
274 {
275     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
276     chip::Controller::BasicCluster cluster;
277     (void) ZCLgroupId;
278     cluster.Associate(device, ZCLendpointId);
279     return cluster.ReadAttributeSoftwareVersion(nullptr, nullptr);
280 }
281 CHIP_ERROR chip_ime_ReadAttribute_Basic_SoftwareVersionString(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
282                                                               chip::GroupId ZCLgroupId)
283 {
284     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
285     chip::Controller::BasicCluster cluster;
286     (void) ZCLgroupId;
287     cluster.Associate(device, ZCLendpointId);
288     return cluster.ReadAttributeSoftwareVersionString(nullptr, nullptr);
289 }
290 CHIP_ERROR chip_ime_ReadAttribute_Basic_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
291                                                         chip::GroupId ZCLgroupId)
292 {
293     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
294     chip::Controller::BasicCluster cluster;
295     (void) ZCLgroupId;
296     cluster.Associate(device, ZCLendpointId);
297     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
298 }
299
300 // End of Cluster Basic
301 // Cluster Binding
302
303 CHIP_ERROR chip_ime_AppendCommand_Binding_Bind(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
304                                                chip::GroupId ZCLgroupId, chip::NodeId nodeId, chip::GroupId groupId,
305                                                chip::EndpointId endpointId, chip::ClusterId clusterId)
306 {
307     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
308     chip::Controller::BindingCluster cluster;
309     (void) ZCLgroupId;
310     cluster.Associate(device, ZCLendpointId);
311     return cluster.Bind(nullptr, nullptr, nodeId, groupId, endpointId, clusterId);
312 }
313 CHIP_ERROR chip_ime_AppendCommand_Binding_Unbind(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
314                                                  chip::GroupId ZCLgroupId, chip::NodeId nodeId, chip::GroupId groupId,
315                                                  chip::EndpointId endpointId, chip::ClusterId clusterId)
316 {
317     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
318     chip::Controller::BindingCluster cluster;
319     (void) ZCLgroupId;
320     cluster.Associate(device, ZCLendpointId);
321     return cluster.Unbind(nullptr, nullptr, nodeId, groupId, endpointId, clusterId);
322 }
323
324 CHIP_ERROR chip_ime_ReadAttribute_Binding_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
325                                                           chip::GroupId ZCLgroupId)
326 {
327     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
328     chip::Controller::BindingCluster cluster;
329     (void) ZCLgroupId;
330     cluster.Associate(device, ZCLendpointId);
331     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
332 }
333
334 // End of Cluster Binding
335 // Cluster ColorControl
336
337 CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveColor(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
338                                                          chip::GroupId ZCLgroupId, int16_t rateX, int16_t rateY,
339                                                          uint8_t optionsMask, uint8_t optionsOverride)
340 {
341     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
342     chip::Controller::ColorControlCluster cluster;
343     (void) ZCLgroupId;
344     cluster.Associate(device, ZCLendpointId);
345     return cluster.MoveColor(nullptr, nullptr, rateX, rateY, optionsMask, optionsOverride);
346 }
347 CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveColorTemperature(
348     chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId, uint8_t moveMode, uint16_t rate,
349     uint16_t colorTemperatureMinimum, uint16_t colorTemperatureMaximum, uint8_t optionsMask, uint8_t optionsOverride)
350 {
351     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
352     chip::Controller::ColorControlCluster cluster;
353     (void) ZCLgroupId;
354     cluster.Associate(device, ZCLendpointId);
355     return cluster.MoveColorTemperature(nullptr, nullptr, moveMode, rate, colorTemperatureMinimum, colorTemperatureMaximum,
356                                         optionsMask, optionsOverride);
357 }
358 CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
359                                                        chip::GroupId ZCLgroupId, uint8_t moveMode, uint8_t rate,
360                                                        uint8_t optionsMask, uint8_t optionsOverride)
361 {
362     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
363     chip::Controller::ColorControlCluster cluster;
364     (void) ZCLgroupId;
365     cluster.Associate(device, ZCLendpointId);
366     return cluster.MoveHue(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride);
367 }
368 CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveSaturation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
369                                                               chip::GroupId ZCLgroupId, uint8_t moveMode, uint8_t rate,
370                                                               uint8_t optionsMask, uint8_t optionsOverride)
371 {
372     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
373     chip::Controller::ColorControlCluster cluster;
374     (void) ZCLgroupId;
375     cluster.Associate(device, ZCLendpointId);
376     return cluster.MoveSaturation(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride);
377 }
378 CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveToColor(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
379                                                            chip::GroupId ZCLgroupId, uint16_t colorX, uint16_t colorY,
380                                                            uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride)
381 {
382     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
383     chip::Controller::ColorControlCluster cluster;
384     (void) ZCLgroupId;
385     cluster.Associate(device, ZCLendpointId);
386     return cluster.MoveToColor(nullptr, nullptr, colorX, colorY, transitionTime, optionsMask, optionsOverride);
387 }
388 CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveToColorTemperature(chip::Controller::Device * device,
389                                                                       chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
390                                                                       uint16_t colorTemperature, uint16_t transitionTime,
391                                                                       uint8_t optionsMask, uint8_t optionsOverride)
392 {
393     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
394     chip::Controller::ColorControlCluster cluster;
395     (void) ZCLgroupId;
396     cluster.Associate(device, ZCLendpointId);
397     return cluster.MoveToColorTemperature(nullptr, nullptr, colorTemperature, transitionTime, optionsMask, optionsOverride);
398 }
399 CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveToHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
400                                                          chip::GroupId ZCLgroupId, uint8_t hue, uint8_t direction,
401                                                          uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride)
402 {
403     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
404     chip::Controller::ColorControlCluster cluster;
405     (void) ZCLgroupId;
406     cluster.Associate(device, ZCLendpointId);
407     return cluster.MoveToHue(nullptr, nullptr, hue, direction, transitionTime, optionsMask, optionsOverride);
408 }
409 CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveToHueAndSaturation(chip::Controller::Device * device,
410                                                                       chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
411                                                                       uint8_t hue, uint8_t saturation, uint16_t transitionTime,
412                                                                       uint8_t optionsMask, uint8_t optionsOverride)
413 {
414     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
415     chip::Controller::ColorControlCluster cluster;
416     (void) ZCLgroupId;
417     cluster.Associate(device, ZCLendpointId);
418     return cluster.MoveToHueAndSaturation(nullptr, nullptr, hue, saturation, transitionTime, optionsMask, optionsOverride);
419 }
420 CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveToSaturation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
421                                                                 chip::GroupId ZCLgroupId, uint8_t saturation,
422                                                                 uint16_t transitionTime, uint8_t optionsMask,
423                                                                 uint8_t optionsOverride)
424 {
425     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
426     chip::Controller::ColorControlCluster cluster;
427     (void) ZCLgroupId;
428     cluster.Associate(device, ZCLendpointId);
429     return cluster.MoveToSaturation(nullptr, nullptr, saturation, transitionTime, optionsMask, optionsOverride);
430 }
431 CHIP_ERROR chip_ime_AppendCommand_ColorControl_StepColor(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
432                                                          chip::GroupId ZCLgroupId, int16_t stepX, int16_t stepY,
433                                                          uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride)
434 {
435     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
436     chip::Controller::ColorControlCluster cluster;
437     (void) ZCLgroupId;
438     cluster.Associate(device, ZCLendpointId);
439     return cluster.StepColor(nullptr, nullptr, stepX, stepY, transitionTime, optionsMask, optionsOverride);
440 }
441 CHIP_ERROR chip_ime_AppendCommand_ColorControl_StepColorTemperature(chip::Controller::Device * device,
442                                                                     chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
443                                                                     uint8_t stepMode, uint16_t stepSize, uint16_t transitionTime,
444                                                                     uint16_t colorTemperatureMinimum,
445                                                                     uint16_t colorTemperatureMaximum, uint8_t optionsMask,
446                                                                     uint8_t optionsOverride)
447 {
448     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
449     chip::Controller::ColorControlCluster cluster;
450     (void) ZCLgroupId;
451     cluster.Associate(device, ZCLendpointId);
452     return cluster.StepColorTemperature(nullptr, nullptr, stepMode, stepSize, transitionTime, colorTemperatureMinimum,
453                                         colorTemperatureMaximum, optionsMask, optionsOverride);
454 }
455 CHIP_ERROR chip_ime_AppendCommand_ColorControl_StepHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
456                                                        chip::GroupId ZCLgroupId, uint8_t stepMode, uint8_t stepSize,
457                                                        uint8_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride)
458 {
459     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
460     chip::Controller::ColorControlCluster cluster;
461     (void) ZCLgroupId;
462     cluster.Associate(device, ZCLendpointId);
463     return cluster.StepHue(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride);
464 }
465 CHIP_ERROR chip_ime_AppendCommand_ColorControl_StepSaturation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
466                                                               chip::GroupId ZCLgroupId, uint8_t stepMode, uint8_t stepSize,
467                                                               uint8_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride)
468 {
469     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
470     chip::Controller::ColorControlCluster cluster;
471     (void) ZCLgroupId;
472     cluster.Associate(device, ZCLendpointId);
473     return cluster.StepSaturation(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride);
474 }
475 CHIP_ERROR chip_ime_AppendCommand_ColorControl_StopMoveStep(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
476                                                             chip::GroupId ZCLgroupId, uint8_t optionsMask, uint8_t optionsOverride)
477 {
478     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
479     chip::Controller::ColorControlCluster cluster;
480     (void) ZCLgroupId;
481     cluster.Associate(device, ZCLendpointId);
482     return cluster.StopMoveStep(nullptr, nullptr, optionsMask, optionsOverride);
483 }
484
485 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
486                                                           chip::GroupId ZCLgroupId)
487 {
488     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
489     chip::Controller::ColorControlCluster cluster;
490     (void) ZCLgroupId;
491     cluster.Associate(device, ZCLendpointId);
492     return cluster.ReadAttributeCurrentHue(nullptr, nullptr);
493 }
494 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentSaturation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
495                                                                  chip::GroupId ZCLgroupId)
496 {
497     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
498     chip::Controller::ColorControlCluster cluster;
499     (void) ZCLgroupId;
500     cluster.Associate(device, ZCLendpointId);
501     return cluster.ReadAttributeCurrentSaturation(nullptr, nullptr);
502 }
503 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_RemainingTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
504                                                              chip::GroupId ZCLgroupId)
505 {
506     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
507     chip::Controller::ColorControlCluster cluster;
508     (void) ZCLgroupId;
509     cluster.Associate(device, ZCLendpointId);
510     return cluster.ReadAttributeRemainingTime(nullptr, nullptr);
511 }
512 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
513                                                         chip::GroupId ZCLgroupId)
514 {
515     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
516     chip::Controller::ColorControlCluster cluster;
517     (void) ZCLgroupId;
518     cluster.Associate(device, ZCLendpointId);
519     return cluster.ReadAttributeCurrentX(nullptr, nullptr);
520 }
521 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
522                                                         chip::GroupId ZCLgroupId)
523 {
524     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
525     chip::Controller::ColorControlCluster cluster;
526     (void) ZCLgroupId;
527     cluster.Associate(device, ZCLendpointId);
528     return cluster.ReadAttributeCurrentY(nullptr, nullptr);
529 }
530 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_DriftCompensation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
531                                                                  chip::GroupId ZCLgroupId)
532 {
533     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
534     chip::Controller::ColorControlCluster cluster;
535     (void) ZCLgroupId;
536     cluster.Associate(device, ZCLendpointId);
537     return cluster.ReadAttributeDriftCompensation(nullptr, nullptr);
538 }
539 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CompensationText(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
540                                                                 chip::GroupId ZCLgroupId)
541 {
542     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
543     chip::Controller::ColorControlCluster cluster;
544     (void) ZCLgroupId;
545     cluster.Associate(device, ZCLendpointId);
546     return cluster.ReadAttributeCompensationText(nullptr, nullptr);
547 }
548 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorTemperature(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
549                                                                 chip::GroupId ZCLgroupId)
550 {
551     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
552     chip::Controller::ColorControlCluster cluster;
553     (void) ZCLgroupId;
554     cluster.Associate(device, ZCLendpointId);
555     return cluster.ReadAttributeColorTemperature(nullptr, nullptr);
556 }
557 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorMode(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
558                                                          chip::GroupId ZCLgroupId)
559 {
560     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
561     chip::Controller::ColorControlCluster cluster;
562     (void) ZCLgroupId;
563     cluster.Associate(device, ZCLendpointId);
564     return cluster.ReadAttributeColorMode(nullptr, nullptr);
565 }
566 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorControlOptions(chip::Controller::Device * device,
567                                                                    chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
568 {
569     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
570     chip::Controller::ColorControlCluster cluster;
571     (void) ZCLgroupId;
572     cluster.Associate(device, ZCLendpointId);
573     return cluster.ReadAttributeColorControlOptions(nullptr, nullptr);
574 }
575 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
576                                                                  chip::GroupId ZCLgroupId)
577 {
578     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
579     chip::Controller::ColorControlCluster cluster;
580     (void) ZCLgroupId;
581     cluster.Associate(device, ZCLendpointId);
582     return cluster.ReadAttributeNumberOfPrimaries(nullptr, nullptr);
583 }
584 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary1X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
585                                                          chip::GroupId ZCLgroupId)
586 {
587     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
588     chip::Controller::ColorControlCluster cluster;
589     (void) ZCLgroupId;
590     cluster.Associate(device, ZCLendpointId);
591     return cluster.ReadAttributePrimary1X(nullptr, nullptr);
592 }
593 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary1Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
594                                                          chip::GroupId ZCLgroupId)
595 {
596     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
597     chip::Controller::ColorControlCluster cluster;
598     (void) ZCLgroupId;
599     cluster.Associate(device, ZCLendpointId);
600     return cluster.ReadAttributePrimary1Y(nullptr, nullptr);
601 }
602 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary1Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
603                                                                  chip::GroupId ZCLgroupId)
604 {
605     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
606     chip::Controller::ColorControlCluster cluster;
607     (void) ZCLgroupId;
608     cluster.Associate(device, ZCLendpointId);
609     return cluster.ReadAttributePrimary1Intensity(nullptr, nullptr);
610 }
611 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary2X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
612                                                          chip::GroupId ZCLgroupId)
613 {
614     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
615     chip::Controller::ColorControlCluster cluster;
616     (void) ZCLgroupId;
617     cluster.Associate(device, ZCLendpointId);
618     return cluster.ReadAttributePrimary2X(nullptr, nullptr);
619 }
620 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary2Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
621                                                          chip::GroupId ZCLgroupId)
622 {
623     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
624     chip::Controller::ColorControlCluster cluster;
625     (void) ZCLgroupId;
626     cluster.Associate(device, ZCLendpointId);
627     return cluster.ReadAttributePrimary2Y(nullptr, nullptr);
628 }
629 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary2Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
630                                                                  chip::GroupId ZCLgroupId)
631 {
632     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
633     chip::Controller::ColorControlCluster cluster;
634     (void) ZCLgroupId;
635     cluster.Associate(device, ZCLendpointId);
636     return cluster.ReadAttributePrimary2Intensity(nullptr, nullptr);
637 }
638 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary3X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
639                                                          chip::GroupId ZCLgroupId)
640 {
641     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
642     chip::Controller::ColorControlCluster cluster;
643     (void) ZCLgroupId;
644     cluster.Associate(device, ZCLendpointId);
645     return cluster.ReadAttributePrimary3X(nullptr, nullptr);
646 }
647 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary3Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
648                                                          chip::GroupId ZCLgroupId)
649 {
650     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
651     chip::Controller::ColorControlCluster cluster;
652     (void) ZCLgroupId;
653     cluster.Associate(device, ZCLendpointId);
654     return cluster.ReadAttributePrimary3Y(nullptr, nullptr);
655 }
656 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary3Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
657                                                                  chip::GroupId ZCLgroupId)
658 {
659     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
660     chip::Controller::ColorControlCluster cluster;
661     (void) ZCLgroupId;
662     cluster.Associate(device, ZCLendpointId);
663     return cluster.ReadAttributePrimary3Intensity(nullptr, nullptr);
664 }
665 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary4X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
666                                                          chip::GroupId ZCLgroupId)
667 {
668     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
669     chip::Controller::ColorControlCluster cluster;
670     (void) ZCLgroupId;
671     cluster.Associate(device, ZCLendpointId);
672     return cluster.ReadAttributePrimary4X(nullptr, nullptr);
673 }
674 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary4Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
675                                                          chip::GroupId ZCLgroupId)
676 {
677     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
678     chip::Controller::ColorControlCluster cluster;
679     (void) ZCLgroupId;
680     cluster.Associate(device, ZCLendpointId);
681     return cluster.ReadAttributePrimary4Y(nullptr, nullptr);
682 }
683 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary4Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
684                                                                  chip::GroupId ZCLgroupId)
685 {
686     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
687     chip::Controller::ColorControlCluster cluster;
688     (void) ZCLgroupId;
689     cluster.Associate(device, ZCLendpointId);
690     return cluster.ReadAttributePrimary4Intensity(nullptr, nullptr);
691 }
692 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary5X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
693                                                          chip::GroupId ZCLgroupId)
694 {
695     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
696     chip::Controller::ColorControlCluster cluster;
697     (void) ZCLgroupId;
698     cluster.Associate(device, ZCLendpointId);
699     return cluster.ReadAttributePrimary5X(nullptr, nullptr);
700 }
701 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary5Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
702                                                          chip::GroupId ZCLgroupId)
703 {
704     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
705     chip::Controller::ColorControlCluster cluster;
706     (void) ZCLgroupId;
707     cluster.Associate(device, ZCLendpointId);
708     return cluster.ReadAttributePrimary5Y(nullptr, nullptr);
709 }
710 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary5Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
711                                                                  chip::GroupId ZCLgroupId)
712 {
713     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
714     chip::Controller::ColorControlCluster cluster;
715     (void) ZCLgroupId;
716     cluster.Associate(device, ZCLendpointId);
717     return cluster.ReadAttributePrimary5Intensity(nullptr, nullptr);
718 }
719 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary6X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
720                                                          chip::GroupId ZCLgroupId)
721 {
722     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
723     chip::Controller::ColorControlCluster cluster;
724     (void) ZCLgroupId;
725     cluster.Associate(device, ZCLendpointId);
726     return cluster.ReadAttributePrimary6X(nullptr, nullptr);
727 }
728 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary6Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
729                                                          chip::GroupId ZCLgroupId)
730 {
731     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
732     chip::Controller::ColorControlCluster cluster;
733     (void) ZCLgroupId;
734     cluster.Associate(device, ZCLendpointId);
735     return cluster.ReadAttributePrimary6Y(nullptr, nullptr);
736 }
737 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary6Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
738                                                                  chip::GroupId ZCLgroupId)
739 {
740     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
741     chip::Controller::ColorControlCluster cluster;
742     (void) ZCLgroupId;
743     cluster.Associate(device, ZCLendpointId);
744     return cluster.ReadAttributePrimary6Intensity(nullptr, nullptr);
745 }
746 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_WhitePointX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
747                                                            chip::GroupId ZCLgroupId)
748 {
749     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
750     chip::Controller::ColorControlCluster cluster;
751     (void) ZCLgroupId;
752     cluster.Associate(device, ZCLendpointId);
753     return cluster.ReadAttributeWhitePointX(nullptr, nullptr);
754 }
755 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_WhitePointY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
756                                                            chip::GroupId ZCLgroupId)
757 {
758     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
759     chip::Controller::ColorControlCluster cluster;
760     (void) ZCLgroupId;
761     cluster.Associate(device, ZCLendpointId);
762     return cluster.ReadAttributeWhitePointY(nullptr, nullptr);
763 }
764 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointRX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
765                                                             chip::GroupId ZCLgroupId)
766 {
767     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
768     chip::Controller::ColorControlCluster cluster;
769     (void) ZCLgroupId;
770     cluster.Associate(device, ZCLendpointId);
771     return cluster.ReadAttributeColorPointRX(nullptr, nullptr);
772 }
773 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointRY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
774                                                             chip::GroupId ZCLgroupId)
775 {
776     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
777     chip::Controller::ColorControlCluster cluster;
778     (void) ZCLgroupId;
779     cluster.Associate(device, ZCLendpointId);
780     return cluster.ReadAttributeColorPointRY(nullptr, nullptr);
781 }
782 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity(chip::Controller::Device * device,
783                                                                     chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
784 {
785     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
786     chip::Controller::ColorControlCluster cluster;
787     (void) ZCLgroupId;
788     cluster.Associate(device, ZCLendpointId);
789     return cluster.ReadAttributeColorPointRIntensity(nullptr, nullptr);
790 }
791 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointGX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
792                                                             chip::GroupId ZCLgroupId)
793 {
794     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
795     chip::Controller::ColorControlCluster cluster;
796     (void) ZCLgroupId;
797     cluster.Associate(device, ZCLendpointId);
798     return cluster.ReadAttributeColorPointGX(nullptr, nullptr);
799 }
800 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointGY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
801                                                             chip::GroupId ZCLgroupId)
802 {
803     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
804     chip::Controller::ColorControlCluster cluster;
805     (void) ZCLgroupId;
806     cluster.Associate(device, ZCLendpointId);
807     return cluster.ReadAttributeColorPointGY(nullptr, nullptr);
808 }
809 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity(chip::Controller::Device * device,
810                                                                     chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
811 {
812     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
813     chip::Controller::ColorControlCluster cluster;
814     (void) ZCLgroupId;
815     cluster.Associate(device, ZCLendpointId);
816     return cluster.ReadAttributeColorPointGIntensity(nullptr, nullptr);
817 }
818 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointBX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
819                                                             chip::GroupId ZCLgroupId)
820 {
821     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
822     chip::Controller::ColorControlCluster cluster;
823     (void) ZCLgroupId;
824     cluster.Associate(device, ZCLendpointId);
825     return cluster.ReadAttributeColorPointBX(nullptr, nullptr);
826 }
827 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointBY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
828                                                             chip::GroupId ZCLgroupId)
829 {
830     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
831     chip::Controller::ColorControlCluster cluster;
832     (void) ZCLgroupId;
833     cluster.Associate(device, ZCLendpointId);
834     return cluster.ReadAttributeColorPointBY(nullptr, nullptr);
835 }
836 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity(chip::Controller::Device * device,
837                                                                     chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
838 {
839     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
840     chip::Controller::ColorControlCluster cluster;
841     (void) ZCLgroupId;
842     cluster.Associate(device, ZCLendpointId);
843     return cluster.ReadAttributeColorPointBIntensity(nullptr, nullptr);
844 }
845 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
846                                                                   chip::GroupId ZCLgroupId)
847 {
848     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
849     chip::Controller::ColorControlCluster cluster;
850     (void) ZCLgroupId;
851     cluster.Associate(device, ZCLendpointId);
852     return cluster.ReadAttributeEnhancedCurrentHue(nullptr, nullptr);
853 }
854 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_EnhancedColorMode(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
855                                                                  chip::GroupId ZCLgroupId)
856 {
857     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
858     chip::Controller::ColorControlCluster cluster;
859     (void) ZCLgroupId;
860     cluster.Associate(device, ZCLendpointId);
861     return cluster.ReadAttributeEnhancedColorMode(nullptr, nullptr);
862 }
863 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorLoopActive(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
864                                                                chip::GroupId ZCLgroupId)
865 {
866     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
867     chip::Controller::ColorControlCluster cluster;
868     (void) ZCLgroupId;
869     cluster.Associate(device, ZCLendpointId);
870     return cluster.ReadAttributeColorLoopActive(nullptr, nullptr);
871 }
872 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorLoopDirection(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
873                                                                   chip::GroupId ZCLgroupId)
874 {
875     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
876     chip::Controller::ColorControlCluster cluster;
877     (void) ZCLgroupId;
878     cluster.Associate(device, ZCLendpointId);
879     return cluster.ReadAttributeColorLoopDirection(nullptr, nullptr);
880 }
881 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorLoopTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
882                                                              chip::GroupId ZCLgroupId)
883 {
884     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
885     chip::Controller::ColorControlCluster cluster;
886     (void) ZCLgroupId;
887     cluster.Associate(device, ZCLendpointId);
888     return cluster.ReadAttributeColorLoopTime(nullptr, nullptr);
889 }
890 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorCapabilities(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
891                                                                  chip::GroupId ZCLgroupId)
892 {
893     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
894     chip::Controller::ColorControlCluster cluster;
895     (void) ZCLgroupId;
896     cluster.Associate(device, ZCLendpointId);
897     return cluster.ReadAttributeColorCapabilities(nullptr, nullptr);
898 }
899 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin(chip::Controller::Device * device,
900                                                                     chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
901 {
902     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
903     chip::Controller::ColorControlCluster cluster;
904     (void) ZCLgroupId;
905     cluster.Associate(device, ZCLendpointId);
906     return cluster.ReadAttributeColorTempPhysicalMin(nullptr, nullptr);
907 }
908 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax(chip::Controller::Device * device,
909                                                                     chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
910 {
911     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
912     chip::Controller::ColorControlCluster cluster;
913     (void) ZCLgroupId;
914     cluster.Associate(device, ZCLendpointId);
915     return cluster.ReadAttributeColorTempPhysicalMax(nullptr, nullptr);
916 }
917 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds(chip::Controller::Device * device,
918                                                                                chip::EndpointId ZCLendpointId,
919                                                                                chip::GroupId ZCLgroupId)
920 {
921     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
922     chip::Controller::ColorControlCluster cluster;
923     (void) ZCLgroupId;
924     cluster.Associate(device, ZCLendpointId);
925     return cluster.ReadAttributeCoupleColorTempToLevelMinMireds(nullptr, nullptr);
926 }
927 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds(chip::Controller::Device * device,
928                                                                              chip::EndpointId ZCLendpointId,
929                                                                              chip::GroupId ZCLgroupId)
930 {
931     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
932     chip::Controller::ColorControlCluster cluster;
933     (void) ZCLgroupId;
934     cluster.Associate(device, ZCLendpointId);
935     return cluster.ReadAttributeStartUpColorTemperatureMireds(nullptr, nullptr);
936 }
937 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
938                                                                chip::GroupId ZCLgroupId)
939 {
940     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
941     chip::Controller::ColorControlCluster cluster;
942     (void) ZCLgroupId;
943     cluster.Associate(device, ZCLendpointId);
944     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
945 }
946
947 // End of Cluster ColorControl
948 // Cluster DoorLock
949
950 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearAllPins(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
951                                                         chip::GroupId ZCLgroupId)
952 {
953     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
954     chip::Controller::DoorLockCluster cluster;
955     (void) ZCLgroupId;
956     cluster.Associate(device, ZCLendpointId);
957     return cluster.ClearAllPins(nullptr, nullptr);
958 }
959 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearAllRfids(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
960                                                          chip::GroupId ZCLgroupId)
961 {
962     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
963     chip::Controller::DoorLockCluster cluster;
964     (void) ZCLgroupId;
965     cluster.Associate(device, ZCLendpointId);
966     return cluster.ClearAllRfids(nullptr, nullptr);
967 }
968 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearHolidaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
969                                                                 chip::GroupId ZCLgroupId, uint8_t scheduleId)
970 {
971     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
972     chip::Controller::DoorLockCluster cluster;
973     (void) ZCLgroupId;
974     cluster.Associate(device, ZCLendpointId);
975     return cluster.ClearHolidaySchedule(nullptr, nullptr, scheduleId);
976 }
977 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearPin(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
978                                                     chip::GroupId ZCLgroupId, uint16_t userId)
979 {
980     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
981     chip::Controller::DoorLockCluster cluster;
982     (void) ZCLgroupId;
983     cluster.Associate(device, ZCLendpointId);
984     return cluster.ClearPin(nullptr, nullptr, userId);
985 }
986 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearRfid(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
987                                                      chip::GroupId ZCLgroupId, uint16_t userId)
988 {
989     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
990     chip::Controller::DoorLockCluster cluster;
991     (void) ZCLgroupId;
992     cluster.Associate(device, ZCLendpointId);
993     return cluster.ClearRfid(nullptr, nullptr, userId);
994 }
995 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearWeekdaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
996                                                                 chip::GroupId ZCLgroupId, uint8_t scheduleId, uint16_t userId)
997 {
998     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
999     chip::Controller::DoorLockCluster cluster;
1000     (void) ZCLgroupId;
1001     cluster.Associate(device, ZCLendpointId);
1002     return cluster.ClearWeekdaySchedule(nullptr, nullptr, scheduleId, userId);
1003 }
1004 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearYeardaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1005                                                                 chip::GroupId ZCLgroupId, uint8_t scheduleId, uint16_t userId)
1006 {
1007     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1008     chip::Controller::DoorLockCluster cluster;
1009     (void) ZCLgroupId;
1010     cluster.Associate(device, ZCLendpointId);
1011     return cluster.ClearYeardaySchedule(nullptr, nullptr, scheduleId, userId);
1012 }
1013 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetHolidaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1014                                                               chip::GroupId ZCLgroupId, uint8_t scheduleId)
1015 {
1016     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1017     chip::Controller::DoorLockCluster cluster;
1018     (void) ZCLgroupId;
1019     cluster.Associate(device, ZCLendpointId);
1020     return cluster.GetHolidaySchedule(nullptr, nullptr, scheduleId);
1021 }
1022 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetLogRecord(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1023                                                         chip::GroupId ZCLgroupId, uint16_t logIndex)
1024 {
1025     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1026     chip::Controller::DoorLockCluster cluster;
1027     (void) ZCLgroupId;
1028     cluster.Associate(device, ZCLendpointId);
1029     return cluster.GetLogRecord(nullptr, nullptr, logIndex);
1030 }
1031 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetPin(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1032                                                   chip::GroupId ZCLgroupId, uint16_t userId)
1033 {
1034     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1035     chip::Controller::DoorLockCluster cluster;
1036     (void) ZCLgroupId;
1037     cluster.Associate(device, ZCLendpointId);
1038     return cluster.GetPin(nullptr, nullptr, userId);
1039 }
1040 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetRfid(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1041                                                    chip::GroupId ZCLgroupId, uint16_t userId)
1042 {
1043     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1044     chip::Controller::DoorLockCluster cluster;
1045     (void) ZCLgroupId;
1046     cluster.Associate(device, ZCLendpointId);
1047     return cluster.GetRfid(nullptr, nullptr, userId);
1048 }
1049 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetUserType(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1050                                                        chip::GroupId ZCLgroupId, uint16_t userId)
1051 {
1052     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1053     chip::Controller::DoorLockCluster cluster;
1054     (void) ZCLgroupId;
1055     cluster.Associate(device, ZCLendpointId);
1056     return cluster.GetUserType(nullptr, nullptr, userId);
1057 }
1058 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetWeekdaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1059                                                               chip::GroupId ZCLgroupId, uint8_t scheduleId, uint16_t userId)
1060 {
1061     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1062     chip::Controller::DoorLockCluster cluster;
1063     (void) ZCLgroupId;
1064     cluster.Associate(device, ZCLendpointId);
1065     return cluster.GetWeekdaySchedule(nullptr, nullptr, scheduleId, userId);
1066 }
1067 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetYeardaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1068                                                               chip::GroupId ZCLgroupId, uint8_t scheduleId, uint16_t userId)
1069 {
1070     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1071     chip::Controller::DoorLockCluster cluster;
1072     (void) ZCLgroupId;
1073     cluster.Associate(device, ZCLendpointId);
1074     return cluster.GetYeardaySchedule(nullptr, nullptr, scheduleId, userId);
1075 }
1076 CHIP_ERROR chip_ime_AppendCommand_DoorLock_LockDoor(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1077                                                     chip::GroupId ZCLgroupId, const uint8_t * pin, uint32_t pin_Len)
1078 {
1079     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1080     chip::Controller::DoorLockCluster cluster;
1081     (void) ZCLgroupId;
1082     cluster.Associate(device, ZCLendpointId);
1083     return cluster.LockDoor(nullptr, nullptr, chip::ByteSpan(pin, pin_Len));
1084 }
1085 CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetHolidaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1086                                                               chip::GroupId ZCLgroupId, uint8_t scheduleId, uint32_t localStartTime,
1087                                                               uint32_t localEndTime, uint8_t operatingModeDuringHoliday)
1088 {
1089     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1090     chip::Controller::DoorLockCluster cluster;
1091     (void) ZCLgroupId;
1092     cluster.Associate(device, ZCLendpointId);
1093     return cluster.SetHolidaySchedule(nullptr, nullptr, scheduleId, localStartTime, localEndTime, operatingModeDuringHoliday);
1094 }
1095 CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetPin(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1096                                                   chip::GroupId ZCLgroupId, uint16_t userId, uint8_t userStatus, uint8_t userType,
1097                                                   const uint8_t * pin, uint32_t pin_Len)
1098 {
1099     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1100     chip::Controller::DoorLockCluster cluster;
1101     (void) ZCLgroupId;
1102     cluster.Associate(device, ZCLendpointId);
1103     return cluster.SetPin(nullptr, nullptr, userId, userStatus, userType, chip::ByteSpan(pin, pin_Len));
1104 }
1105 CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetRfid(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1106                                                    chip::GroupId ZCLgroupId, uint16_t userId, uint8_t userStatus, uint8_t userType,
1107                                                    const uint8_t * id, uint32_t id_Len)
1108 {
1109     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1110     chip::Controller::DoorLockCluster cluster;
1111     (void) ZCLgroupId;
1112     cluster.Associate(device, ZCLendpointId);
1113     return cluster.SetRfid(nullptr, nullptr, userId, userStatus, userType, chip::ByteSpan(id, id_Len));
1114 }
1115 CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetUserType(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1116                                                        chip::GroupId ZCLgroupId, uint16_t userId, uint8_t userType)
1117 {
1118     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1119     chip::Controller::DoorLockCluster cluster;
1120     (void) ZCLgroupId;
1121     cluster.Associate(device, ZCLendpointId);
1122     return cluster.SetUserType(nullptr, nullptr, userId, userType);
1123 }
1124 CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetWeekdaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1125                                                               chip::GroupId ZCLgroupId, uint8_t scheduleId, uint16_t userId,
1126                                                               uint8_t daysMask, uint8_t startHour, uint8_t startMinute,
1127                                                               uint8_t endHour, uint8_t endMinute)
1128 {
1129     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1130     chip::Controller::DoorLockCluster cluster;
1131     (void) ZCLgroupId;
1132     cluster.Associate(device, ZCLendpointId);
1133     return cluster.SetWeekdaySchedule(nullptr, nullptr, scheduleId, userId, daysMask, startHour, startMinute, endHour, endMinute);
1134 }
1135 CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetYeardaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1136                                                               chip::GroupId ZCLgroupId, uint8_t scheduleId, uint16_t userId,
1137                                                               uint32_t localStartTime, uint32_t localEndTime)
1138 {
1139     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1140     chip::Controller::DoorLockCluster cluster;
1141     (void) ZCLgroupId;
1142     cluster.Associate(device, ZCLendpointId);
1143     return cluster.SetYeardaySchedule(nullptr, nullptr, scheduleId, userId, localStartTime, localEndTime);
1144 }
1145 CHIP_ERROR chip_ime_AppendCommand_DoorLock_UnlockDoor(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1146                                                       chip::GroupId ZCLgroupId, const uint8_t * pin, uint32_t pin_Len)
1147 {
1148     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1149     chip::Controller::DoorLockCluster cluster;
1150     (void) ZCLgroupId;
1151     cluster.Associate(device, ZCLendpointId);
1152     return cluster.UnlockDoor(nullptr, nullptr, chip::ByteSpan(pin, pin_Len));
1153 }
1154 CHIP_ERROR chip_ime_AppendCommand_DoorLock_UnlockWithTimeout(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1155                                                              chip::GroupId ZCLgroupId, uint16_t timeoutInSeconds,
1156                                                              const uint8_t * pin, uint32_t pin_Len)
1157 {
1158     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1159     chip::Controller::DoorLockCluster cluster;
1160     (void) ZCLgroupId;
1161     cluster.Associate(device, ZCLendpointId);
1162     return cluster.UnlockWithTimeout(nullptr, nullptr, timeoutInSeconds, chip::ByteSpan(pin, pin_Len));
1163 }
1164
1165 CHIP_ERROR chip_ime_ReadAttribute_DoorLock_LockState(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1166                                                      chip::GroupId ZCLgroupId)
1167 {
1168     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1169     chip::Controller::DoorLockCluster cluster;
1170     (void) ZCLgroupId;
1171     cluster.Associate(device, ZCLendpointId);
1172     return cluster.ReadAttributeLockState(nullptr, nullptr);
1173 }
1174 CHIP_ERROR chip_ime_ReadAttribute_DoorLock_LockType(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1175                                                     chip::GroupId ZCLgroupId)
1176 {
1177     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1178     chip::Controller::DoorLockCluster cluster;
1179     (void) ZCLgroupId;
1180     cluster.Associate(device, ZCLendpointId);
1181     return cluster.ReadAttributeLockType(nullptr, nullptr);
1182 }
1183 CHIP_ERROR chip_ime_ReadAttribute_DoorLock_ActuatorEnabled(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1184                                                            chip::GroupId ZCLgroupId)
1185 {
1186     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1187     chip::Controller::DoorLockCluster cluster;
1188     (void) ZCLgroupId;
1189     cluster.Associate(device, ZCLendpointId);
1190     return cluster.ReadAttributeActuatorEnabled(nullptr, nullptr);
1191 }
1192 CHIP_ERROR chip_ime_ReadAttribute_DoorLock_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1193                                                            chip::GroupId ZCLgroupId)
1194 {
1195     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1196     chip::Controller::DoorLockCluster cluster;
1197     (void) ZCLgroupId;
1198     cluster.Associate(device, ZCLendpointId);
1199     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1200 }
1201
1202 // End of Cluster DoorLock
1203 // Cluster GeneralCommissioning
1204
1205 CHIP_ERROR chip_ime_AppendCommand_GeneralCommissioning_ArmFailSafe(chip::Controller::Device * device,
1206                                                                    chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
1207                                                                    uint16_t expiryLengthSeconds, uint64_t breadcrumb,
1208                                                                    uint32_t timeoutMs)
1209 {
1210     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1211     chip::Controller::GeneralCommissioningCluster cluster;
1212     (void) ZCLgroupId;
1213     cluster.Associate(device, ZCLendpointId);
1214     return cluster.ArmFailSafe(nullptr, nullptr, expiryLengthSeconds, breadcrumb, timeoutMs);
1215 }
1216 CHIP_ERROR chip_ime_AppendCommand_GeneralCommissioning_CommissioningComplete(chip::Controller::Device * device,
1217                                                                              chip::EndpointId ZCLendpointId,
1218                                                                              chip::GroupId ZCLgroupId)
1219 {
1220     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1221     chip::Controller::GeneralCommissioningCluster cluster;
1222     (void) ZCLgroupId;
1223     cluster.Associate(device, ZCLendpointId);
1224     return cluster.CommissioningComplete(nullptr, nullptr);
1225 }
1226 CHIP_ERROR chip_ime_AppendCommand_GeneralCommissioning_SetFabric(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1227                                                                  chip::GroupId ZCLgroupId, const uint8_t * fabricId,
1228                                                                  uint32_t fabricId_Len, const uint8_t * fabricSecret,
1229                                                                  uint32_t fabricSecret_Len, uint64_t breadcrumb, uint32_t timeoutMs)
1230 {
1231     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1232     chip::Controller::GeneralCommissioningCluster cluster;
1233     (void) ZCLgroupId;
1234     cluster.Associate(device, ZCLendpointId);
1235     return cluster.SetFabric(nullptr, nullptr, chip::ByteSpan(fabricId, fabricId_Len),
1236                              chip::ByteSpan(fabricSecret, fabricSecret_Len), breadcrumb, timeoutMs);
1237 }
1238
1239 CHIP_ERROR chip_ime_ReadAttribute_GeneralCommissioning_FabricId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1240                                                                 chip::GroupId ZCLgroupId)
1241 {
1242     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1243     chip::Controller::GeneralCommissioningCluster cluster;
1244     (void) ZCLgroupId;
1245     cluster.Associate(device, ZCLendpointId);
1246     return cluster.ReadAttributeFabricId(nullptr, nullptr);
1247 }
1248 CHIP_ERROR chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1249                                                                   chip::GroupId ZCLgroupId)
1250 {
1251     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1252     chip::Controller::GeneralCommissioningCluster cluster;
1253     (void) ZCLgroupId;
1254     cluster.Associate(device, ZCLendpointId);
1255     return cluster.ReadAttributeBreadcrumb(nullptr, nullptr);
1256 }
1257 CHIP_ERROR chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision(chip::Controller::Device * device,
1258                                                                        chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1259 {
1260     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1261     chip::Controller::GeneralCommissioningCluster cluster;
1262     (void) ZCLgroupId;
1263     cluster.Associate(device, ZCLendpointId);
1264     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1265 }
1266
1267 // End of Cluster GeneralCommissioning
1268 // Cluster GroupKeyManagement
1269
1270 CHIP_ERROR chip_ime_ReadAttribute_GroupKeyManagement_Groups(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1271                                                             chip::GroupId ZCLgroupId)
1272 {
1273     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1274     chip::Controller::GroupKeyManagementCluster cluster;
1275     (void) ZCLgroupId;
1276     cluster.Associate(device, ZCLendpointId);
1277     return cluster.ReadAttributeGroups(nullptr, nullptr);
1278 }
1279 CHIP_ERROR chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1280                                                                chip::GroupId ZCLgroupId)
1281 {
1282     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1283     chip::Controller::GroupKeyManagementCluster cluster;
1284     (void) ZCLgroupId;
1285     cluster.Associate(device, ZCLendpointId);
1286     return cluster.ReadAttributeGroupKeys(nullptr, nullptr);
1287 }
1288 CHIP_ERROR chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision(chip::Controller::Device * device,
1289                                                                      chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1290 {
1291     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1292     chip::Controller::GroupKeyManagementCluster cluster;
1293     (void) ZCLgroupId;
1294     cluster.Associate(device, ZCLendpointId);
1295     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1296 }
1297
1298 // End of Cluster GroupKeyManagement
1299 // Cluster Groups
1300
1301 CHIP_ERROR chip_ime_AppendCommand_Groups_AddGroup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1302                                                   chip::GroupId ZCLgroupId, uint16_t groupId, const uint8_t * groupName,
1303                                                   uint32_t groupName_Len)
1304 {
1305     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1306     chip::Controller::GroupsCluster cluster;
1307     (void) ZCLgroupId;
1308     cluster.Associate(device, ZCLendpointId);
1309     return cluster.AddGroup(nullptr, nullptr, groupId, chip::ByteSpan(groupName, groupName_Len));
1310 }
1311 CHIP_ERROR chip_ime_AppendCommand_Groups_AddGroupIfIdentifying(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1312                                                                chip::GroupId ZCLgroupId, uint16_t groupId,
1313                                                                const uint8_t * groupName, uint32_t groupName_Len)
1314 {
1315     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1316     chip::Controller::GroupsCluster cluster;
1317     (void) ZCLgroupId;
1318     cluster.Associate(device, ZCLendpointId);
1319     return cluster.AddGroupIfIdentifying(nullptr, nullptr, groupId, chip::ByteSpan(groupName, groupName_Len));
1320 }
1321 CHIP_ERROR chip_ime_AppendCommand_Groups_GetGroupMembership(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1322                                                             chip::GroupId ZCLgroupId, uint8_t groupCount, uint16_t groupList)
1323 {
1324     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1325     chip::Controller::GroupsCluster cluster;
1326     (void) ZCLgroupId;
1327     cluster.Associate(device, ZCLendpointId);
1328     return cluster.GetGroupMembership(nullptr, nullptr, groupCount, groupList);
1329 }
1330 CHIP_ERROR chip_ime_AppendCommand_Groups_RemoveAllGroups(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1331                                                          chip::GroupId ZCLgroupId)
1332 {
1333     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1334     chip::Controller::GroupsCluster cluster;
1335     (void) ZCLgroupId;
1336     cluster.Associate(device, ZCLendpointId);
1337     return cluster.RemoveAllGroups(nullptr, nullptr);
1338 }
1339 CHIP_ERROR chip_ime_AppendCommand_Groups_RemoveGroup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1340                                                      chip::GroupId ZCLgroupId, uint16_t groupId)
1341 {
1342     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1343     chip::Controller::GroupsCluster cluster;
1344     (void) ZCLgroupId;
1345     cluster.Associate(device, ZCLendpointId);
1346     return cluster.RemoveGroup(nullptr, nullptr, groupId);
1347 }
1348 CHIP_ERROR chip_ime_AppendCommand_Groups_ViewGroup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1349                                                    chip::GroupId ZCLgroupId, uint16_t groupId)
1350 {
1351     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1352     chip::Controller::GroupsCluster cluster;
1353     (void) ZCLgroupId;
1354     cluster.Associate(device, ZCLendpointId);
1355     return cluster.ViewGroup(nullptr, nullptr, groupId);
1356 }
1357
1358 CHIP_ERROR chip_ime_ReadAttribute_Groups_NameSupport(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1359                                                      chip::GroupId ZCLgroupId)
1360 {
1361     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1362     chip::Controller::GroupsCluster cluster;
1363     (void) ZCLgroupId;
1364     cluster.Associate(device, ZCLendpointId);
1365     return cluster.ReadAttributeNameSupport(nullptr, nullptr);
1366 }
1367 CHIP_ERROR chip_ime_ReadAttribute_Groups_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1368                                                          chip::GroupId ZCLgroupId)
1369 {
1370     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1371     chip::Controller::GroupsCluster cluster;
1372     (void) ZCLgroupId;
1373     cluster.Associate(device, ZCLendpointId);
1374     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1375 }
1376
1377 // End of Cluster Groups
1378 // Cluster IasZone
1379
1380 CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneState(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1381                                                     chip::GroupId ZCLgroupId)
1382 {
1383     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1384     chip::Controller::IasZoneCluster cluster;
1385     (void) ZCLgroupId;
1386     cluster.Associate(device, ZCLendpointId);
1387     return cluster.ReadAttributeZoneState(nullptr, nullptr);
1388 }
1389 CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneType(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1390                                                    chip::GroupId ZCLgroupId)
1391 {
1392     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1393     chip::Controller::IasZoneCluster cluster;
1394     (void) ZCLgroupId;
1395     cluster.Associate(device, ZCLendpointId);
1396     return cluster.ReadAttributeZoneType(nullptr, nullptr);
1397 }
1398 CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneStatus(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1399                                                      chip::GroupId ZCLgroupId)
1400 {
1401     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1402     chip::Controller::IasZoneCluster cluster;
1403     (void) ZCLgroupId;
1404     cluster.Associate(device, ZCLendpointId);
1405     return cluster.ReadAttributeZoneStatus(nullptr, nullptr);
1406 }
1407 CHIP_ERROR chip_ime_ReadAttribute_IasZone_IasCieAddress(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1408                                                         chip::GroupId ZCLgroupId)
1409 {
1410     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1411     chip::Controller::IasZoneCluster cluster;
1412     (void) ZCLgroupId;
1413     cluster.Associate(device, ZCLendpointId);
1414     return cluster.ReadAttributeIasCieAddress(nullptr, nullptr);
1415 }
1416 CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1417                                                  chip::GroupId ZCLgroupId)
1418 {
1419     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1420     chip::Controller::IasZoneCluster cluster;
1421     (void) ZCLgroupId;
1422     cluster.Associate(device, ZCLendpointId);
1423     return cluster.ReadAttributeZoneId(nullptr, nullptr);
1424 }
1425 CHIP_ERROR chip_ime_ReadAttribute_IasZone_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1426                                                           chip::GroupId ZCLgroupId)
1427 {
1428     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1429     chip::Controller::IasZoneCluster cluster;
1430     (void) ZCLgroupId;
1431     cluster.Associate(device, ZCLendpointId);
1432     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1433 }
1434
1435 // End of Cluster IasZone
1436 // Cluster Identify
1437
1438 CHIP_ERROR chip_ime_AppendCommand_Identify_Identify(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1439                                                     chip::GroupId ZCLgroupId, uint16_t identifyTime)
1440 {
1441     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1442     chip::Controller::IdentifyCluster cluster;
1443     (void) ZCLgroupId;
1444     cluster.Associate(device, ZCLendpointId);
1445     return cluster.Identify(nullptr, nullptr, identifyTime);
1446 }
1447 CHIP_ERROR chip_ime_AppendCommand_Identify_IdentifyQuery(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1448                                                          chip::GroupId ZCLgroupId)
1449 {
1450     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1451     chip::Controller::IdentifyCluster cluster;
1452     (void) ZCLgroupId;
1453     cluster.Associate(device, ZCLendpointId);
1454     return cluster.IdentifyQuery(nullptr, nullptr);
1455 }
1456
1457 CHIP_ERROR chip_ime_ReadAttribute_Identify_IdentifyTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1458                                                         chip::GroupId ZCLgroupId)
1459 {
1460     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1461     chip::Controller::IdentifyCluster cluster;
1462     (void) ZCLgroupId;
1463     cluster.Associate(device, ZCLendpointId);
1464     return cluster.ReadAttributeIdentifyTime(nullptr, nullptr);
1465 }
1466 CHIP_ERROR chip_ime_ReadAttribute_Identify_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1467                                                            chip::GroupId ZCLgroupId)
1468 {
1469     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1470     chip::Controller::IdentifyCluster cluster;
1471     (void) ZCLgroupId;
1472     cluster.Associate(device, ZCLendpointId);
1473     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1474 }
1475
1476 // End of Cluster Identify
1477 // Cluster LevelControl
1478
1479 CHIP_ERROR chip_ime_AppendCommand_LevelControl_Move(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1480                                                     chip::GroupId ZCLgroupId, uint8_t moveMode, uint8_t rate, uint8_t optionMask,
1481                                                     uint8_t optionOverride)
1482 {
1483     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1484     chip::Controller::LevelControlCluster cluster;
1485     (void) ZCLgroupId;
1486     cluster.Associate(device, ZCLendpointId);
1487     return cluster.Move(nullptr, nullptr, moveMode, rate, optionMask, optionOverride);
1488 }
1489 CHIP_ERROR chip_ime_AppendCommand_LevelControl_MoveToLevel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1490                                                            chip::GroupId ZCLgroupId, uint8_t level, uint16_t transitionTime,
1491                                                            uint8_t optionMask, uint8_t optionOverride)
1492 {
1493     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1494     chip::Controller::LevelControlCluster cluster;
1495     (void) ZCLgroupId;
1496     cluster.Associate(device, ZCLendpointId);
1497     return cluster.MoveToLevel(nullptr, nullptr, level, transitionTime, optionMask, optionOverride);
1498 }
1499 CHIP_ERROR chip_ime_AppendCommand_LevelControl_MoveToLevelWithOnOff(chip::Controller::Device * device,
1500                                                                     chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
1501                                                                     uint8_t level, uint16_t transitionTime)
1502 {
1503     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1504     chip::Controller::LevelControlCluster cluster;
1505     (void) ZCLgroupId;
1506     cluster.Associate(device, ZCLendpointId);
1507     return cluster.MoveToLevelWithOnOff(nullptr, nullptr, level, transitionTime);
1508 }
1509 CHIP_ERROR chip_ime_AppendCommand_LevelControl_MoveWithOnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1510                                                              chip::GroupId ZCLgroupId, uint8_t moveMode, uint8_t rate)
1511 {
1512     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1513     chip::Controller::LevelControlCluster cluster;
1514     (void) ZCLgroupId;
1515     cluster.Associate(device, ZCLendpointId);
1516     return cluster.MoveWithOnOff(nullptr, nullptr, moveMode, rate);
1517 }
1518 CHIP_ERROR chip_ime_AppendCommand_LevelControl_Step(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1519                                                     chip::GroupId ZCLgroupId, uint8_t stepMode, uint8_t stepSize,
1520                                                     uint16_t transitionTime, uint8_t optionMask, uint8_t optionOverride)
1521 {
1522     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1523     chip::Controller::LevelControlCluster cluster;
1524     (void) ZCLgroupId;
1525     cluster.Associate(device, ZCLendpointId);
1526     return cluster.Step(nullptr, nullptr, stepMode, stepSize, transitionTime, optionMask, optionOverride);
1527 }
1528 CHIP_ERROR chip_ime_AppendCommand_LevelControl_StepWithOnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1529                                                              chip::GroupId ZCLgroupId, uint8_t stepMode, uint8_t stepSize,
1530                                                              uint16_t transitionTime)
1531 {
1532     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1533     chip::Controller::LevelControlCluster cluster;
1534     (void) ZCLgroupId;
1535     cluster.Associate(device, ZCLendpointId);
1536     return cluster.StepWithOnOff(nullptr, nullptr, stepMode, stepSize, transitionTime);
1537 }
1538 CHIP_ERROR chip_ime_AppendCommand_LevelControl_Stop(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1539                                                     chip::GroupId ZCLgroupId, uint8_t optionMask, uint8_t optionOverride)
1540 {
1541     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1542     chip::Controller::LevelControlCluster cluster;
1543     (void) ZCLgroupId;
1544     cluster.Associate(device, ZCLendpointId);
1545     return cluster.Stop(nullptr, nullptr, optionMask, optionOverride);
1546 }
1547 CHIP_ERROR chip_ime_AppendCommand_LevelControl_StopWithOnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1548                                                              chip::GroupId ZCLgroupId)
1549 {
1550     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1551     chip::Controller::LevelControlCluster cluster;
1552     (void) ZCLgroupId;
1553     cluster.Associate(device, ZCLendpointId);
1554     return cluster.StopWithOnOff(nullptr, nullptr);
1555 }
1556
1557 CHIP_ERROR chip_ime_ReadAttribute_LevelControl_CurrentLevel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1558                                                             chip::GroupId ZCLgroupId)
1559 {
1560     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1561     chip::Controller::LevelControlCluster cluster;
1562     (void) ZCLgroupId;
1563     cluster.Associate(device, ZCLendpointId);
1564     return cluster.ReadAttributeCurrentLevel(nullptr, nullptr);
1565 }
1566 CHIP_ERROR chip_ime_ReadAttribute_LevelControl_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1567                                                                chip::GroupId ZCLgroupId)
1568 {
1569     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1570     chip::Controller::LevelControlCluster cluster;
1571     (void) ZCLgroupId;
1572     cluster.Associate(device, ZCLendpointId);
1573     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1574 }
1575
1576 // End of Cluster LevelControl
1577 // Cluster LowPower
1578
1579 CHIP_ERROR chip_ime_AppendCommand_LowPower_Sleep(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1580                                                  chip::GroupId ZCLgroupId)
1581 {
1582     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1583     chip::Controller::LowPowerCluster cluster;
1584     (void) ZCLgroupId;
1585     cluster.Associate(device, ZCLendpointId);
1586     return cluster.Sleep(nullptr, nullptr);
1587 }
1588
1589 CHIP_ERROR chip_ime_ReadAttribute_LowPower_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1590                                                            chip::GroupId ZCLgroupId)
1591 {
1592     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1593     chip::Controller::LowPowerCluster cluster;
1594     (void) ZCLgroupId;
1595     cluster.Associate(device, ZCLendpointId);
1596     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1597 }
1598
1599 // End of Cluster LowPower
1600 // Cluster NetworkCommissioning
1601
1602 CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_AddThreadNetwork(chip::Controller::Device * device,
1603                                                                         chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
1604                                                                         const uint8_t * operationalDataset,
1605                                                                         uint32_t operationalDataset_Len, uint64_t breadcrumb,
1606                                                                         uint32_t timeoutMs)
1607 {
1608     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1609     chip::Controller::NetworkCommissioningCluster cluster;
1610     (void) ZCLgroupId;
1611     cluster.Associate(device, ZCLendpointId);
1612     return cluster.AddThreadNetwork(nullptr, nullptr, chip::ByteSpan(operationalDataset, operationalDataset_Len), breadcrumb,
1613                                     timeoutMs);
1614 }
1615 CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_AddWiFiNetwork(chip::Controller::Device * device,
1616                                                                       chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
1617                                                                       const uint8_t * ssid, uint32_t ssid_Len,
1618                                                                       const uint8_t * credentials, uint32_t credentials_Len,
1619                                                                       uint64_t breadcrumb, uint32_t timeoutMs)
1620 {
1621     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1622     chip::Controller::NetworkCommissioningCluster cluster;
1623     (void) ZCLgroupId;
1624     cluster.Associate(device, ZCLendpointId);
1625     return cluster.AddWiFiNetwork(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), chip::ByteSpan(credentials, credentials_Len),
1626                                   breadcrumb, timeoutMs);
1627 }
1628 CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_DisableNetwork(chip::Controller::Device * device,
1629                                                                       chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
1630                                                                       const uint8_t * networkID, uint32_t networkID_Len,
1631                                                                       uint64_t breadcrumb, uint32_t timeoutMs)
1632 {
1633     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1634     chip::Controller::NetworkCommissioningCluster cluster;
1635     (void) ZCLgroupId;
1636     cluster.Associate(device, ZCLendpointId);
1637     return cluster.DisableNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs);
1638 }
1639 CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_EnableNetwork(chip::Controller::Device * device,
1640                                                                      chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
1641                                                                      const uint8_t * networkID, uint32_t networkID_Len,
1642                                                                      uint64_t breadcrumb, uint32_t timeoutMs)
1643 {
1644     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1645     chip::Controller::NetworkCommissioningCluster cluster;
1646     (void) ZCLgroupId;
1647     cluster.Associate(device, ZCLendpointId);
1648     return cluster.EnableNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs);
1649 }
1650 CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_GetLastNetworkCommissioningResult(chip::Controller::Device * device,
1651                                                                                          chip::EndpointId ZCLendpointId,
1652                                                                                          chip::GroupId ZCLgroupId,
1653                                                                                          uint32_t timeoutMs)
1654 {
1655     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1656     chip::Controller::NetworkCommissioningCluster cluster;
1657     (void) ZCLgroupId;
1658     cluster.Associate(device, ZCLendpointId);
1659     return cluster.GetLastNetworkCommissioningResult(nullptr, nullptr, timeoutMs);
1660 }
1661 CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_RemoveNetwork(chip::Controller::Device * device,
1662                                                                      chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
1663                                                                      const uint8_t * networkID, uint32_t networkID_Len,
1664                                                                      uint64_t breadcrumb, uint32_t timeoutMs)
1665 {
1666     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1667     chip::Controller::NetworkCommissioningCluster cluster;
1668     (void) ZCLgroupId;
1669     cluster.Associate(device, ZCLendpointId);
1670     return cluster.RemoveNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs);
1671 }
1672 CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_ScanNetworks(chip::Controller::Device * device,
1673                                                                     chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
1674                                                                     const uint8_t * ssid, uint32_t ssid_Len, uint64_t breadcrumb,
1675                                                                     uint32_t timeoutMs)
1676 {
1677     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1678     chip::Controller::NetworkCommissioningCluster cluster;
1679     (void) ZCLgroupId;
1680     cluster.Associate(device, ZCLendpointId);
1681     return cluster.ScanNetworks(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), breadcrumb, timeoutMs);
1682 }
1683 CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_UpdateThreadNetwork(chip::Controller::Device * device,
1684                                                                            chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
1685                                                                            const uint8_t * operationalDataset,
1686                                                                            uint32_t operationalDataset_Len, uint64_t breadcrumb,
1687                                                                            uint32_t timeoutMs)
1688 {
1689     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1690     chip::Controller::NetworkCommissioningCluster cluster;
1691     (void) ZCLgroupId;
1692     cluster.Associate(device, ZCLendpointId);
1693     return cluster.UpdateThreadNetwork(nullptr, nullptr, chip::ByteSpan(operationalDataset, operationalDataset_Len), breadcrumb,
1694                                        timeoutMs);
1695 }
1696 CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_UpdateWiFiNetwork(chip::Controller::Device * device,
1697                                                                          chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
1698                                                                          const uint8_t * ssid, uint32_t ssid_Len,
1699                                                                          const uint8_t * credentials, uint32_t credentials_Len,
1700                                                                          uint64_t breadcrumb, uint32_t timeoutMs)
1701 {
1702     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1703     chip::Controller::NetworkCommissioningCluster cluster;
1704     (void) ZCLgroupId;
1705     cluster.Associate(device, ZCLendpointId);
1706     return cluster.UpdateWiFiNetwork(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), chip::ByteSpan(credentials, credentials_Len),
1707                                      breadcrumb, timeoutMs);
1708 }
1709
1710 CHIP_ERROR chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision(chip::Controller::Device * device,
1711                                                                        chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1712 {
1713     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1714     chip::Controller::NetworkCommissioningCluster cluster;
1715     (void) ZCLgroupId;
1716     cluster.Associate(device, ZCLendpointId);
1717     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1718 }
1719
1720 // End of Cluster NetworkCommissioning
1721 // Cluster OnOff
1722
1723 CHIP_ERROR chip_ime_AppendCommand_OnOff_Off(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1724                                             chip::GroupId ZCLgroupId)
1725 {
1726     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1727     chip::Controller::OnOffCluster cluster;
1728     (void) ZCLgroupId;
1729     cluster.Associate(device, ZCLendpointId);
1730     return cluster.Off(nullptr, nullptr);
1731 }
1732 CHIP_ERROR chip_ime_AppendCommand_OnOff_On(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1733                                            chip::GroupId ZCLgroupId)
1734 {
1735     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1736     chip::Controller::OnOffCluster cluster;
1737     (void) ZCLgroupId;
1738     cluster.Associate(device, ZCLendpointId);
1739     return cluster.On(nullptr, nullptr);
1740 }
1741 CHIP_ERROR chip_ime_AppendCommand_OnOff_Toggle(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1742                                                chip::GroupId ZCLgroupId)
1743 {
1744     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1745     chip::Controller::OnOffCluster cluster;
1746     (void) ZCLgroupId;
1747     cluster.Associate(device, ZCLendpointId);
1748     return cluster.Toggle(nullptr, nullptr);
1749 }
1750
1751 CHIP_ERROR chip_ime_ReadAttribute_OnOff_OnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1752                                               chip::GroupId ZCLgroupId)
1753 {
1754     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1755     chip::Controller::OnOffCluster cluster;
1756     (void) ZCLgroupId;
1757     cluster.Associate(device, ZCLendpointId);
1758     return cluster.ReadAttributeOnOff(nullptr, nullptr);
1759 }
1760 CHIP_ERROR chip_ime_ReadAttribute_OnOff_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1761                                                         chip::GroupId ZCLgroupId)
1762 {
1763     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1764     chip::Controller::OnOffCluster cluster;
1765     (void) ZCLgroupId;
1766     cluster.Associate(device, ZCLendpointId);
1767     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1768 }
1769
1770 // End of Cluster OnOff
1771 // Cluster Scenes
1772
1773 CHIP_ERROR chip_ime_AppendCommand_Scenes_AddScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1774                                                   chip::GroupId ZCLgroupId, uint16_t groupId, uint8_t sceneId,
1775                                                   uint16_t transitionTime, const uint8_t * sceneName, uint32_t sceneName_Len,
1776                                                   chip::ClusterId clusterId, uint8_t length, uint8_t value)
1777 {
1778     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1779     chip::Controller::ScenesCluster cluster;
1780     (void) ZCLgroupId;
1781     cluster.Associate(device, ZCLendpointId);
1782     return cluster.AddScene(nullptr, nullptr, groupId, sceneId, transitionTime, chip::ByteSpan(sceneName, sceneName_Len), clusterId,
1783                             length, value);
1784 }
1785 CHIP_ERROR chip_ime_AppendCommand_Scenes_GetSceneMembership(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1786                                                             chip::GroupId ZCLgroupId, uint16_t groupId)
1787 {
1788     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1789     chip::Controller::ScenesCluster cluster;
1790     (void) ZCLgroupId;
1791     cluster.Associate(device, ZCLendpointId);
1792     return cluster.GetSceneMembership(nullptr, nullptr, groupId);
1793 }
1794 CHIP_ERROR chip_ime_AppendCommand_Scenes_RecallScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1795                                                      chip::GroupId ZCLgroupId, uint16_t groupId, uint8_t sceneId,
1796                                                      uint16_t transitionTime)
1797 {
1798     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1799     chip::Controller::ScenesCluster cluster;
1800     (void) ZCLgroupId;
1801     cluster.Associate(device, ZCLendpointId);
1802     return cluster.RecallScene(nullptr, nullptr, groupId, sceneId, transitionTime);
1803 }
1804 CHIP_ERROR chip_ime_AppendCommand_Scenes_RemoveAllScenes(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1805                                                          chip::GroupId ZCLgroupId, uint16_t groupId)
1806 {
1807     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1808     chip::Controller::ScenesCluster cluster;
1809     (void) ZCLgroupId;
1810     cluster.Associate(device, ZCLendpointId);
1811     return cluster.RemoveAllScenes(nullptr, nullptr, groupId);
1812 }
1813 CHIP_ERROR chip_ime_AppendCommand_Scenes_RemoveScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1814                                                      chip::GroupId ZCLgroupId, uint16_t groupId, uint8_t sceneId)
1815 {
1816     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1817     chip::Controller::ScenesCluster cluster;
1818     (void) ZCLgroupId;
1819     cluster.Associate(device, ZCLendpointId);
1820     return cluster.RemoveScene(nullptr, nullptr, groupId, sceneId);
1821 }
1822 CHIP_ERROR chip_ime_AppendCommand_Scenes_StoreScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1823                                                     chip::GroupId ZCLgroupId, uint16_t groupId, uint8_t sceneId)
1824 {
1825     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1826     chip::Controller::ScenesCluster cluster;
1827     (void) ZCLgroupId;
1828     cluster.Associate(device, ZCLendpointId);
1829     return cluster.StoreScene(nullptr, nullptr, groupId, sceneId);
1830 }
1831 CHIP_ERROR chip_ime_AppendCommand_Scenes_ViewScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1832                                                    chip::GroupId ZCLgroupId, uint16_t groupId, uint8_t sceneId)
1833 {
1834     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1835     chip::Controller::ScenesCluster cluster;
1836     (void) ZCLgroupId;
1837     cluster.Associate(device, ZCLendpointId);
1838     return cluster.ViewScene(nullptr, nullptr, groupId, sceneId);
1839 }
1840
1841 CHIP_ERROR chip_ime_ReadAttribute_Scenes_SceneCount(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1842                                                     chip::GroupId ZCLgroupId)
1843 {
1844     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1845     chip::Controller::ScenesCluster cluster;
1846     (void) ZCLgroupId;
1847     cluster.Associate(device, ZCLendpointId);
1848     return cluster.ReadAttributeSceneCount(nullptr, nullptr);
1849 }
1850 CHIP_ERROR chip_ime_ReadAttribute_Scenes_CurrentScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1851                                                       chip::GroupId ZCLgroupId)
1852 {
1853     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1854     chip::Controller::ScenesCluster cluster;
1855     (void) ZCLgroupId;
1856     cluster.Associate(device, ZCLendpointId);
1857     return cluster.ReadAttributeCurrentScene(nullptr, nullptr);
1858 }
1859 CHIP_ERROR chip_ime_ReadAttribute_Scenes_CurrentGroup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1860                                                       chip::GroupId ZCLgroupId)
1861 {
1862     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1863     chip::Controller::ScenesCluster cluster;
1864     (void) ZCLgroupId;
1865     cluster.Associate(device, ZCLendpointId);
1866     return cluster.ReadAttributeCurrentGroup(nullptr, nullptr);
1867 }
1868 CHIP_ERROR chip_ime_ReadAttribute_Scenes_SceneValid(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1869                                                     chip::GroupId ZCLgroupId)
1870 {
1871     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1872     chip::Controller::ScenesCluster cluster;
1873     (void) ZCLgroupId;
1874     cluster.Associate(device, ZCLendpointId);
1875     return cluster.ReadAttributeSceneValid(nullptr, nullptr);
1876 }
1877 CHIP_ERROR chip_ime_ReadAttribute_Scenes_NameSupport(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1878                                                      chip::GroupId ZCLgroupId)
1879 {
1880     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1881     chip::Controller::ScenesCluster cluster;
1882     (void) ZCLgroupId;
1883     cluster.Associate(device, ZCLendpointId);
1884     return cluster.ReadAttributeNameSupport(nullptr, nullptr);
1885 }
1886 CHIP_ERROR chip_ime_ReadAttribute_Scenes_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1887                                                          chip::GroupId ZCLgroupId)
1888 {
1889     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1890     chip::Controller::ScenesCluster cluster;
1891     (void) ZCLgroupId;
1892     cluster.Associate(device, ZCLendpointId);
1893     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1894 }
1895
1896 // End of Cluster Scenes
1897 // Cluster TemperatureMeasurement
1898
1899 CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue(chip::Controller::Device * device,
1900                                                                        chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1901 {
1902     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1903     chip::Controller::TemperatureMeasurementCluster cluster;
1904     (void) ZCLgroupId;
1905     cluster.Associate(device, ZCLendpointId);
1906     return cluster.ReadAttributeMeasuredValue(nullptr, nullptr);
1907 }
1908 CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue(chip::Controller::Device * device,
1909                                                                           chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1910 {
1911     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1912     chip::Controller::TemperatureMeasurementCluster cluster;
1913     (void) ZCLgroupId;
1914     cluster.Associate(device, ZCLendpointId);
1915     return cluster.ReadAttributeMinMeasuredValue(nullptr, nullptr);
1916 }
1917 CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue(chip::Controller::Device * device,
1918                                                                           chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1919 {
1920     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1921     chip::Controller::TemperatureMeasurementCluster cluster;
1922     (void) ZCLgroupId;
1923     cluster.Associate(device, ZCLendpointId);
1924     return cluster.ReadAttributeMaxMeasuredValue(nullptr, nullptr);
1925 }
1926 CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision(chip::Controller::Device * device,
1927                                                                          chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1928 {
1929     VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1930     chip::Controller::TemperatureMeasurementCluster cluster;
1931     (void) ZCLgroupId;
1932     cluster.Associate(device, ZCLendpointId);
1933     return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1934 }
1935
1936 // End of Cluster TemperatureMeasurement
1937 }