3 * Copyright (c) 2021 Project CHIP Authors
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 // THIS FILE IS GENERATED BY ZAP
20 #include <core/CHIPCore.h>
22 #include <app/CommandSender.h>
23 #include <app/InteractionModelEngine.h>
24 #include <lib/support/Span.h>
26 #include <controller/CHIPClusters.h>
27 #include <controller/CHIPDevice.h>
30 using namespace chip::app;
34 // Cluster ApplicationBasic
36 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_VendorName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
37 chip::GroupId ZCLgroupId)
39 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
40 chip::Controller::ApplicationBasicCluster cluster;
42 cluster.Associate(device, ZCLendpointId);
43 return cluster.ReadAttributeVendorName(nullptr, nullptr);
45 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_VendorId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
46 chip::GroupId ZCLgroupId)
48 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
49 chip::Controller::ApplicationBasicCluster cluster;
51 cluster.Associate(device, ZCLendpointId);
52 return cluster.ReadAttributeVendorId(nullptr, nullptr);
54 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ApplicationName(chip::Controller::Device * device,
55 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
57 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
58 chip::Controller::ApplicationBasicCluster cluster;
60 cluster.Associate(device, ZCLendpointId);
61 return cluster.ReadAttributeApplicationName(nullptr, nullptr);
63 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ProductId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
64 chip::GroupId ZCLgroupId)
66 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
67 chip::Controller::ApplicationBasicCluster cluster;
69 cluster.Associate(device, ZCLendpointId);
70 return cluster.ReadAttributeProductId(nullptr, nullptr);
72 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ApplicationId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
73 chip::GroupId ZCLgroupId)
75 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
76 chip::Controller::ApplicationBasicCluster cluster;
78 cluster.Associate(device, ZCLendpointId);
79 return cluster.ReadAttributeApplicationId(nullptr, nullptr);
81 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId(chip::Controller::Device * device,
82 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
84 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
85 chip::Controller::ApplicationBasicCluster cluster;
87 cluster.Associate(device, ZCLendpointId);
88 return cluster.ReadAttributeCatalogVendorId(nullptr, nullptr);
90 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ApplicationSatus(chip::Controller::Device * device,
91 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
93 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
94 chip::Controller::ApplicationBasicCluster cluster;
96 cluster.Associate(device, ZCLendpointId);
97 return cluster.ReadAttributeApplicationSatus(nullptr, nullptr);
99 CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision(chip::Controller::Device * device,
100 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
102 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
103 chip::Controller::ApplicationBasicCluster cluster;
105 cluster.Associate(device, ZCLendpointId);
106 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
109 // End of Cluster ApplicationBasic
110 // Cluster BarrierControl
112 CHIP_ERROR chip_ime_AppendCommand_BarrierControl_BarrierControlGoToPercent(chip::Controller::Device * device,
113 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId,
116 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
117 chip::Controller::BarrierControlCluster cluster;
119 cluster.Associate(device, ZCLendpointId);
120 return cluster.BarrierControlGoToPercent(nullptr, nullptr, percentOpen);
122 CHIP_ERROR chip_ime_AppendCommand_BarrierControl_BarrierControlStop(chip::Controller::Device * device,
123 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
125 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
126 chip::Controller::BarrierControlCluster cluster;
128 cluster.Associate(device, ZCLendpointId);
129 return cluster.BarrierControlStop(nullptr, nullptr);
132 CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierMovingState(chip::Controller::Device * device,
133 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
135 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
136 chip::Controller::BarrierControlCluster cluster;
138 cluster.Associate(device, ZCLendpointId);
139 return cluster.ReadAttributeBarrierMovingState(nullptr, nullptr);
141 CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus(chip::Controller::Device * device,
142 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
144 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
145 chip::Controller::BarrierControlCluster cluster;
147 cluster.Associate(device, ZCLendpointId);
148 return cluster.ReadAttributeBarrierSafetyStatus(nullptr, nullptr);
150 CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities(chip::Controller::Device * device,
151 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
153 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
154 chip::Controller::BarrierControlCluster cluster;
156 cluster.Associate(device, ZCLendpointId);
157 return cluster.ReadAttributeBarrierCapabilities(nullptr, nullptr);
159 CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierPosition(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
160 chip::GroupId ZCLgroupId)
162 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
163 chip::Controller::BarrierControlCluster cluster;
165 cluster.Associate(device, ZCLendpointId);
166 return cluster.ReadAttributeBarrierPosition(nullptr, nullptr);
168 CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
169 chip::GroupId ZCLgroupId)
171 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
172 chip::Controller::BarrierControlCluster cluster;
174 cluster.Associate(device, ZCLendpointId);
175 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
178 // End of Cluster BarrierControl
181 CHIP_ERROR chip_ime_AppendCommand_Basic_MfgSpecificPing(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
182 chip::GroupId ZCLgroupId)
184 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
185 chip::Controller::BasicCluster cluster;
187 cluster.Associate(device, ZCLendpointId);
188 return cluster.MfgSpecificPing(nullptr, nullptr);
191 CHIP_ERROR chip_ime_ReadAttribute_Basic_InteractionModelVersion(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
192 chip::GroupId ZCLgroupId)
194 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
195 chip::Controller::BasicCluster cluster;
197 cluster.Associate(device, ZCLendpointId);
198 return cluster.ReadAttributeInteractionModelVersion(nullptr, nullptr);
200 CHIP_ERROR chip_ime_ReadAttribute_Basic_VendorName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
201 chip::GroupId ZCLgroupId)
203 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
204 chip::Controller::BasicCluster cluster;
206 cluster.Associate(device, ZCLendpointId);
207 return cluster.ReadAttributeVendorName(nullptr, nullptr);
209 CHIP_ERROR chip_ime_ReadAttribute_Basic_VendorID(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
210 chip::GroupId ZCLgroupId)
212 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
213 chip::Controller::BasicCluster cluster;
215 cluster.Associate(device, ZCLendpointId);
216 return cluster.ReadAttributeVendorID(nullptr, nullptr);
218 CHIP_ERROR chip_ime_ReadAttribute_Basic_ProductName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
219 chip::GroupId ZCLgroupId)
221 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
222 chip::Controller::BasicCluster cluster;
224 cluster.Associate(device, ZCLendpointId);
225 return cluster.ReadAttributeProductName(nullptr, nullptr);
227 CHIP_ERROR chip_ime_ReadAttribute_Basic_ProductID(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
228 chip::GroupId ZCLgroupId)
230 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
231 chip::Controller::BasicCluster cluster;
233 cluster.Associate(device, ZCLendpointId);
234 return cluster.ReadAttributeProductID(nullptr, nullptr);
236 CHIP_ERROR chip_ime_ReadAttribute_Basic_UserLabel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
237 chip::GroupId ZCLgroupId)
239 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
240 chip::Controller::BasicCluster cluster;
242 cluster.Associate(device, ZCLendpointId);
243 return cluster.ReadAttributeUserLabel(nullptr, nullptr);
245 CHIP_ERROR chip_ime_ReadAttribute_Basic_Location(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
246 chip::GroupId ZCLgroupId)
248 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
249 chip::Controller::BasicCluster cluster;
251 cluster.Associate(device, ZCLendpointId);
252 return cluster.ReadAttributeLocation(nullptr, nullptr);
254 CHIP_ERROR chip_ime_ReadAttribute_Basic_HardwareVersion(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
255 chip::GroupId ZCLgroupId)
257 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
258 chip::Controller::BasicCluster cluster;
260 cluster.Associate(device, ZCLendpointId);
261 return cluster.ReadAttributeHardwareVersion(nullptr, nullptr);
263 CHIP_ERROR chip_ime_ReadAttribute_Basic_HardwareVersionString(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
264 chip::GroupId ZCLgroupId)
266 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
267 chip::Controller::BasicCluster cluster;
269 cluster.Associate(device, ZCLendpointId);
270 return cluster.ReadAttributeHardwareVersionString(nullptr, nullptr);
272 CHIP_ERROR chip_ime_ReadAttribute_Basic_SoftwareVersion(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
273 chip::GroupId ZCLgroupId)
275 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
276 chip::Controller::BasicCluster cluster;
278 cluster.Associate(device, ZCLendpointId);
279 return cluster.ReadAttributeSoftwareVersion(nullptr, nullptr);
281 CHIP_ERROR chip_ime_ReadAttribute_Basic_SoftwareVersionString(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
282 chip::GroupId ZCLgroupId)
284 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
285 chip::Controller::BasicCluster cluster;
287 cluster.Associate(device, ZCLendpointId);
288 return cluster.ReadAttributeSoftwareVersionString(nullptr, nullptr);
290 CHIP_ERROR chip_ime_ReadAttribute_Basic_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
291 chip::GroupId ZCLgroupId)
293 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
294 chip::Controller::BasicCluster cluster;
296 cluster.Associate(device, ZCLendpointId);
297 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
300 // End of Cluster Basic
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)
307 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
308 chip::Controller::BindingCluster cluster;
310 cluster.Associate(device, ZCLendpointId);
311 return cluster.Bind(nullptr, nullptr, nodeId, groupId, endpointId, clusterId);
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)
317 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
318 chip::Controller::BindingCluster cluster;
320 cluster.Associate(device, ZCLendpointId);
321 return cluster.Unbind(nullptr, nullptr, nodeId, groupId, endpointId, clusterId);
324 CHIP_ERROR chip_ime_ReadAttribute_Binding_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
325 chip::GroupId ZCLgroupId)
327 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
328 chip::Controller::BindingCluster cluster;
330 cluster.Associate(device, ZCLendpointId);
331 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
334 // End of Cluster Binding
335 // Cluster ColorControl
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)
341 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
342 chip::Controller::ColorControlCluster cluster;
344 cluster.Associate(device, ZCLendpointId);
345 return cluster.MoveColor(nullptr, nullptr, rateX, rateY, optionsMask, optionsOverride);
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)
351 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
352 chip::Controller::ColorControlCluster cluster;
354 cluster.Associate(device, ZCLendpointId);
355 return cluster.MoveColorTemperature(nullptr, nullptr, moveMode, rate, colorTemperatureMinimum, colorTemperatureMaximum,
356 optionsMask, optionsOverride);
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)
362 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
363 chip::Controller::ColorControlCluster cluster;
365 cluster.Associate(device, ZCLendpointId);
366 return cluster.MoveHue(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride);
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)
372 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
373 chip::Controller::ColorControlCluster cluster;
375 cluster.Associate(device, ZCLendpointId);
376 return cluster.MoveSaturation(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride);
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)
382 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
383 chip::Controller::ColorControlCluster cluster;
385 cluster.Associate(device, ZCLendpointId);
386 return cluster.MoveToColor(nullptr, nullptr, colorX, colorY, transitionTime, optionsMask, optionsOverride);
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)
393 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
394 chip::Controller::ColorControlCluster cluster;
396 cluster.Associate(device, ZCLendpointId);
397 return cluster.MoveToColorTemperature(nullptr, nullptr, colorTemperature, transitionTime, optionsMask, optionsOverride);
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)
403 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
404 chip::Controller::ColorControlCluster cluster;
406 cluster.Associate(device, ZCLendpointId);
407 return cluster.MoveToHue(nullptr, nullptr, hue, direction, transitionTime, optionsMask, optionsOverride);
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)
414 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
415 chip::Controller::ColorControlCluster cluster;
417 cluster.Associate(device, ZCLendpointId);
418 return cluster.MoveToHueAndSaturation(nullptr, nullptr, hue, saturation, transitionTime, optionsMask, optionsOverride);
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)
425 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
426 chip::Controller::ColorControlCluster cluster;
428 cluster.Associate(device, ZCLendpointId);
429 return cluster.MoveToSaturation(nullptr, nullptr, saturation, transitionTime, optionsMask, optionsOverride);
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)
435 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
436 chip::Controller::ColorControlCluster cluster;
438 cluster.Associate(device, ZCLendpointId);
439 return cluster.StepColor(nullptr, nullptr, stepX, stepY, transitionTime, optionsMask, optionsOverride);
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)
448 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
449 chip::Controller::ColorControlCluster cluster;
451 cluster.Associate(device, ZCLendpointId);
452 return cluster.StepColorTemperature(nullptr, nullptr, stepMode, stepSize, transitionTime, colorTemperatureMinimum,
453 colorTemperatureMaximum, optionsMask, optionsOverride);
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)
459 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
460 chip::Controller::ColorControlCluster cluster;
462 cluster.Associate(device, ZCLendpointId);
463 return cluster.StepHue(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride);
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)
469 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
470 chip::Controller::ColorControlCluster cluster;
472 cluster.Associate(device, ZCLendpointId);
473 return cluster.StepSaturation(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride);
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)
478 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
479 chip::Controller::ColorControlCluster cluster;
481 cluster.Associate(device, ZCLendpointId);
482 return cluster.StopMoveStep(nullptr, nullptr, optionsMask, optionsOverride);
485 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
486 chip::GroupId ZCLgroupId)
488 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
489 chip::Controller::ColorControlCluster cluster;
491 cluster.Associate(device, ZCLendpointId);
492 return cluster.ReadAttributeCurrentHue(nullptr, nullptr);
494 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentSaturation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
495 chip::GroupId ZCLgroupId)
497 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
498 chip::Controller::ColorControlCluster cluster;
500 cluster.Associate(device, ZCLendpointId);
501 return cluster.ReadAttributeCurrentSaturation(nullptr, nullptr);
503 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_RemainingTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
504 chip::GroupId ZCLgroupId)
506 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
507 chip::Controller::ColorControlCluster cluster;
509 cluster.Associate(device, ZCLendpointId);
510 return cluster.ReadAttributeRemainingTime(nullptr, nullptr);
512 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
513 chip::GroupId ZCLgroupId)
515 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
516 chip::Controller::ColorControlCluster cluster;
518 cluster.Associate(device, ZCLendpointId);
519 return cluster.ReadAttributeCurrentX(nullptr, nullptr);
521 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
522 chip::GroupId ZCLgroupId)
524 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
525 chip::Controller::ColorControlCluster cluster;
527 cluster.Associate(device, ZCLendpointId);
528 return cluster.ReadAttributeCurrentY(nullptr, nullptr);
530 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_DriftCompensation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
531 chip::GroupId ZCLgroupId)
533 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
534 chip::Controller::ColorControlCluster cluster;
536 cluster.Associate(device, ZCLendpointId);
537 return cluster.ReadAttributeDriftCompensation(nullptr, nullptr);
539 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CompensationText(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
540 chip::GroupId ZCLgroupId)
542 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
543 chip::Controller::ColorControlCluster cluster;
545 cluster.Associate(device, ZCLendpointId);
546 return cluster.ReadAttributeCompensationText(nullptr, nullptr);
548 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorTemperature(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
549 chip::GroupId ZCLgroupId)
551 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
552 chip::Controller::ColorControlCluster cluster;
554 cluster.Associate(device, ZCLendpointId);
555 return cluster.ReadAttributeColorTemperature(nullptr, nullptr);
557 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorMode(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
558 chip::GroupId ZCLgroupId)
560 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
561 chip::Controller::ColorControlCluster cluster;
563 cluster.Associate(device, ZCLendpointId);
564 return cluster.ReadAttributeColorMode(nullptr, nullptr);
566 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorControlOptions(chip::Controller::Device * device,
567 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
569 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
570 chip::Controller::ColorControlCluster cluster;
572 cluster.Associate(device, ZCLendpointId);
573 return cluster.ReadAttributeColorControlOptions(nullptr, nullptr);
575 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
576 chip::GroupId ZCLgroupId)
578 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
579 chip::Controller::ColorControlCluster cluster;
581 cluster.Associate(device, ZCLendpointId);
582 return cluster.ReadAttributeNumberOfPrimaries(nullptr, nullptr);
584 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary1X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
585 chip::GroupId ZCLgroupId)
587 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
588 chip::Controller::ColorControlCluster cluster;
590 cluster.Associate(device, ZCLendpointId);
591 return cluster.ReadAttributePrimary1X(nullptr, nullptr);
593 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary1Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
594 chip::GroupId ZCLgroupId)
596 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
597 chip::Controller::ColorControlCluster cluster;
599 cluster.Associate(device, ZCLendpointId);
600 return cluster.ReadAttributePrimary1Y(nullptr, nullptr);
602 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary1Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
603 chip::GroupId ZCLgroupId)
605 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
606 chip::Controller::ColorControlCluster cluster;
608 cluster.Associate(device, ZCLendpointId);
609 return cluster.ReadAttributePrimary1Intensity(nullptr, nullptr);
611 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary2X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
612 chip::GroupId ZCLgroupId)
614 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
615 chip::Controller::ColorControlCluster cluster;
617 cluster.Associate(device, ZCLendpointId);
618 return cluster.ReadAttributePrimary2X(nullptr, nullptr);
620 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary2Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
621 chip::GroupId ZCLgroupId)
623 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
624 chip::Controller::ColorControlCluster cluster;
626 cluster.Associate(device, ZCLendpointId);
627 return cluster.ReadAttributePrimary2Y(nullptr, nullptr);
629 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary2Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
630 chip::GroupId ZCLgroupId)
632 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
633 chip::Controller::ColorControlCluster cluster;
635 cluster.Associate(device, ZCLendpointId);
636 return cluster.ReadAttributePrimary2Intensity(nullptr, nullptr);
638 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary3X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
639 chip::GroupId ZCLgroupId)
641 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
642 chip::Controller::ColorControlCluster cluster;
644 cluster.Associate(device, ZCLendpointId);
645 return cluster.ReadAttributePrimary3X(nullptr, nullptr);
647 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary3Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
648 chip::GroupId ZCLgroupId)
650 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
651 chip::Controller::ColorControlCluster cluster;
653 cluster.Associate(device, ZCLendpointId);
654 return cluster.ReadAttributePrimary3Y(nullptr, nullptr);
656 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary3Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
657 chip::GroupId ZCLgroupId)
659 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
660 chip::Controller::ColorControlCluster cluster;
662 cluster.Associate(device, ZCLendpointId);
663 return cluster.ReadAttributePrimary3Intensity(nullptr, nullptr);
665 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary4X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
666 chip::GroupId ZCLgroupId)
668 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
669 chip::Controller::ColorControlCluster cluster;
671 cluster.Associate(device, ZCLendpointId);
672 return cluster.ReadAttributePrimary4X(nullptr, nullptr);
674 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary4Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
675 chip::GroupId ZCLgroupId)
677 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
678 chip::Controller::ColorControlCluster cluster;
680 cluster.Associate(device, ZCLendpointId);
681 return cluster.ReadAttributePrimary4Y(nullptr, nullptr);
683 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary4Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
684 chip::GroupId ZCLgroupId)
686 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
687 chip::Controller::ColorControlCluster cluster;
689 cluster.Associate(device, ZCLendpointId);
690 return cluster.ReadAttributePrimary4Intensity(nullptr, nullptr);
692 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary5X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
693 chip::GroupId ZCLgroupId)
695 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
696 chip::Controller::ColorControlCluster cluster;
698 cluster.Associate(device, ZCLendpointId);
699 return cluster.ReadAttributePrimary5X(nullptr, nullptr);
701 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary5Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
702 chip::GroupId ZCLgroupId)
704 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
705 chip::Controller::ColorControlCluster cluster;
707 cluster.Associate(device, ZCLendpointId);
708 return cluster.ReadAttributePrimary5Y(nullptr, nullptr);
710 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary5Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
711 chip::GroupId ZCLgroupId)
713 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
714 chip::Controller::ColorControlCluster cluster;
716 cluster.Associate(device, ZCLendpointId);
717 return cluster.ReadAttributePrimary5Intensity(nullptr, nullptr);
719 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary6X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
720 chip::GroupId ZCLgroupId)
722 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
723 chip::Controller::ColorControlCluster cluster;
725 cluster.Associate(device, ZCLendpointId);
726 return cluster.ReadAttributePrimary6X(nullptr, nullptr);
728 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary6Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
729 chip::GroupId ZCLgroupId)
731 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
732 chip::Controller::ColorControlCluster cluster;
734 cluster.Associate(device, ZCLendpointId);
735 return cluster.ReadAttributePrimary6Y(nullptr, nullptr);
737 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary6Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
738 chip::GroupId ZCLgroupId)
740 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
741 chip::Controller::ColorControlCluster cluster;
743 cluster.Associate(device, ZCLendpointId);
744 return cluster.ReadAttributePrimary6Intensity(nullptr, nullptr);
746 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_WhitePointX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
747 chip::GroupId ZCLgroupId)
749 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
750 chip::Controller::ColorControlCluster cluster;
752 cluster.Associate(device, ZCLendpointId);
753 return cluster.ReadAttributeWhitePointX(nullptr, nullptr);
755 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_WhitePointY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
756 chip::GroupId ZCLgroupId)
758 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
759 chip::Controller::ColorControlCluster cluster;
761 cluster.Associate(device, ZCLendpointId);
762 return cluster.ReadAttributeWhitePointY(nullptr, nullptr);
764 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointRX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
765 chip::GroupId ZCLgroupId)
767 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
768 chip::Controller::ColorControlCluster cluster;
770 cluster.Associate(device, ZCLendpointId);
771 return cluster.ReadAttributeColorPointRX(nullptr, nullptr);
773 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointRY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
774 chip::GroupId ZCLgroupId)
776 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
777 chip::Controller::ColorControlCluster cluster;
779 cluster.Associate(device, ZCLendpointId);
780 return cluster.ReadAttributeColorPointRY(nullptr, nullptr);
782 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity(chip::Controller::Device * device,
783 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
785 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
786 chip::Controller::ColorControlCluster cluster;
788 cluster.Associate(device, ZCLendpointId);
789 return cluster.ReadAttributeColorPointRIntensity(nullptr, nullptr);
791 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointGX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
792 chip::GroupId ZCLgroupId)
794 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
795 chip::Controller::ColorControlCluster cluster;
797 cluster.Associate(device, ZCLendpointId);
798 return cluster.ReadAttributeColorPointGX(nullptr, nullptr);
800 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointGY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
801 chip::GroupId ZCLgroupId)
803 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
804 chip::Controller::ColorControlCluster cluster;
806 cluster.Associate(device, ZCLendpointId);
807 return cluster.ReadAttributeColorPointGY(nullptr, nullptr);
809 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity(chip::Controller::Device * device,
810 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
812 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
813 chip::Controller::ColorControlCluster cluster;
815 cluster.Associate(device, ZCLendpointId);
816 return cluster.ReadAttributeColorPointGIntensity(nullptr, nullptr);
818 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointBX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
819 chip::GroupId ZCLgroupId)
821 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
822 chip::Controller::ColorControlCluster cluster;
824 cluster.Associate(device, ZCLendpointId);
825 return cluster.ReadAttributeColorPointBX(nullptr, nullptr);
827 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointBY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
828 chip::GroupId ZCLgroupId)
830 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
831 chip::Controller::ColorControlCluster cluster;
833 cluster.Associate(device, ZCLendpointId);
834 return cluster.ReadAttributeColorPointBY(nullptr, nullptr);
836 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity(chip::Controller::Device * device,
837 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
839 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
840 chip::Controller::ColorControlCluster cluster;
842 cluster.Associate(device, ZCLendpointId);
843 return cluster.ReadAttributeColorPointBIntensity(nullptr, nullptr);
845 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
846 chip::GroupId ZCLgroupId)
848 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
849 chip::Controller::ColorControlCluster cluster;
851 cluster.Associate(device, ZCLendpointId);
852 return cluster.ReadAttributeEnhancedCurrentHue(nullptr, nullptr);
854 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_EnhancedColorMode(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
855 chip::GroupId ZCLgroupId)
857 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
858 chip::Controller::ColorControlCluster cluster;
860 cluster.Associate(device, ZCLendpointId);
861 return cluster.ReadAttributeEnhancedColorMode(nullptr, nullptr);
863 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorLoopActive(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
864 chip::GroupId ZCLgroupId)
866 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
867 chip::Controller::ColorControlCluster cluster;
869 cluster.Associate(device, ZCLendpointId);
870 return cluster.ReadAttributeColorLoopActive(nullptr, nullptr);
872 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorLoopDirection(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
873 chip::GroupId ZCLgroupId)
875 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
876 chip::Controller::ColorControlCluster cluster;
878 cluster.Associate(device, ZCLendpointId);
879 return cluster.ReadAttributeColorLoopDirection(nullptr, nullptr);
881 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorLoopTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
882 chip::GroupId ZCLgroupId)
884 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
885 chip::Controller::ColorControlCluster cluster;
887 cluster.Associate(device, ZCLendpointId);
888 return cluster.ReadAttributeColorLoopTime(nullptr, nullptr);
890 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorCapabilities(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
891 chip::GroupId ZCLgroupId)
893 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
894 chip::Controller::ColorControlCluster cluster;
896 cluster.Associate(device, ZCLendpointId);
897 return cluster.ReadAttributeColorCapabilities(nullptr, nullptr);
899 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin(chip::Controller::Device * device,
900 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
902 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
903 chip::Controller::ColorControlCluster cluster;
905 cluster.Associate(device, ZCLendpointId);
906 return cluster.ReadAttributeColorTempPhysicalMin(nullptr, nullptr);
908 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax(chip::Controller::Device * device,
909 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
911 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
912 chip::Controller::ColorControlCluster cluster;
914 cluster.Associate(device, ZCLendpointId);
915 return cluster.ReadAttributeColorTempPhysicalMax(nullptr, nullptr);
917 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds(chip::Controller::Device * device,
918 chip::EndpointId ZCLendpointId,
919 chip::GroupId ZCLgroupId)
921 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
922 chip::Controller::ColorControlCluster cluster;
924 cluster.Associate(device, ZCLendpointId);
925 return cluster.ReadAttributeCoupleColorTempToLevelMinMireds(nullptr, nullptr);
927 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds(chip::Controller::Device * device,
928 chip::EndpointId ZCLendpointId,
929 chip::GroupId ZCLgroupId)
931 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
932 chip::Controller::ColorControlCluster cluster;
934 cluster.Associate(device, ZCLendpointId);
935 return cluster.ReadAttributeStartUpColorTemperatureMireds(nullptr, nullptr);
937 CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
938 chip::GroupId ZCLgroupId)
940 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
941 chip::Controller::ColorControlCluster cluster;
943 cluster.Associate(device, ZCLendpointId);
944 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
947 // End of Cluster ColorControl
950 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearAllPins(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
951 chip::GroupId ZCLgroupId)
953 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
954 chip::Controller::DoorLockCluster cluster;
956 cluster.Associate(device, ZCLendpointId);
957 return cluster.ClearAllPins(nullptr, nullptr);
959 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearAllRfids(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
960 chip::GroupId ZCLgroupId)
962 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
963 chip::Controller::DoorLockCluster cluster;
965 cluster.Associate(device, ZCLendpointId);
966 return cluster.ClearAllRfids(nullptr, nullptr);
968 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearHolidaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
969 chip::GroupId ZCLgroupId, uint8_t scheduleId)
971 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
972 chip::Controller::DoorLockCluster cluster;
974 cluster.Associate(device, ZCLendpointId);
975 return cluster.ClearHolidaySchedule(nullptr, nullptr, scheduleId);
977 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearPin(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
978 chip::GroupId ZCLgroupId, uint16_t userId)
980 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
981 chip::Controller::DoorLockCluster cluster;
983 cluster.Associate(device, ZCLendpointId);
984 return cluster.ClearPin(nullptr, nullptr, userId);
986 CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearRfid(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
987 chip::GroupId ZCLgroupId, uint16_t userId)
989 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
990 chip::Controller::DoorLockCluster cluster;
992 cluster.Associate(device, ZCLendpointId);
993 return cluster.ClearRfid(nullptr, nullptr, userId);
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)
998 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
999 chip::Controller::DoorLockCluster cluster;
1001 cluster.Associate(device, ZCLendpointId);
1002 return cluster.ClearWeekdaySchedule(nullptr, nullptr, scheduleId, userId);
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)
1007 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1008 chip::Controller::DoorLockCluster cluster;
1010 cluster.Associate(device, ZCLendpointId);
1011 return cluster.ClearYeardaySchedule(nullptr, nullptr, scheduleId, userId);
1013 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetHolidaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1014 chip::GroupId ZCLgroupId, uint8_t scheduleId)
1016 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1017 chip::Controller::DoorLockCluster cluster;
1019 cluster.Associate(device, ZCLendpointId);
1020 return cluster.GetHolidaySchedule(nullptr, nullptr, scheduleId);
1022 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetLogRecord(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1023 chip::GroupId ZCLgroupId, uint16_t logIndex)
1025 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1026 chip::Controller::DoorLockCluster cluster;
1028 cluster.Associate(device, ZCLendpointId);
1029 return cluster.GetLogRecord(nullptr, nullptr, logIndex);
1031 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetPin(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1032 chip::GroupId ZCLgroupId, uint16_t userId)
1034 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1035 chip::Controller::DoorLockCluster cluster;
1037 cluster.Associate(device, ZCLendpointId);
1038 return cluster.GetPin(nullptr, nullptr, userId);
1040 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetRfid(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1041 chip::GroupId ZCLgroupId, uint16_t userId)
1043 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1044 chip::Controller::DoorLockCluster cluster;
1046 cluster.Associate(device, ZCLendpointId);
1047 return cluster.GetRfid(nullptr, nullptr, userId);
1049 CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetUserType(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1050 chip::GroupId ZCLgroupId, uint16_t userId)
1052 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1053 chip::Controller::DoorLockCluster cluster;
1055 cluster.Associate(device, ZCLendpointId);
1056 return cluster.GetUserType(nullptr, nullptr, userId);
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)
1061 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1062 chip::Controller::DoorLockCluster cluster;
1064 cluster.Associate(device, ZCLendpointId);
1065 return cluster.GetWeekdaySchedule(nullptr, nullptr, scheduleId, userId);
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)
1070 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1071 chip::Controller::DoorLockCluster cluster;
1073 cluster.Associate(device, ZCLendpointId);
1074 return cluster.GetYeardaySchedule(nullptr, nullptr, scheduleId, userId);
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)
1079 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1080 chip::Controller::DoorLockCluster cluster;
1082 cluster.Associate(device, ZCLendpointId);
1083 return cluster.LockDoor(nullptr, nullptr, chip::ByteSpan(pin, pin_Len));
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)
1089 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1090 chip::Controller::DoorLockCluster cluster;
1092 cluster.Associate(device, ZCLendpointId);
1093 return cluster.SetHolidaySchedule(nullptr, nullptr, scheduleId, localStartTime, localEndTime, operatingModeDuringHoliday);
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)
1099 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1100 chip::Controller::DoorLockCluster cluster;
1102 cluster.Associate(device, ZCLendpointId);
1103 return cluster.SetPin(nullptr, nullptr, userId, userStatus, userType, chip::ByteSpan(pin, pin_Len));
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)
1109 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1110 chip::Controller::DoorLockCluster cluster;
1112 cluster.Associate(device, ZCLendpointId);
1113 return cluster.SetRfid(nullptr, nullptr, userId, userStatus, userType, chip::ByteSpan(id, id_Len));
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)
1118 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1119 chip::Controller::DoorLockCluster cluster;
1121 cluster.Associate(device, ZCLendpointId);
1122 return cluster.SetUserType(nullptr, nullptr, userId, userType);
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)
1129 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1130 chip::Controller::DoorLockCluster cluster;
1132 cluster.Associate(device, ZCLendpointId);
1133 return cluster.SetWeekdaySchedule(nullptr, nullptr, scheduleId, userId, daysMask, startHour, startMinute, endHour, endMinute);
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)
1139 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1140 chip::Controller::DoorLockCluster cluster;
1142 cluster.Associate(device, ZCLendpointId);
1143 return cluster.SetYeardaySchedule(nullptr, nullptr, scheduleId, userId, localStartTime, localEndTime);
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)
1148 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1149 chip::Controller::DoorLockCluster cluster;
1151 cluster.Associate(device, ZCLendpointId);
1152 return cluster.UnlockDoor(nullptr, nullptr, chip::ByteSpan(pin, pin_Len));
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)
1158 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1159 chip::Controller::DoorLockCluster cluster;
1161 cluster.Associate(device, ZCLendpointId);
1162 return cluster.UnlockWithTimeout(nullptr, nullptr, timeoutInSeconds, chip::ByteSpan(pin, pin_Len));
1165 CHIP_ERROR chip_ime_ReadAttribute_DoorLock_LockState(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1166 chip::GroupId ZCLgroupId)
1168 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1169 chip::Controller::DoorLockCluster cluster;
1171 cluster.Associate(device, ZCLendpointId);
1172 return cluster.ReadAttributeLockState(nullptr, nullptr);
1174 CHIP_ERROR chip_ime_ReadAttribute_DoorLock_LockType(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1175 chip::GroupId ZCLgroupId)
1177 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1178 chip::Controller::DoorLockCluster cluster;
1180 cluster.Associate(device, ZCLendpointId);
1181 return cluster.ReadAttributeLockType(nullptr, nullptr);
1183 CHIP_ERROR chip_ime_ReadAttribute_DoorLock_ActuatorEnabled(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1184 chip::GroupId ZCLgroupId)
1186 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1187 chip::Controller::DoorLockCluster cluster;
1189 cluster.Associate(device, ZCLendpointId);
1190 return cluster.ReadAttributeActuatorEnabled(nullptr, nullptr);
1192 CHIP_ERROR chip_ime_ReadAttribute_DoorLock_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1193 chip::GroupId ZCLgroupId)
1195 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1196 chip::Controller::DoorLockCluster cluster;
1198 cluster.Associate(device, ZCLendpointId);
1199 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1202 // End of Cluster DoorLock
1203 // Cluster GeneralCommissioning
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,
1210 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1211 chip::Controller::GeneralCommissioningCluster cluster;
1213 cluster.Associate(device, ZCLendpointId);
1214 return cluster.ArmFailSafe(nullptr, nullptr, expiryLengthSeconds, breadcrumb, timeoutMs);
1216 CHIP_ERROR chip_ime_AppendCommand_GeneralCommissioning_CommissioningComplete(chip::Controller::Device * device,
1217 chip::EndpointId ZCLendpointId,
1218 chip::GroupId ZCLgroupId)
1220 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1221 chip::Controller::GeneralCommissioningCluster cluster;
1223 cluster.Associate(device, ZCLendpointId);
1224 return cluster.CommissioningComplete(nullptr, nullptr);
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)
1231 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1232 chip::Controller::GeneralCommissioningCluster cluster;
1234 cluster.Associate(device, ZCLendpointId);
1235 return cluster.SetFabric(nullptr, nullptr, chip::ByteSpan(fabricId, fabricId_Len),
1236 chip::ByteSpan(fabricSecret, fabricSecret_Len), breadcrumb, timeoutMs);
1239 CHIP_ERROR chip_ime_ReadAttribute_GeneralCommissioning_FabricId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1240 chip::GroupId ZCLgroupId)
1242 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1243 chip::Controller::GeneralCommissioningCluster cluster;
1245 cluster.Associate(device, ZCLendpointId);
1246 return cluster.ReadAttributeFabricId(nullptr, nullptr);
1248 CHIP_ERROR chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1249 chip::GroupId ZCLgroupId)
1251 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1252 chip::Controller::GeneralCommissioningCluster cluster;
1254 cluster.Associate(device, ZCLendpointId);
1255 return cluster.ReadAttributeBreadcrumb(nullptr, nullptr);
1257 CHIP_ERROR chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision(chip::Controller::Device * device,
1258 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1260 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1261 chip::Controller::GeneralCommissioningCluster cluster;
1263 cluster.Associate(device, ZCLendpointId);
1264 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1267 // End of Cluster GeneralCommissioning
1268 // Cluster GroupKeyManagement
1270 CHIP_ERROR chip_ime_ReadAttribute_GroupKeyManagement_Groups(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1271 chip::GroupId ZCLgroupId)
1273 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1274 chip::Controller::GroupKeyManagementCluster cluster;
1276 cluster.Associate(device, ZCLendpointId);
1277 return cluster.ReadAttributeGroups(nullptr, nullptr);
1279 CHIP_ERROR chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1280 chip::GroupId ZCLgroupId)
1282 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1283 chip::Controller::GroupKeyManagementCluster cluster;
1285 cluster.Associate(device, ZCLendpointId);
1286 return cluster.ReadAttributeGroupKeys(nullptr, nullptr);
1288 CHIP_ERROR chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision(chip::Controller::Device * device,
1289 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1291 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1292 chip::Controller::GroupKeyManagementCluster cluster;
1294 cluster.Associate(device, ZCLendpointId);
1295 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1298 // End of Cluster GroupKeyManagement
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)
1305 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1306 chip::Controller::GroupsCluster cluster;
1308 cluster.Associate(device, ZCLendpointId);
1309 return cluster.AddGroup(nullptr, nullptr, groupId, chip::ByteSpan(groupName, groupName_Len));
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)
1315 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1316 chip::Controller::GroupsCluster cluster;
1318 cluster.Associate(device, ZCLendpointId);
1319 return cluster.AddGroupIfIdentifying(nullptr, nullptr, groupId, chip::ByteSpan(groupName, groupName_Len));
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)
1324 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1325 chip::Controller::GroupsCluster cluster;
1327 cluster.Associate(device, ZCLendpointId);
1328 return cluster.GetGroupMembership(nullptr, nullptr, groupCount, groupList);
1330 CHIP_ERROR chip_ime_AppendCommand_Groups_RemoveAllGroups(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1331 chip::GroupId ZCLgroupId)
1333 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1334 chip::Controller::GroupsCluster cluster;
1336 cluster.Associate(device, ZCLendpointId);
1337 return cluster.RemoveAllGroups(nullptr, nullptr);
1339 CHIP_ERROR chip_ime_AppendCommand_Groups_RemoveGroup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1340 chip::GroupId ZCLgroupId, uint16_t groupId)
1342 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1343 chip::Controller::GroupsCluster cluster;
1345 cluster.Associate(device, ZCLendpointId);
1346 return cluster.RemoveGroup(nullptr, nullptr, groupId);
1348 CHIP_ERROR chip_ime_AppendCommand_Groups_ViewGroup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1349 chip::GroupId ZCLgroupId, uint16_t groupId)
1351 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1352 chip::Controller::GroupsCluster cluster;
1354 cluster.Associate(device, ZCLendpointId);
1355 return cluster.ViewGroup(nullptr, nullptr, groupId);
1358 CHIP_ERROR chip_ime_ReadAttribute_Groups_NameSupport(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1359 chip::GroupId ZCLgroupId)
1361 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1362 chip::Controller::GroupsCluster cluster;
1364 cluster.Associate(device, ZCLendpointId);
1365 return cluster.ReadAttributeNameSupport(nullptr, nullptr);
1367 CHIP_ERROR chip_ime_ReadAttribute_Groups_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1368 chip::GroupId ZCLgroupId)
1370 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1371 chip::Controller::GroupsCluster cluster;
1373 cluster.Associate(device, ZCLendpointId);
1374 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1377 // End of Cluster Groups
1380 CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneState(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1381 chip::GroupId ZCLgroupId)
1383 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1384 chip::Controller::IasZoneCluster cluster;
1386 cluster.Associate(device, ZCLendpointId);
1387 return cluster.ReadAttributeZoneState(nullptr, nullptr);
1389 CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneType(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1390 chip::GroupId ZCLgroupId)
1392 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1393 chip::Controller::IasZoneCluster cluster;
1395 cluster.Associate(device, ZCLendpointId);
1396 return cluster.ReadAttributeZoneType(nullptr, nullptr);
1398 CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneStatus(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1399 chip::GroupId ZCLgroupId)
1401 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1402 chip::Controller::IasZoneCluster cluster;
1404 cluster.Associate(device, ZCLendpointId);
1405 return cluster.ReadAttributeZoneStatus(nullptr, nullptr);
1407 CHIP_ERROR chip_ime_ReadAttribute_IasZone_IasCieAddress(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1408 chip::GroupId ZCLgroupId)
1410 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1411 chip::Controller::IasZoneCluster cluster;
1413 cluster.Associate(device, ZCLendpointId);
1414 return cluster.ReadAttributeIasCieAddress(nullptr, nullptr);
1416 CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1417 chip::GroupId ZCLgroupId)
1419 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1420 chip::Controller::IasZoneCluster cluster;
1422 cluster.Associate(device, ZCLendpointId);
1423 return cluster.ReadAttributeZoneId(nullptr, nullptr);
1425 CHIP_ERROR chip_ime_ReadAttribute_IasZone_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1426 chip::GroupId ZCLgroupId)
1428 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1429 chip::Controller::IasZoneCluster cluster;
1431 cluster.Associate(device, ZCLendpointId);
1432 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1435 // End of Cluster IasZone
1438 CHIP_ERROR chip_ime_AppendCommand_Identify_Identify(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1439 chip::GroupId ZCLgroupId, uint16_t identifyTime)
1441 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1442 chip::Controller::IdentifyCluster cluster;
1444 cluster.Associate(device, ZCLendpointId);
1445 return cluster.Identify(nullptr, nullptr, identifyTime);
1447 CHIP_ERROR chip_ime_AppendCommand_Identify_IdentifyQuery(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1448 chip::GroupId ZCLgroupId)
1450 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1451 chip::Controller::IdentifyCluster cluster;
1453 cluster.Associate(device, ZCLendpointId);
1454 return cluster.IdentifyQuery(nullptr, nullptr);
1457 CHIP_ERROR chip_ime_ReadAttribute_Identify_IdentifyTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1458 chip::GroupId ZCLgroupId)
1460 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1461 chip::Controller::IdentifyCluster cluster;
1463 cluster.Associate(device, ZCLendpointId);
1464 return cluster.ReadAttributeIdentifyTime(nullptr, nullptr);
1466 CHIP_ERROR chip_ime_ReadAttribute_Identify_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1467 chip::GroupId ZCLgroupId)
1469 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1470 chip::Controller::IdentifyCluster cluster;
1472 cluster.Associate(device, ZCLendpointId);
1473 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1476 // End of Cluster Identify
1477 // Cluster LevelControl
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)
1483 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1484 chip::Controller::LevelControlCluster cluster;
1486 cluster.Associate(device, ZCLendpointId);
1487 return cluster.Move(nullptr, nullptr, moveMode, rate, optionMask, optionOverride);
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)
1493 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1494 chip::Controller::LevelControlCluster cluster;
1496 cluster.Associate(device, ZCLendpointId);
1497 return cluster.MoveToLevel(nullptr, nullptr, level, transitionTime, optionMask, optionOverride);
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)
1503 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1504 chip::Controller::LevelControlCluster cluster;
1506 cluster.Associate(device, ZCLendpointId);
1507 return cluster.MoveToLevelWithOnOff(nullptr, nullptr, level, transitionTime);
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)
1512 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1513 chip::Controller::LevelControlCluster cluster;
1515 cluster.Associate(device, ZCLendpointId);
1516 return cluster.MoveWithOnOff(nullptr, nullptr, moveMode, rate);
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)
1522 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1523 chip::Controller::LevelControlCluster cluster;
1525 cluster.Associate(device, ZCLendpointId);
1526 return cluster.Step(nullptr, nullptr, stepMode, stepSize, transitionTime, optionMask, optionOverride);
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)
1532 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1533 chip::Controller::LevelControlCluster cluster;
1535 cluster.Associate(device, ZCLendpointId);
1536 return cluster.StepWithOnOff(nullptr, nullptr, stepMode, stepSize, transitionTime);
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)
1541 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1542 chip::Controller::LevelControlCluster cluster;
1544 cluster.Associate(device, ZCLendpointId);
1545 return cluster.Stop(nullptr, nullptr, optionMask, optionOverride);
1547 CHIP_ERROR chip_ime_AppendCommand_LevelControl_StopWithOnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1548 chip::GroupId ZCLgroupId)
1550 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1551 chip::Controller::LevelControlCluster cluster;
1553 cluster.Associate(device, ZCLendpointId);
1554 return cluster.StopWithOnOff(nullptr, nullptr);
1557 CHIP_ERROR chip_ime_ReadAttribute_LevelControl_CurrentLevel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1558 chip::GroupId ZCLgroupId)
1560 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1561 chip::Controller::LevelControlCluster cluster;
1563 cluster.Associate(device, ZCLendpointId);
1564 return cluster.ReadAttributeCurrentLevel(nullptr, nullptr);
1566 CHIP_ERROR chip_ime_ReadAttribute_LevelControl_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1567 chip::GroupId ZCLgroupId)
1569 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1570 chip::Controller::LevelControlCluster cluster;
1572 cluster.Associate(device, ZCLendpointId);
1573 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1576 // End of Cluster LevelControl
1579 CHIP_ERROR chip_ime_AppendCommand_LowPower_Sleep(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1580 chip::GroupId ZCLgroupId)
1582 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1583 chip::Controller::LowPowerCluster cluster;
1585 cluster.Associate(device, ZCLendpointId);
1586 return cluster.Sleep(nullptr, nullptr);
1589 CHIP_ERROR chip_ime_ReadAttribute_LowPower_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1590 chip::GroupId ZCLgroupId)
1592 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1593 chip::Controller::LowPowerCluster cluster;
1595 cluster.Associate(device, ZCLendpointId);
1596 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1599 // End of Cluster LowPower
1600 // Cluster NetworkCommissioning
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,
1608 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1609 chip::Controller::NetworkCommissioningCluster cluster;
1611 cluster.Associate(device, ZCLendpointId);
1612 return cluster.AddThreadNetwork(nullptr, nullptr, chip::ByteSpan(operationalDataset, operationalDataset_Len), breadcrumb,
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)
1621 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1622 chip::Controller::NetworkCommissioningCluster cluster;
1624 cluster.Associate(device, ZCLendpointId);
1625 return cluster.AddWiFiNetwork(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), chip::ByteSpan(credentials, credentials_Len),
1626 breadcrumb, timeoutMs);
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)
1633 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1634 chip::Controller::NetworkCommissioningCluster cluster;
1636 cluster.Associate(device, ZCLendpointId);
1637 return cluster.DisableNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs);
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)
1644 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1645 chip::Controller::NetworkCommissioningCluster cluster;
1647 cluster.Associate(device, ZCLendpointId);
1648 return cluster.EnableNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs);
1650 CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_GetLastNetworkCommissioningResult(chip::Controller::Device * device,
1651 chip::EndpointId ZCLendpointId,
1652 chip::GroupId ZCLgroupId,
1655 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1656 chip::Controller::NetworkCommissioningCluster cluster;
1658 cluster.Associate(device, ZCLendpointId);
1659 return cluster.GetLastNetworkCommissioningResult(nullptr, nullptr, timeoutMs);
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)
1666 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1667 chip::Controller::NetworkCommissioningCluster cluster;
1669 cluster.Associate(device, ZCLendpointId);
1670 return cluster.RemoveNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs);
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,
1677 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1678 chip::Controller::NetworkCommissioningCluster cluster;
1680 cluster.Associate(device, ZCLendpointId);
1681 return cluster.ScanNetworks(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), breadcrumb, timeoutMs);
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,
1689 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1690 chip::Controller::NetworkCommissioningCluster cluster;
1692 cluster.Associate(device, ZCLendpointId);
1693 return cluster.UpdateThreadNetwork(nullptr, nullptr, chip::ByteSpan(operationalDataset, operationalDataset_Len), breadcrumb,
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)
1702 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1703 chip::Controller::NetworkCommissioningCluster cluster;
1705 cluster.Associate(device, ZCLendpointId);
1706 return cluster.UpdateWiFiNetwork(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), chip::ByteSpan(credentials, credentials_Len),
1707 breadcrumb, timeoutMs);
1710 CHIP_ERROR chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision(chip::Controller::Device * device,
1711 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1713 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1714 chip::Controller::NetworkCommissioningCluster cluster;
1716 cluster.Associate(device, ZCLendpointId);
1717 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1720 // End of Cluster NetworkCommissioning
1723 CHIP_ERROR chip_ime_AppendCommand_OnOff_Off(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1724 chip::GroupId ZCLgroupId)
1726 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1727 chip::Controller::OnOffCluster cluster;
1729 cluster.Associate(device, ZCLendpointId);
1730 return cluster.Off(nullptr, nullptr);
1732 CHIP_ERROR chip_ime_AppendCommand_OnOff_On(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1733 chip::GroupId ZCLgroupId)
1735 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1736 chip::Controller::OnOffCluster cluster;
1738 cluster.Associate(device, ZCLendpointId);
1739 return cluster.On(nullptr, nullptr);
1741 CHIP_ERROR chip_ime_AppendCommand_OnOff_Toggle(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1742 chip::GroupId ZCLgroupId)
1744 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1745 chip::Controller::OnOffCluster cluster;
1747 cluster.Associate(device, ZCLendpointId);
1748 return cluster.Toggle(nullptr, nullptr);
1751 CHIP_ERROR chip_ime_ReadAttribute_OnOff_OnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1752 chip::GroupId ZCLgroupId)
1754 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1755 chip::Controller::OnOffCluster cluster;
1757 cluster.Associate(device, ZCLendpointId);
1758 return cluster.ReadAttributeOnOff(nullptr, nullptr);
1760 CHIP_ERROR chip_ime_ReadAttribute_OnOff_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1761 chip::GroupId ZCLgroupId)
1763 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1764 chip::Controller::OnOffCluster cluster;
1766 cluster.Associate(device, ZCLendpointId);
1767 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1770 // End of Cluster OnOff
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)
1778 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1779 chip::Controller::ScenesCluster cluster;
1781 cluster.Associate(device, ZCLendpointId);
1782 return cluster.AddScene(nullptr, nullptr, groupId, sceneId, transitionTime, chip::ByteSpan(sceneName, sceneName_Len), clusterId,
1785 CHIP_ERROR chip_ime_AppendCommand_Scenes_GetSceneMembership(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1786 chip::GroupId ZCLgroupId, uint16_t groupId)
1788 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1789 chip::Controller::ScenesCluster cluster;
1791 cluster.Associate(device, ZCLendpointId);
1792 return cluster.GetSceneMembership(nullptr, nullptr, groupId);
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)
1798 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1799 chip::Controller::ScenesCluster cluster;
1801 cluster.Associate(device, ZCLendpointId);
1802 return cluster.RecallScene(nullptr, nullptr, groupId, sceneId, transitionTime);
1804 CHIP_ERROR chip_ime_AppendCommand_Scenes_RemoveAllScenes(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1805 chip::GroupId ZCLgroupId, uint16_t groupId)
1807 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1808 chip::Controller::ScenesCluster cluster;
1810 cluster.Associate(device, ZCLendpointId);
1811 return cluster.RemoveAllScenes(nullptr, nullptr, groupId);
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)
1816 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1817 chip::Controller::ScenesCluster cluster;
1819 cluster.Associate(device, ZCLendpointId);
1820 return cluster.RemoveScene(nullptr, nullptr, groupId, sceneId);
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)
1825 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1826 chip::Controller::ScenesCluster cluster;
1828 cluster.Associate(device, ZCLendpointId);
1829 return cluster.StoreScene(nullptr, nullptr, groupId, sceneId);
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)
1834 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1835 chip::Controller::ScenesCluster cluster;
1837 cluster.Associate(device, ZCLendpointId);
1838 return cluster.ViewScene(nullptr, nullptr, groupId, sceneId);
1841 CHIP_ERROR chip_ime_ReadAttribute_Scenes_SceneCount(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1842 chip::GroupId ZCLgroupId)
1844 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1845 chip::Controller::ScenesCluster cluster;
1847 cluster.Associate(device, ZCLendpointId);
1848 return cluster.ReadAttributeSceneCount(nullptr, nullptr);
1850 CHIP_ERROR chip_ime_ReadAttribute_Scenes_CurrentScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1851 chip::GroupId ZCLgroupId)
1853 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1854 chip::Controller::ScenesCluster cluster;
1856 cluster.Associate(device, ZCLendpointId);
1857 return cluster.ReadAttributeCurrentScene(nullptr, nullptr);
1859 CHIP_ERROR chip_ime_ReadAttribute_Scenes_CurrentGroup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1860 chip::GroupId ZCLgroupId)
1862 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1863 chip::Controller::ScenesCluster cluster;
1865 cluster.Associate(device, ZCLendpointId);
1866 return cluster.ReadAttributeCurrentGroup(nullptr, nullptr);
1868 CHIP_ERROR chip_ime_ReadAttribute_Scenes_SceneValid(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1869 chip::GroupId ZCLgroupId)
1871 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1872 chip::Controller::ScenesCluster cluster;
1874 cluster.Associate(device, ZCLendpointId);
1875 return cluster.ReadAttributeSceneValid(nullptr, nullptr);
1877 CHIP_ERROR chip_ime_ReadAttribute_Scenes_NameSupport(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1878 chip::GroupId ZCLgroupId)
1880 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1881 chip::Controller::ScenesCluster cluster;
1883 cluster.Associate(device, ZCLendpointId);
1884 return cluster.ReadAttributeNameSupport(nullptr, nullptr);
1886 CHIP_ERROR chip_ime_ReadAttribute_Scenes_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
1887 chip::GroupId ZCLgroupId)
1889 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1890 chip::Controller::ScenesCluster cluster;
1892 cluster.Associate(device, ZCLendpointId);
1893 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1896 // End of Cluster Scenes
1897 // Cluster TemperatureMeasurement
1899 CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue(chip::Controller::Device * device,
1900 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1902 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1903 chip::Controller::TemperatureMeasurementCluster cluster;
1905 cluster.Associate(device, ZCLendpointId);
1906 return cluster.ReadAttributeMeasuredValue(nullptr, nullptr);
1908 CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue(chip::Controller::Device * device,
1909 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1911 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1912 chip::Controller::TemperatureMeasurementCluster cluster;
1914 cluster.Associate(device, ZCLendpointId);
1915 return cluster.ReadAttributeMinMeasuredValue(nullptr, nullptr);
1917 CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue(chip::Controller::Device * device,
1918 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1920 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1921 chip::Controller::TemperatureMeasurementCluster cluster;
1923 cluster.Associate(device, ZCLendpointId);
1924 return cluster.ReadAttributeMaxMeasuredValue(nullptr, nullptr);
1926 CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision(chip::Controller::Device * device,
1927 chip::EndpointId ZCLendpointId, chip::GroupId ZCLgroupId)
1929 VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
1930 chip::Controller::TemperatureMeasurementCluster cluster;
1932 cluster.Associate(device, ZCLendpointId);
1933 return cluster.ReadAttributeClusterRevision(nullptr, nullptr);
1936 // End of Cluster TemperatureMeasurement