9dc9bcfd343b51344993b15fe62414cb17ee740f
[platform/upstream/connectedhomeip.git] / src / darwin / Framework / CHIP / gen / callback.h
1 /*
2  *
3  *    Copyright (c) 2021 Project CHIP Authors
4  *
5  *    Licensed under the Apache License, Version 2.0 (the "License");
6  *    you may not use this file except in compliance with the License.
7  *    You may obtain a copy of the License at
8  *
9  *        http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *    Unless required by applicable law or agreed to in writing, software
12  *    distributed under the License is distributed on an "AS IS" BASIS,
13  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *    See the License for the specific language governing permissions and
15  *    limitations under the License.
16  */
17
18 // THIS FILE IS GENERATED BY ZAP
19
20 // Prevent multiple inclusion
21 #pragma once
22
23 #include "af-structs.h"
24 #include "af-types.h"
25 #include "basic-types.h"
26
27 /** @brief Cluster Init
28  *
29  * This function is called when a specific cluster is initialized. It gives the
30  * application an opportunity to take care of cluster initialization procedures.
31  * It is called exactly once for each endpoint where cluster is present.
32  *
33  * @param endpoint   Ver.: always
34  * @param clusterId   Ver.: always
35  */
36 void emberAfClusterInitCallback(chip::EndpointId endpoint, chip::ClusterId clusterId);
37
38 // Cluster Init Functions
39
40 /** @brief Barrier Control Cluster Init
41  *
42  * Cluster Init
43  *
44  * @param endpoint    Endpoint that is being initialized
45  */
46 void emberAfBarrierControlClusterInitCallback(chip::EndpointId endpoint);
47
48 /** @brief Basic Cluster Init
49  *
50  * Cluster Init
51  *
52  * @param endpoint    Endpoint that is being initialized
53  */
54 void emberAfBasicClusterInitCallback(chip::EndpointId endpoint);
55
56 /** @brief Binding Cluster Init
57  *
58  * Cluster Init
59  *
60  * @param endpoint    Endpoint that is being initialized
61  */
62 void emberAfBindingClusterInitCallback(chip::EndpointId endpoint);
63
64 /** @brief Color Control Cluster Init
65  *
66  * Cluster Init
67  *
68  * @param endpoint    Endpoint that is being initialized
69  */
70 void emberAfColorControlClusterInitCallback(chip::EndpointId endpoint);
71
72 /** @brief Door Lock Cluster Init
73  *
74  * Cluster Init
75  *
76  * @param endpoint    Endpoint that is being initialized
77  */
78 void emberAfDoorLockClusterInitCallback(chip::EndpointId endpoint);
79
80 /** @brief Groups Cluster Init
81  *
82  * Cluster Init
83  *
84  * @param endpoint    Endpoint that is being initialized
85  */
86 void emberAfGroupsClusterInitCallback(chip::EndpointId endpoint);
87
88 /** @brief Identify Cluster Init
89  *
90  * Cluster Init
91  *
92  * @param endpoint    Endpoint that is being initialized
93  */
94 void emberAfIdentifyClusterInitCallback(chip::EndpointId endpoint);
95
96 /** @brief Level Control Cluster Init
97  *
98  * Cluster Init
99  *
100  * @param endpoint    Endpoint that is being initialized
101  */
102 void emberAfLevelControlClusterInitCallback(chip::EndpointId endpoint);
103
104 /** @brief On/off Cluster Init
105  *
106  * Cluster Init
107  *
108  * @param endpoint    Endpoint that is being initialized
109  */
110 void emberAfOnOffClusterInitCallback(chip::EndpointId endpoint);
111
112 /** @brief Scenes Cluster Init
113  *
114  * Cluster Init
115  *
116  * @param endpoint    Endpoint that is being initialized
117  */
118 void emberAfScenesClusterInitCallback(chip::EndpointId endpoint);
119
120 /** @brief Temperature Measurement Cluster Init
121  *
122  * Cluster Init
123  *
124  * @param endpoint    Endpoint that is being initialized
125  */
126 void emberAfTemperatureMeasurementClusterInitCallback(chip::EndpointId endpoint);
127
128 // Cluster Server/Client Init Functions
129
130 //
131 // Barrier Control Cluster client
132 //
133
134 /** @brief Barrier Control Cluster Client Init
135  *
136  * Client Init
137  *
138  * @param endpoint    Endpoint that is being initialized
139  */
140 void emberAfBarrierControlClusterClientInitCallback(chip::EndpointId endpoint);
141
142 /** @brief Barrier Control Cluster Client Attribute Changed
143  *
144  * Client Attribute Changed
145  *
146  * @param endpoint    Endpoint that is being initialized
147  * @param attributeId Attribute that changed
148  */
149 void emberAfBarrierControlClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
150
151 /** @brief Barrier Control Cluster Client Manufacturer Specific Attribute Changed
152  *
153  * Client Manufacturer Specific Attribute Changed
154  *
155  * @param endpoint          Endpoint that is being initialized
156  * @param attributeId       Attribute that changed
157  * @param manufacturerCode  Manufacturer Code of the attribute that changed
158  */
159 void emberAfBarrierControlClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
160                                                                                     chip::AttributeId attributeId,
161                                                                                     uint16_t manufacturerCode);
162
163 /** @brief Barrier Control Cluster Client Message Sent
164  *
165  * Client Message Sent
166  *
167  * @param type               The type of message sent
168  * @param indexOrDestination The destination or address to which the message was sent
169  * @param apsFrame           The APS frame for the message
170  * @param msgLen             The length of the message
171  * @param message            The message that was sent
172  * @param status             The status of the sent message
173  */
174 void emberAfBarrierControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
175                                                            EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
176                                                            EmberStatus status);
177
178 /** @brief Barrier Control Cluster Client Pre Attribute Changed
179  *
180  * client Pre Attribute Changed
181  *
182  * @param endpoint      Endpoint that is being initialized
183  * @param attributeId   Attribute to be changed
184  * @param attributeType Attribute type
185  * @param size          Attribute size
186  * @param value         Attribute value
187  */
188 EmberAfStatus emberAfBarrierControlClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint,
189                                                                             chip::AttributeId attributeId,
190                                                                             EmberAfAttributeType attributeType, uint8_t size,
191                                                                             uint8_t * value);
192
193 /** @brief Barrier Control Cluster Client Tick
194  *
195  * client Tick
196  *
197  * @param endpoint  Endpoint that is being served
198  */
199 void emberAfBarrierControlClusterClientTickCallback(chip::EndpointId endpoint);
200
201 //
202 // Basic Cluster client
203 //
204
205 /** @brief Basic Cluster Client Init
206  *
207  * Client Init
208  *
209  * @param endpoint    Endpoint that is being initialized
210  */
211 void emberAfBasicClusterClientInitCallback(chip::EndpointId endpoint);
212
213 /** @brief Basic Cluster Client Attribute Changed
214  *
215  * Client Attribute Changed
216  *
217  * @param endpoint    Endpoint that is being initialized
218  * @param attributeId Attribute that changed
219  */
220 void emberAfBasicClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
221
222 /** @brief Basic Cluster Client Manufacturer Specific Attribute Changed
223  *
224  * Client Manufacturer Specific Attribute Changed
225  *
226  * @param endpoint          Endpoint that is being initialized
227  * @param attributeId       Attribute that changed
228  * @param manufacturerCode  Manufacturer Code of the attribute that changed
229  */
230 void emberAfBasicClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
231                                                                            uint16_t manufacturerCode);
232
233 /** @brief Basic Cluster Client Message Sent
234  *
235  * Client Message Sent
236  *
237  * @param type               The type of message sent
238  * @param indexOrDestination The destination or address to which the message was sent
239  * @param apsFrame           The APS frame for the message
240  * @param msgLen             The length of the message
241  * @param message            The message that was sent
242  * @param status             The status of the sent message
243  */
244 void emberAfBasicClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
245                                                   EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status);
246
247 /** @brief Basic Cluster Client Pre Attribute Changed
248  *
249  * client Pre Attribute Changed
250  *
251  * @param endpoint      Endpoint that is being initialized
252  * @param attributeId   Attribute to be changed
253  * @param attributeType Attribute type
254  * @param size          Attribute size
255  * @param value         Attribute value
256  */
257 EmberAfStatus emberAfBasicClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
258                                                                    EmberAfAttributeType attributeType, uint8_t size,
259                                                                    uint8_t * value);
260
261 /** @brief Basic Cluster Client Tick
262  *
263  * client Tick
264  *
265  * @param endpoint  Endpoint that is being served
266  */
267 void emberAfBasicClusterClientTickCallback(chip::EndpointId endpoint);
268
269 //
270 // Binding Cluster client
271 //
272
273 /** @brief Binding Cluster Client Init
274  *
275  * Client Init
276  *
277  * @param endpoint    Endpoint that is being initialized
278  */
279 void emberAfBindingClusterClientInitCallback(chip::EndpointId endpoint);
280
281 /** @brief Binding Cluster Client Attribute Changed
282  *
283  * Client Attribute Changed
284  *
285  * @param endpoint    Endpoint that is being initialized
286  * @param attributeId Attribute that changed
287  */
288 void emberAfBindingClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
289
290 /** @brief Binding Cluster Client Manufacturer Specific Attribute Changed
291  *
292  * Client Manufacturer Specific Attribute Changed
293  *
294  * @param endpoint          Endpoint that is being initialized
295  * @param attributeId       Attribute that changed
296  * @param manufacturerCode  Manufacturer Code of the attribute that changed
297  */
298 void emberAfBindingClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
299                                                                              chip::AttributeId attributeId,
300                                                                              uint16_t manufacturerCode);
301
302 /** @brief Binding Cluster Client Message Sent
303  *
304  * Client Message Sent
305  *
306  * @param type               The type of message sent
307  * @param indexOrDestination The destination or address to which the message was sent
308  * @param apsFrame           The APS frame for the message
309  * @param msgLen             The length of the message
310  * @param message            The message that was sent
311  * @param status             The status of the sent message
312  */
313 void emberAfBindingClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
314                                                     EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
315                                                     EmberStatus status);
316
317 /** @brief Binding Cluster Client Pre Attribute Changed
318  *
319  * client Pre Attribute Changed
320  *
321  * @param endpoint      Endpoint that is being initialized
322  * @param attributeId   Attribute to be changed
323  * @param attributeType Attribute type
324  * @param size          Attribute size
325  * @param value         Attribute value
326  */
327 EmberAfStatus emberAfBindingClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
328                                                                      EmberAfAttributeType attributeType, uint8_t size,
329                                                                      uint8_t * value);
330
331 /** @brief Binding Cluster Client Tick
332  *
333  * client Tick
334  *
335  * @param endpoint  Endpoint that is being served
336  */
337 void emberAfBindingClusterClientTickCallback(chip::EndpointId endpoint);
338
339 //
340 // Color Control Cluster client
341 //
342
343 /** @brief Color Control Cluster Client Init
344  *
345  * Client Init
346  *
347  * @param endpoint    Endpoint that is being initialized
348  */
349 void emberAfColorControlClusterClientInitCallback(chip::EndpointId endpoint);
350
351 /** @brief Color Control Cluster Client Attribute Changed
352  *
353  * Client Attribute Changed
354  *
355  * @param endpoint    Endpoint that is being initialized
356  * @param attributeId Attribute that changed
357  */
358 void emberAfColorControlClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
359
360 /** @brief Color Control Cluster Client Manufacturer Specific Attribute Changed
361  *
362  * Client Manufacturer Specific Attribute Changed
363  *
364  * @param endpoint          Endpoint that is being initialized
365  * @param attributeId       Attribute that changed
366  * @param manufacturerCode  Manufacturer Code of the attribute that changed
367  */
368 void emberAfColorControlClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
369                                                                                   chip::AttributeId attributeId,
370                                                                                   uint16_t manufacturerCode);
371
372 /** @brief Color Control Cluster Client Message Sent
373  *
374  * Client Message Sent
375  *
376  * @param type               The type of message sent
377  * @param indexOrDestination The destination or address to which the message was sent
378  * @param apsFrame           The APS frame for the message
379  * @param msgLen             The length of the message
380  * @param message            The message that was sent
381  * @param status             The status of the sent message
382  */
383 void emberAfColorControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
384                                                          EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
385                                                          EmberStatus status);
386
387 /** @brief Color Control Cluster Client Pre Attribute Changed
388  *
389  * client Pre Attribute Changed
390  *
391  * @param endpoint      Endpoint that is being initialized
392  * @param attributeId   Attribute to be changed
393  * @param attributeType Attribute type
394  * @param size          Attribute size
395  * @param value         Attribute value
396  */
397 EmberAfStatus emberAfColorControlClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
398                                                                           EmberAfAttributeType attributeType, uint8_t size,
399                                                                           uint8_t * value);
400
401 /** @brief Color Control Cluster Client Tick
402  *
403  * client Tick
404  *
405  * @param endpoint  Endpoint that is being served
406  */
407 void emberAfColorControlClusterClientTickCallback(chip::EndpointId endpoint);
408
409 //
410 // Door Lock Cluster client
411 //
412
413 /** @brief Door Lock Cluster Client Init
414  *
415  * Client Init
416  *
417  * @param endpoint    Endpoint that is being initialized
418  */
419 void emberAfDoorLockClusterClientInitCallback(chip::EndpointId endpoint);
420
421 /** @brief Door Lock Cluster Client Attribute Changed
422  *
423  * Client Attribute Changed
424  *
425  * @param endpoint    Endpoint that is being initialized
426  * @param attributeId Attribute that changed
427  */
428 void emberAfDoorLockClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
429
430 /** @brief Door Lock Cluster Client Manufacturer Specific Attribute Changed
431  *
432  * Client Manufacturer Specific Attribute Changed
433  *
434  * @param endpoint          Endpoint that is being initialized
435  * @param attributeId       Attribute that changed
436  * @param manufacturerCode  Manufacturer Code of the attribute that changed
437  */
438 void emberAfDoorLockClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
439                                                                               chip::AttributeId attributeId,
440                                                                               uint16_t manufacturerCode);
441
442 /** @brief Door Lock Cluster Client Message Sent
443  *
444  * Client Message Sent
445  *
446  * @param type               The type of message sent
447  * @param indexOrDestination The destination or address to which the message was sent
448  * @param apsFrame           The APS frame for the message
449  * @param msgLen             The length of the message
450  * @param message            The message that was sent
451  * @param status             The status of the sent message
452  */
453 void emberAfDoorLockClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
454                                                      EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
455                                                      EmberStatus status);
456
457 /** @brief Door Lock Cluster Client Pre Attribute Changed
458  *
459  * client Pre Attribute Changed
460  *
461  * @param endpoint      Endpoint that is being initialized
462  * @param attributeId   Attribute to be changed
463  * @param attributeType Attribute type
464  * @param size          Attribute size
465  * @param value         Attribute value
466  */
467 EmberAfStatus emberAfDoorLockClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
468                                                                       EmberAfAttributeType attributeType, uint8_t size,
469                                                                       uint8_t * value);
470
471 /** @brief Door Lock Cluster Client Tick
472  *
473  * client Tick
474  *
475  * @param endpoint  Endpoint that is being served
476  */
477 void emberAfDoorLockClusterClientTickCallback(chip::EndpointId endpoint);
478
479 //
480 // Groups Cluster client
481 //
482
483 /** @brief Groups Cluster Client Init
484  *
485  * Client Init
486  *
487  * @param endpoint    Endpoint that is being initialized
488  */
489 void emberAfGroupsClusterClientInitCallback(chip::EndpointId endpoint);
490
491 /** @brief Groups Cluster Client Attribute Changed
492  *
493  * Client Attribute Changed
494  *
495  * @param endpoint    Endpoint that is being initialized
496  * @param attributeId Attribute that changed
497  */
498 void emberAfGroupsClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
499
500 /** @brief Groups Cluster Client Manufacturer Specific Attribute Changed
501  *
502  * Client Manufacturer Specific Attribute Changed
503  *
504  * @param endpoint          Endpoint that is being initialized
505  * @param attributeId       Attribute that changed
506  * @param manufacturerCode  Manufacturer Code of the attribute that changed
507  */
508 void emberAfGroupsClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
509                                                                             chip::AttributeId attributeId,
510                                                                             uint16_t manufacturerCode);
511
512 /** @brief Groups Cluster Client Message Sent
513  *
514  * Client Message Sent
515  *
516  * @param type               The type of message sent
517  * @param indexOrDestination The destination or address to which the message was sent
518  * @param apsFrame           The APS frame for the message
519  * @param msgLen             The length of the message
520  * @param message            The message that was sent
521  * @param status             The status of the sent message
522  */
523 void emberAfGroupsClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
524                                                    EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
525                                                    EmberStatus status);
526
527 /** @brief Groups Cluster Client Pre Attribute Changed
528  *
529  * client Pre Attribute Changed
530  *
531  * @param endpoint      Endpoint that is being initialized
532  * @param attributeId   Attribute to be changed
533  * @param attributeType Attribute type
534  * @param size          Attribute size
535  * @param value         Attribute value
536  */
537 EmberAfStatus emberAfGroupsClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
538                                                                     EmberAfAttributeType attributeType, uint8_t size,
539                                                                     uint8_t * value);
540
541 /** @brief Groups Cluster Client Tick
542  *
543  * client Tick
544  *
545  * @param endpoint  Endpoint that is being served
546  */
547 void emberAfGroupsClusterClientTickCallback(chip::EndpointId endpoint);
548
549 //
550 // Identify Cluster client
551 //
552
553 /** @brief Identify Cluster Client Init
554  *
555  * Client Init
556  *
557  * @param endpoint    Endpoint that is being initialized
558  */
559 void emberAfIdentifyClusterClientInitCallback(chip::EndpointId endpoint);
560
561 /** @brief Identify Cluster Client Attribute Changed
562  *
563  * Client Attribute Changed
564  *
565  * @param endpoint    Endpoint that is being initialized
566  * @param attributeId Attribute that changed
567  */
568 void emberAfIdentifyClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
569
570 /** @brief Identify Cluster Client Manufacturer Specific Attribute Changed
571  *
572  * Client Manufacturer Specific Attribute Changed
573  *
574  * @param endpoint          Endpoint that is being initialized
575  * @param attributeId       Attribute that changed
576  * @param manufacturerCode  Manufacturer Code of the attribute that changed
577  */
578 void emberAfIdentifyClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
579                                                                               chip::AttributeId attributeId,
580                                                                               uint16_t manufacturerCode);
581
582 /** @brief Identify Cluster Client Message Sent
583  *
584  * Client Message Sent
585  *
586  * @param type               The type of message sent
587  * @param indexOrDestination The destination or address to which the message was sent
588  * @param apsFrame           The APS frame for the message
589  * @param msgLen             The length of the message
590  * @param message            The message that was sent
591  * @param status             The status of the sent message
592  */
593 void emberAfIdentifyClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
594                                                      EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
595                                                      EmberStatus status);
596
597 /** @brief Identify Cluster Client Pre Attribute Changed
598  *
599  * client Pre Attribute Changed
600  *
601  * @param endpoint      Endpoint that is being initialized
602  * @param attributeId   Attribute to be changed
603  * @param attributeType Attribute type
604  * @param size          Attribute size
605  * @param value         Attribute value
606  */
607 EmberAfStatus emberAfIdentifyClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
608                                                                       EmberAfAttributeType attributeType, uint8_t size,
609                                                                       uint8_t * value);
610
611 /** @brief Identify Cluster Client Tick
612  *
613  * client Tick
614  *
615  * @param endpoint  Endpoint that is being served
616  */
617 void emberAfIdentifyClusterClientTickCallback(chip::EndpointId endpoint);
618
619 //
620 // Level Control Cluster client
621 //
622
623 /** @brief Level Control Cluster Client Init
624  *
625  * Client Init
626  *
627  * @param endpoint    Endpoint that is being initialized
628  */
629 void emberAfLevelControlClusterClientInitCallback(chip::EndpointId endpoint);
630
631 /** @brief Level Control Cluster Client Attribute Changed
632  *
633  * Client Attribute Changed
634  *
635  * @param endpoint    Endpoint that is being initialized
636  * @param attributeId Attribute that changed
637  */
638 void emberAfLevelControlClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
639
640 /** @brief Level Control Cluster Client Manufacturer Specific Attribute Changed
641  *
642  * Client Manufacturer Specific Attribute Changed
643  *
644  * @param endpoint          Endpoint that is being initialized
645  * @param attributeId       Attribute that changed
646  * @param manufacturerCode  Manufacturer Code of the attribute that changed
647  */
648 void emberAfLevelControlClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
649                                                                                   chip::AttributeId attributeId,
650                                                                                   uint16_t manufacturerCode);
651
652 /** @brief Level Control Cluster Client Message Sent
653  *
654  * Client Message Sent
655  *
656  * @param type               The type of message sent
657  * @param indexOrDestination The destination or address to which the message was sent
658  * @param apsFrame           The APS frame for the message
659  * @param msgLen             The length of the message
660  * @param message            The message that was sent
661  * @param status             The status of the sent message
662  */
663 void emberAfLevelControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
664                                                          EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
665                                                          EmberStatus status);
666
667 /** @brief Level Control Cluster Client Pre Attribute Changed
668  *
669  * client Pre Attribute Changed
670  *
671  * @param endpoint      Endpoint that is being initialized
672  * @param attributeId   Attribute to be changed
673  * @param attributeType Attribute type
674  * @param size          Attribute size
675  * @param value         Attribute value
676  */
677 EmberAfStatus emberAfLevelControlClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
678                                                                           EmberAfAttributeType attributeType, uint8_t size,
679                                                                           uint8_t * value);
680
681 /** @brief Level Control Cluster Client Tick
682  *
683  * client Tick
684  *
685  * @param endpoint  Endpoint that is being served
686  */
687 void emberAfLevelControlClusterClientTickCallback(chip::EndpointId endpoint);
688
689 //
690 // On/off Cluster client
691 //
692
693 /** @brief On/off Cluster Client Init
694  *
695  * Client Init
696  *
697  * @param endpoint    Endpoint that is being initialized
698  */
699 void emberAfOnOffClusterClientInitCallback(chip::EndpointId endpoint);
700
701 /** @brief On/off Cluster Client Attribute Changed
702  *
703  * Client Attribute Changed
704  *
705  * @param endpoint    Endpoint that is being initialized
706  * @param attributeId Attribute that changed
707  */
708 void emberAfOnOffClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
709
710 /** @brief On/off Cluster Client Manufacturer Specific Attribute Changed
711  *
712  * Client Manufacturer Specific Attribute Changed
713  *
714  * @param endpoint          Endpoint that is being initialized
715  * @param attributeId       Attribute that changed
716  * @param manufacturerCode  Manufacturer Code of the attribute that changed
717  */
718 void emberAfOnOffClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
719                                                                            uint16_t manufacturerCode);
720
721 /** @brief On/off Cluster Client Message Sent
722  *
723  * Client Message Sent
724  *
725  * @param type               The type of message sent
726  * @param indexOrDestination The destination or address to which the message was sent
727  * @param apsFrame           The APS frame for the message
728  * @param msgLen             The length of the message
729  * @param message            The message that was sent
730  * @param status             The status of the sent message
731  */
732 void emberAfOnOffClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
733                                                   EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status);
734
735 /** @brief On/off Cluster Client Pre Attribute Changed
736  *
737  * client Pre Attribute Changed
738  *
739  * @param endpoint      Endpoint that is being initialized
740  * @param attributeId   Attribute to be changed
741  * @param attributeType Attribute type
742  * @param size          Attribute size
743  * @param value         Attribute value
744  */
745 EmberAfStatus emberAfOnOffClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
746                                                                    EmberAfAttributeType attributeType, uint8_t size,
747                                                                    uint8_t * value);
748
749 /** @brief On/off Cluster Client Tick
750  *
751  * client Tick
752  *
753  * @param endpoint  Endpoint that is being served
754  */
755 void emberAfOnOffClusterClientTickCallback(chip::EndpointId endpoint);
756
757 //
758 // Scenes Cluster client
759 //
760
761 /** @brief Scenes Cluster Client Init
762  *
763  * Client Init
764  *
765  * @param endpoint    Endpoint that is being initialized
766  */
767 void emberAfScenesClusterClientInitCallback(chip::EndpointId endpoint);
768
769 /** @brief Scenes Cluster Client Attribute Changed
770  *
771  * Client Attribute Changed
772  *
773  * @param endpoint    Endpoint that is being initialized
774  * @param attributeId Attribute that changed
775  */
776 void emberAfScenesClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
777
778 /** @brief Scenes Cluster Client Manufacturer Specific Attribute Changed
779  *
780  * Client Manufacturer Specific Attribute Changed
781  *
782  * @param endpoint          Endpoint that is being initialized
783  * @param attributeId       Attribute that changed
784  * @param manufacturerCode  Manufacturer Code of the attribute that changed
785  */
786 void emberAfScenesClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
787                                                                             chip::AttributeId attributeId,
788                                                                             uint16_t manufacturerCode);
789
790 /** @brief Scenes Cluster Client Message Sent
791  *
792  * Client Message Sent
793  *
794  * @param type               The type of message sent
795  * @param indexOrDestination The destination or address to which the message was sent
796  * @param apsFrame           The APS frame for the message
797  * @param msgLen             The length of the message
798  * @param message            The message that was sent
799  * @param status             The status of the sent message
800  */
801 void emberAfScenesClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
802                                                    EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
803                                                    EmberStatus status);
804
805 /** @brief Scenes Cluster Client Pre Attribute Changed
806  *
807  * client Pre Attribute Changed
808  *
809  * @param endpoint      Endpoint that is being initialized
810  * @param attributeId   Attribute to be changed
811  * @param attributeType Attribute type
812  * @param size          Attribute size
813  * @param value         Attribute value
814  */
815 EmberAfStatus emberAfScenesClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
816                                                                     EmberAfAttributeType attributeType, uint8_t size,
817                                                                     uint8_t * value);
818
819 /** @brief Scenes Cluster Client Tick
820  *
821  * client Tick
822  *
823  * @param endpoint  Endpoint that is being served
824  */
825 void emberAfScenesClusterClientTickCallback(chip::EndpointId endpoint);
826
827 //
828 // Temperature Measurement Cluster client
829 //
830
831 /** @brief Temperature Measurement Cluster Client Init
832  *
833  * Client Init
834  *
835  * @param endpoint    Endpoint that is being initialized
836  */
837 void emberAfTemperatureMeasurementClusterClientInitCallback(chip::EndpointId endpoint);
838
839 /** @brief Temperature Measurement Cluster Client Attribute Changed
840  *
841  * Client Attribute Changed
842  *
843  * @param endpoint    Endpoint that is being initialized
844  * @param attributeId Attribute that changed
845  */
846 void emberAfTemperatureMeasurementClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
847
848 /** @brief Temperature Measurement Cluster Client Manufacturer Specific Attribute Changed
849  *
850  * Client Manufacturer Specific Attribute Changed
851  *
852  * @param endpoint          Endpoint that is being initialized
853  * @param attributeId       Attribute that changed
854  * @param manufacturerCode  Manufacturer Code of the attribute that changed
855  */
856 void emberAfTemperatureMeasurementClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
857                                                                                             chip::AttributeId attributeId,
858                                                                                             uint16_t manufacturerCode);
859
860 /** @brief Temperature Measurement Cluster Client Message Sent
861  *
862  * Client Message Sent
863  *
864  * @param type               The type of message sent
865  * @param indexOrDestination The destination or address to which the message was sent
866  * @param apsFrame           The APS frame for the message
867  * @param msgLen             The length of the message
868  * @param message            The message that was sent
869  * @param status             The status of the sent message
870  */
871 void emberAfTemperatureMeasurementClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
872                                                                    EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
873                                                                    EmberStatus status);
874
875 /** @brief Temperature Measurement Cluster Client Pre Attribute Changed
876  *
877  * client Pre Attribute Changed
878  *
879  * @param endpoint      Endpoint that is being initialized
880  * @param attributeId   Attribute to be changed
881  * @param attributeType Attribute type
882  * @param size          Attribute size
883  * @param value         Attribute value
884  */
885 EmberAfStatus emberAfTemperatureMeasurementClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint,
886                                                                                     chip::AttributeId attributeId,
887                                                                                     EmberAfAttributeType attributeType,
888                                                                                     uint8_t size, uint8_t * value);
889
890 /** @brief Temperature Measurement Cluster Client Tick
891  *
892  * client Tick
893  *
894  * @param endpoint  Endpoint that is being served
895  */
896 void emberAfTemperatureMeasurementClusterClientTickCallback(chip::EndpointId endpoint);
897
898 // Cluster Commands Callback
899
900 /**
901  * @brief Door Lock Cluster ClearAllPinsResponse Command callback
902  * @param status
903  */
904
905 bool emberAfDoorLockClusterClearAllPinsResponseCallback(uint8_t status);
906
907 /**
908  * @brief Door Lock Cluster ClearAllRfidsResponse Command callback
909  * @param status
910  */
911
912 bool emberAfDoorLockClusterClearAllRfidsResponseCallback(uint8_t status);
913
914 /**
915  * @brief Door Lock Cluster ClearHolidayScheduleResponse Command callback
916  * @param status
917  */
918
919 bool emberAfDoorLockClusterClearHolidayScheduleResponseCallback(uint8_t status);
920
921 /**
922  * @brief Door Lock Cluster ClearPinResponse Command callback
923  * @param status
924  */
925
926 bool emberAfDoorLockClusterClearPinResponseCallback(uint8_t status);
927
928 /**
929  * @brief Door Lock Cluster ClearRfidResponse Command callback
930  * @param status
931  */
932
933 bool emberAfDoorLockClusterClearRfidResponseCallback(uint8_t status);
934
935 /**
936  * @brief Door Lock Cluster ClearWeekdayScheduleResponse Command callback
937  * @param status
938  */
939
940 bool emberAfDoorLockClusterClearWeekdayScheduleResponseCallback(uint8_t status);
941
942 /**
943  * @brief Door Lock Cluster ClearYeardayScheduleResponse Command callback
944  * @param status
945  */
946
947 bool emberAfDoorLockClusterClearYeardayScheduleResponseCallback(uint8_t status);
948
949 /**
950  * @brief Door Lock Cluster GetHolidayScheduleResponse Command callback
951  * @param scheduleId
952  * @param status
953  * @param localStartTime
954  * @param localEndTime
955  * @param operatingModeDuringHoliday
956  */
957
958 bool emberAfDoorLockClusterGetHolidayScheduleResponseCallback(uint8_t scheduleId, uint8_t status, uint32_t localStartTime,
959                                                               uint32_t localEndTime, uint8_t operatingModeDuringHoliday);
960
961 /**
962  * @brief Door Lock Cluster GetLogRecordResponse Command callback
963  * @param logEntryId
964  * @param timestamp
965  * @param eventType
966  * @param source
967  * @param eventIdOrAlarmCode
968  * @param userId
969  * @param pin
970  */
971
972 bool emberAfDoorLockClusterGetLogRecordResponseCallback(uint16_t logEntryId, uint32_t timestamp, uint8_t eventType, uint8_t source,
973                                                         uint8_t eventIdOrAlarmCode, uint16_t userId, uint8_t * pin);
974
975 /**
976  * @brief Door Lock Cluster GetPinResponse Command callback
977  * @param userId
978  * @param userStatus
979  * @param userType
980  * @param pin
981  */
982
983 bool emberAfDoorLockClusterGetPinResponseCallback(uint16_t userId, uint8_t userStatus, uint8_t userType, uint8_t * pin);
984
985 /**
986  * @brief Door Lock Cluster GetRfidResponse Command callback
987  * @param userId
988  * @param userStatus
989  * @param userType
990  * @param rfid
991  */
992
993 bool emberAfDoorLockClusterGetRfidResponseCallback(uint16_t userId, uint8_t userStatus, uint8_t userType, uint8_t * rfid);
994
995 /**
996  * @brief Door Lock Cluster GetUserTypeResponse Command callback
997  * @param userId
998  * @param userType
999  */
1000
1001 bool emberAfDoorLockClusterGetUserTypeResponseCallback(uint16_t userId, uint8_t userType);
1002
1003 /**
1004  * @brief Door Lock Cluster GetWeekdayScheduleResponse Command callback
1005  * @param scheduleId
1006  * @param userId
1007  * @param status
1008  * @param daysMask
1009  * @param startHour
1010  * @param startMinute
1011  * @param endHour
1012  * @param endMinute
1013  */
1014
1015 bool emberAfDoorLockClusterGetWeekdayScheduleResponseCallback(uint8_t scheduleId, uint16_t userId, uint8_t status, uint8_t daysMask,
1016                                                               uint8_t startHour, uint8_t startMinute, uint8_t endHour,
1017                                                               uint8_t endMinute);
1018
1019 /**
1020  * @brief Door Lock Cluster GetYeardayScheduleResponse Command callback
1021  * @param scheduleId
1022  * @param userId
1023  * @param status
1024  * @param localStartTime
1025  * @param localEndTime
1026  */
1027
1028 bool emberAfDoorLockClusterGetYeardayScheduleResponseCallback(uint8_t scheduleId, uint16_t userId, uint8_t status,
1029                                                               uint32_t localStartTime, uint32_t localEndTime);
1030
1031 /**
1032  * @brief Door Lock Cluster LockDoorResponse Command callback
1033  * @param status
1034  */
1035
1036 bool emberAfDoorLockClusterLockDoorResponseCallback(uint8_t status);
1037
1038 /**
1039  * @brief Door Lock Cluster SetHolidayScheduleResponse Command callback
1040  * @param status
1041  */
1042
1043 bool emberAfDoorLockClusterSetHolidayScheduleResponseCallback(uint8_t status);
1044
1045 /**
1046  * @brief Door Lock Cluster SetPinResponse Command callback
1047  * @param status
1048  */
1049
1050 bool emberAfDoorLockClusterSetPinResponseCallback(uint8_t status);
1051
1052 /**
1053  * @brief Door Lock Cluster SetRfidResponse Command callback
1054  * @param status
1055  */
1056
1057 bool emberAfDoorLockClusterSetRfidResponseCallback(uint8_t status);
1058
1059 /**
1060  * @brief Door Lock Cluster SetUserTypeResponse Command callback
1061  * @param status
1062  */
1063
1064 bool emberAfDoorLockClusterSetUserTypeResponseCallback(uint8_t status);
1065
1066 /**
1067  * @brief Door Lock Cluster SetWeekdayScheduleResponse Command callback
1068  * @param status
1069  */
1070
1071 bool emberAfDoorLockClusterSetWeekdayScheduleResponseCallback(uint8_t status);
1072
1073 /**
1074  * @brief Door Lock Cluster SetYeardayScheduleResponse Command callback
1075  * @param status
1076  */
1077
1078 bool emberAfDoorLockClusterSetYeardayScheduleResponseCallback(uint8_t status);
1079
1080 /**
1081  * @brief Door Lock Cluster UnlockDoorResponse Command callback
1082  * @param status
1083  */
1084
1085 bool emberAfDoorLockClusterUnlockDoorResponseCallback(uint8_t status);
1086
1087 /**
1088  * @brief Door Lock Cluster UnlockWithTimeoutResponse Command callback
1089  * @param status
1090  */
1091
1092 bool emberAfDoorLockClusterUnlockWithTimeoutResponseCallback(uint8_t status);
1093
1094 /**
1095  * @brief Groups Cluster AddGroupResponse Command callback
1096  * @param status
1097  * @param groupId
1098  */
1099
1100 bool emberAfGroupsClusterAddGroupResponseCallback(uint8_t status, uint16_t groupId);
1101
1102 /**
1103  * @brief Groups Cluster GetGroupMembershipResponse Command callback
1104  * @param capacity
1105  * @param groupCount
1106  * @param groupList
1107  */
1108
1109 bool emberAfGroupsClusterGetGroupMembershipResponseCallback(uint8_t capacity, uint8_t groupCount,
1110                                                             /* TYPE WARNING: array array defaults to */ uint8_t * groupList);
1111
1112 /**
1113  * @brief Groups Cluster RemoveGroupResponse Command callback
1114  * @param status
1115  * @param groupId
1116  */
1117
1118 bool emberAfGroupsClusterRemoveGroupResponseCallback(uint8_t status, uint16_t groupId);
1119
1120 /**
1121  * @brief Groups Cluster ViewGroupResponse Command callback
1122  * @param status
1123  * @param groupId
1124  * @param groupName
1125  */
1126
1127 bool emberAfGroupsClusterViewGroupResponseCallback(uint8_t status, uint16_t groupId, uint8_t * groupName);
1128
1129 /**
1130  * @brief Identify Cluster IdentifyQueryResponse Command callback
1131  * @param timeout
1132  */
1133
1134 bool emberAfIdentifyClusterIdentifyQueryResponseCallback(uint16_t timeout);
1135
1136 /**
1137  * @brief Scenes Cluster AddSceneResponse Command callback
1138  * @param status
1139  * @param groupId
1140  * @param sceneId
1141  */
1142
1143 bool emberAfScenesClusterAddSceneResponseCallback(uint8_t status, uint16_t groupId, uint8_t sceneId);
1144
1145 /**
1146  * @brief Scenes Cluster GetSceneMembershipResponse Command callback
1147  * @param status
1148  * @param capacity
1149  * @param groupId
1150  * @param sceneCount
1151  * @param sceneList
1152  */
1153
1154 bool emberAfScenesClusterGetSceneMembershipResponseCallback(uint8_t status, uint8_t capacity, uint16_t groupId, uint8_t sceneCount,
1155                                                             /* TYPE WARNING: array array defaults to */ uint8_t * sceneList);
1156
1157 /**
1158  * @brief Scenes Cluster RemoveAllScenesResponse Command callback
1159  * @param status
1160  * @param groupId
1161  */
1162
1163 bool emberAfScenesClusterRemoveAllScenesResponseCallback(uint8_t status, uint16_t groupId);
1164
1165 /**
1166  * @brief Scenes Cluster RemoveSceneResponse Command callback
1167  * @param status
1168  * @param groupId
1169  * @param sceneId
1170  */
1171
1172 bool emberAfScenesClusterRemoveSceneResponseCallback(uint8_t status, uint16_t groupId, uint8_t sceneId);
1173
1174 /**
1175  * @brief Scenes Cluster StoreSceneResponse Command callback
1176  * @param status
1177  * @param groupId
1178  * @param sceneId
1179  */
1180
1181 bool emberAfScenesClusterStoreSceneResponseCallback(uint8_t status, uint16_t groupId, uint8_t sceneId);
1182
1183 /**
1184  * @brief Scenes Cluster ViewSceneResponse Command callback
1185  * @param status
1186  * @param groupId
1187  * @param sceneId
1188  * @param transitionTime
1189  * @param sceneName
1190  * @param extensionFieldSets
1191  */
1192
1193 bool emberAfScenesClusterViewSceneResponseCallback(uint8_t status, uint16_t groupId, uint8_t sceneId, uint16_t transitionTime,
1194                                                    uint8_t * sceneName,
1195                                                    /* TYPE WARNING: array array defaults to */ uint8_t * extensionFieldSets);
1196
1197 //
1198 // Non-Cluster Related Callbacks
1199 //
1200
1201 /** @brief Add To Current App Tasks
1202  *
1203  * This function is only useful to sleepy end devices.  This function will note
1204  * the passed item as part of a set of tasks the application has outstanding
1205  * (e.g. message sent requiring APS acknwoledgement).  This will affect how the
1206  * application behaves with regard to sleeping and polling.  Until the
1207  * outstanding task is completed, the device may poll more frequently and sleep
1208  * less often.
1209  *
1210  * @param tasks   Ver.: always
1211  */
1212 void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks);
1213
1214 /** @brief Remove From Current App Tasks
1215  *
1216  * This function is only useful to sleepy end devices.  This function will
1217  * remove the passed item from the set of tasks the application has outstanding
1218  * (e.g. message sent requiring APS acknwoledgement).  This will affect how the
1219  * application behaves with regard to sleeping and polling.  Removing the item
1220  * from the list of outstanding tasks may allow the device to sleep longer and
1221  * poll less frequently.  If there are other outstanding tasks the system may
1222  * still have to stay away and poll more often.
1223  *
1224  * @param tasks   Ver.: always
1225  */
1226 void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks);
1227
1228 /** @brief Allow Network Write Attribute
1229  *
1230  * This function is called by the application framework before it writes an
1231  * attribute in response to a write attribute request from an external device.
1232  * The value passed into this callback is the value to which the attribute is to
1233  * be set by the framework.
1234         Example:        In mirroring simple metering data
1235  * on an Energy Services Interface (ESI) (formerly called Energy Service Portal
1236  * (ESP) in SE 1.0).), a mirrored simple meter needs to write read-only
1237  * attributes on its mirror. The-meter-mirror sample application, located in
1238  * app/framework/sample-apps, uses this callback to allow the mirrored device to
1239  * write simple metering attributes on the mirror regardless of the fact that
1240  * most simple metering attributes are defined as read-only by the ZigBee
1241  * specification.
1242         Note:   The ZCL specification does not (as of this
1243  * writing) specify any permission-level security for writing writeable
1244  * attributes. As far as the ZCL specification is concerned, if an attribute is
1245  * writeable, any device that has a link key for the device should be able to
1246  * write that attribute. Furthermore if an attribute is read only, it should not
1247  * be written over the air. Thus, if you implement permissions for writing
1248  * attributes as a feature, you MAY be operating outside the specification. This
1249  * is unlikely to be a problem for writing read-only attributes, but it may be a
1250  * problem for attributes that are writeable according to the specification but
1251  * restricted by the application implementing this callback.
1252  *
1253  * @param endpoint   Ver.: always
1254  * @param clusterId   Ver.: always
1255  * @param attributeId   Ver.: always
1256  * @param mask   Ver.: always
1257  * @param manufacturerCode   Ver.: always
1258  * @param value   Ver.: always
1259  * @param type   Ver.: always
1260  */
1261 EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
1262                                                                           chip::AttributeId attributeId, uint8_t mask,
1263                                                                           uint16_t manufacturerCode, uint8_t * value, uint8_t type);
1264
1265 /** @brief Attribute Read Access
1266  *
1267  * This function is called whenever the Application Framework needs to check
1268  * access permission for an attribute read.
1269  *
1270  * @param endpoint   Ver.: always
1271  * @param clusterId   Ver.: always
1272  * @param manufacturerCode   Ver.: always
1273  * @param attributeId   Ver.: always
1274  */
1275 bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode,
1276                                         chip::AttributeId attributeId);
1277
1278 /** @brief Attribute Write Access
1279  *
1280  * This function is called whenever the Application Framework needs to check
1281  * access permission for an attribute write.
1282  *
1283  * @param endpoint   Ver.: always
1284  * @param clusterId   Ver.: always
1285  * @param manufacturerCode   Ver.: always
1286  * @param attributeId   Ver.: always
1287  */
1288 bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode,
1289                                          chip::AttributeId attributeId);
1290
1291 /** @brief Default Response
1292  *
1293  * This function is called by the application framework when a Default Response
1294  * command is received from an external device.  The application should return
1295  * true if the message was processed or false if it was not.
1296  *
1297  * @param clusterId The cluster identifier of this response.  Ver.: always
1298  * @param commandId The command identifier to which this is a response.  Ver.:
1299  * always
1300  * @param status Specifies either SUCCESS or the nature of the error that was
1301  * detected in the received command.  Ver.: always
1302  */
1303 bool emberAfDefaultResponseCallback(chip::ClusterId clusterId, chip::CommandId commandId, EmberAfStatus status);
1304
1305 /** @brief Configure Reporting Response
1306  *
1307  * This function is called by the application framework when a Configure
1308  * Reporting Response command is received from an external device.  The
1309  * application should return true if the message was processed or false if it
1310  * was not.
1311  *
1312  * @param clusterId The cluster identifier of this response.  Ver.: always
1313  * @param buffer Buffer containing the list of attribute status records.  Ver.:
1314  * always
1315  * @param bufLen The length in bytes of the list.  Ver.: always
1316  */
1317 bool emberAfConfigureReportingResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1318
1319 /** @brief Read Reporting Configuration Response
1320  *
1321  * This function is called by the application framework when a Read Reporting
1322  * Configuration Response command is received from an external device.  The
1323  * application should return true if the message was processed or false if it
1324  * was not.
1325  *
1326  * @param clusterId The cluster identifier of this response.  Ver.: always
1327  * @param buffer Buffer containing the list of attribute reporting configuration
1328  * records.  Ver.: always
1329  * @param bufLen The length in bytes of the list.  Ver.: always
1330  */
1331 bool emberAfReadReportingConfigurationResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1332
1333 /** @brief Discover Attributes Response
1334  *
1335  * This function is called by the application framework when a Discover
1336  * Attributes Response or Discover Attributes Extended Response command is
1337  * received from an external device.  The Discover Attributes Response command
1338  * contains a bool indicating if discovery is complete and a list of zero or
1339  * more attribute identifier/type records. The final argument indicates whether
1340  * the response is in the extended format or not.  The application should return
1341  * true if the message was processed or false if it was not.
1342  *
1343  * @param clusterId The cluster identifier of this response.  Ver.: always
1344  * @param discoveryComplete Indicates whether there are more attributes to be
1345  * discovered.  true if there are no more attributes to be discovered.  Ver.:
1346  * always
1347  * @param buffer Buffer containing the list of attribute identifier/type
1348  * records.  Ver.: always
1349  * @param bufLen The length in bytes of the list.  Ver.: always
1350  * @param extended Indicates whether the response is in the extended format or
1351  * not.  Ver.: always
1352  */
1353 bool emberAfDiscoverAttributesResponseCallback(chip::ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, uint16_t bufLen,
1354                                                bool extended);
1355
1356 /** @brief Discover Commands Generated Response
1357  *
1358  * This function is called by the framework when Discover Commands Generated
1359  * Response is received.
1360  *
1361  * @param clusterId The cluster identifier of this response.  Ver.: always
1362  * @param manufacturerCode Manufacturer code  Ver.: always
1363  * @param discoveryComplete Indicates whether there are more commands to be
1364  * discovered.  Ver.: always
1365  * @param commandIds Buffer containing the list of command identifiers.  Ver.:
1366  * always
1367  * @param commandIdCount The length of bytes of the list, whish is the same as
1368  * the number of identifiers.  Ver.: always
1369  */
1370 bool emberAfDiscoverCommandsGeneratedResponseCallback(chip::ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete,
1371                                                       chip::CommandId * commandIds, uint16_t commandIdCount);
1372
1373 /** @brief Discover Commands Received Response
1374  *
1375  * This function is called by the framework when Discover Commands Received
1376  * Response is received.
1377  *
1378  * @param clusterId The cluster identifier of this response.  Ver.: always
1379  * @param manufacturerCode Manufacturer code  Ver.: always
1380  * @param discoveryComplete Indicates whether there are more commands to be
1381  * discovered.  Ver.: always
1382  * @param commandIds Buffer containing the list of command identifiers.  Ver.:
1383  * always
1384  * @param commandIdCount The length of bytes of the list, whish is the same as
1385  * the number of identifiers.  Ver.: always
1386  */
1387 bool emberAfDiscoverCommandsReceivedResponseCallback(chip::ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete,
1388                                                      chip::CommandId * commandIds, uint16_t commandIdCount);
1389
1390 /** @brief Pre Command Received
1391  *
1392  * This callback is the second in the Application Framework's message processing
1393  * chain. At this point in the processing of incoming over-the-air messages, the
1394  * application has determined that the incoming message is a ZCL command. It
1395  * parses enough of the message to populate an EmberAfClusterCommand struct. The
1396  * Application Framework defines this struct value in a local scope to the
1397  * command processing but also makes it available through a global pointer
1398  * called emberAfCurrentCommand, in app/framework/util/util.c. When command
1399  * processing is complete, this pointer is cleared.
1400  *
1401  * @param cmd   Ver.: always
1402  */
1403 bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd);
1404
1405 /** @brief Pre Message Send
1406  *
1407  * This function is called by the framework when it is about to pass a message
1408  * to the stack primitives for sending.   This message may or may not be ZCL,
1409  * ZDO, or some other protocol.  This is called prior to
1410         any ZigBee
1411  * fragmentation that may be done.  If the function returns true it is assumed
1412  * the callback has consumed and processed the message.  The callback must also
1413  * set the EmberStatus status code to be passed back to the caller.  The
1414  * framework will do no further processing on the message.
1415         If the
1416  * function returns false then it is assumed that the callback has not processed
1417  * the mesasge and the framework will continue to process accordingly.
1418  *
1419  * @param messageStruct The structure containing the parameters of the APS
1420  * message to be sent.  Ver.: always
1421  * @param status A pointer to the status code value that will be returned to the
1422  * caller.  Ver.: always
1423  */
1424 bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status);
1425
1426 /** @brief Message Sent
1427  *
1428  * This function is called by the application framework from the message sent
1429  * handler, when it is informed by the stack regarding the message sent status.
1430  * All of the values passed to the emberMessageSentHandler are passed on to this
1431  * callback. This provides an opportunity for the application to verify that its
1432  * message has been sent successfully and take the appropriate action. This
1433  * callback should return a bool value of true or false. A value of true
1434  * indicates that the message sent notification has been handled and should not
1435  * be handled by the application framework.
1436  *
1437  * @param type   Ver.: always
1438  * @param indexOrDestination   Ver.: always
1439  * @param apsFrame   Ver.: always
1440  * @param msgLen   Ver.: always
1441  * @param message   Ver.: always
1442  * @param status   Ver.: always
1443  */
1444 bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame,
1445                                 uint16_t msgLen, uint8_t * message, EmberStatus status);
1446
1447 /** @brief Pre Attribute Change
1448  *
1449  * This function is called by the application framework before it changes an
1450  * attribute value.  The value passed into this callback is the value to which
1451  * the attribute is to be set by the framework.  The application should return
1452  * ::EMBER_ZCL_STATUS_SUCCESS to permit the change or any other ::EmberAfStatus
1453  * to reject it.
1454  *
1455  * @param endpoint   Ver.: always
1456  * @param clusterId   Ver.: always
1457  * @param attributeId   Ver.: always
1458  * @param mask   Ver.: always
1459  * @param manufacturerCode   Ver.: always
1460  * @param type   Ver.: always
1461  * @param size   Ver.: always
1462  * @param value   Ver.: always
1463  */
1464 EmberAfStatus emberAfPreAttributeChangeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId,
1465                                                 uint8_t mask, uint16_t manufacturerCode, uint8_t type, uint8_t size,
1466                                                 uint8_t * value);
1467
1468 /** @brief Post Attribute Change
1469  *
1470  * This function is called by the application framework after it changes an
1471  * attribute value. The value passed into this callback is the value to which
1472  * the attribute was set by the framework.
1473  *
1474  * @param endpoint   Ver.: always
1475  * @param clusterId   Ver.: always
1476  * @param attributeId   Ver.: always
1477  * @param mask   Ver.: always
1478  * @param manufacturerCode   Ver.: always
1479  * @param type   Ver.: always
1480  * @param size   Ver.: always
1481  * @param value   Ver.: always
1482  */
1483 void emberAfPostAttributeChangeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId,
1484                                         uint8_t mask, uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value);
1485
1486 /** @brief Read Attributes Response
1487  *
1488  * This function is called by the application framework when a Read Attributes
1489  * Response command is received from an external device.  The application should
1490  * return true if the message was processed or false if it was not.
1491  *
1492  * @param clusterId The cluster identifier of this response.  Ver.: always
1493  * @param buffer Buffer containing the list of read attribute status records.
1494  * Ver.: always
1495  * @param bufLen The length in bytes of the list.  Ver.: always
1496  */
1497 bool emberAfReadAttributesResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1498
1499 /** @brief External Attribute Read
1500  *
1501  * Like emberAfExternalAttributeWriteCallback above, this function is called
1502  * when the framework needs to read an attribute that is not stored within the
1503  * Application Framework's data structures.
1504         All of the important
1505  * information about the attribute itself is passed as a pointer to an
1506  * EmberAfAttributeMetadata struct, which is stored within the application and
1507  * used to manage the attribute. A complete description of the
1508  * EmberAfAttributeMetadata struct is provided in
1509  * app/framework/include/af-types.h
1510         This function assumes that the
1511  * application is able to read the attribute, write it into the passed buffer,
1512  * and return immediately. Any attributes that require a state machine for
1513  * reading and writing are not really candidates for externalization at the
1514  * present time. The Application Framework does not currently include a state
1515  * machine for reading or writing attributes that must take place across a
1516  * series of application ticks. Attributes that cannot be read in a timely
1517  * manner should be stored within the Application Framework and updated
1518  * occasionally by the application code from within the
1519  * emberAfMainTickCallback.
1520         If the application was successfully able to
1521  * read the attribute and write it into the passed buffer, it should return a
1522  * value of EMBER_ZCL_STATUS_SUCCESS. Ensure that the size of the externally
1523  * managed attribute value is smaller than what the buffer can hold. In the case
1524  * of a buffer overflow throw an appropriate error such as
1525  * EMBER_ZCL_STATUS_INSUFFICIENT_SPACE. Any other return value indicates the
1526  * application was not able to read the attribute.
1527  *
1528  * @param endpoint   Ver.: always
1529  * @param clusterId   Ver.: always
1530  * @param attributeMetadata   Ver.: always
1531  * @param manufacturerCode   Ver.: always
1532  * @param buffer   Ver.: always
1533  * @param maxReadLength   Ver.: always
1534  */
1535 EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
1536                                                    EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode,
1537                                                    uint8_t * buffer, uint16_t maxReadLength);
1538
1539 /** @brief Write Attributes Response
1540  *
1541  * This function is called by the application framework when a Write Attributes
1542  * Response command is received from an external device.  The application should
1543  * return true if the message was processed or false if it was not.
1544  *
1545  * @param clusterId The cluster identifier of this response.  Ver.: always
1546  * @param buffer Buffer containing the list of write attribute status records.
1547  * Ver.: always
1548  * @param bufLen The length in bytes of the list.  Ver.: always
1549  */
1550 bool emberAfWriteAttributesResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1551
1552 /** @brief External Attribute Write
1553  *
1554  * This function is called whenever the Application Framework needs to write an
1555  * attribute which is not stored within the data structures of the Application
1556  * Framework itself. One of the new features in Version 2 is the ability to
1557  * store attributes outside the Framework. This is particularly useful for
1558  * attributes that do not need to be stored because they can be read off the
1559  * hardware when they are needed, or are stored in some central location used by
1560  * many modules within the system. In this case, you can indicate that the
1561  * attribute is stored externally. When the framework needs to write an external
1562  * attribute, it makes a call to this callback.
1563         This callback is very
1564  * useful for host micros which need to store attributes in persistent memory.
1565  * Because each host micro (used with an Ember NCP) has its own type of
1566  * persistent memory storage, the Application Framework does not include the
1567  * ability to mark attributes as stored in flash the way that it does for Ember
1568  * SoCs like the EM35x. On a host micro, any attributes that need to be stored
1569  * in persistent memory should be marked as external and accessed through the
1570  * external read and write callbacks. Any host code associated with the
1571  * persistent storage should be implemented within this callback.
1572         All of
1573  * the important information about the attribute itself is passed as a pointer
1574  * to an EmberAfAttributeMetadata struct, which is stored within the application
1575  * and used to manage the attribute. A complete description of the
1576  * EmberAfAttributeMetadata struct is provided in
1577  * app/framework/include/af-types.h.
1578         This function assumes that the
1579  * application is able to write the attribute and return immediately. Any
1580  * attributes that require a state machine for reading and writing are not
1581  * candidates for externalization at the present time. The Application Framework
1582  * does not currently include a state machine for reading or writing attributes
1583  * that must take place across a series of application ticks. Attributes that
1584  * cannot be written immediately should be stored within the Application
1585  * Framework and updated occasionally by the application code from within the
1586  * emberAfMainTickCallback.
1587         If the application was successfully able to
1588  * write the attribute, it returns a value of EMBER_ZCL_STATUS_SUCCESS. Any
1589  * other return value indicates the application was not able to write the
1590  * attribute.
1591  *
1592  * @param endpoint   Ver.: always
1593  * @param clusterId   Ver.: always
1594  * @param attributeMetadata   Ver.: always
1595  * @param manufacturerCode   Ver.: always
1596  * @param buffer   Ver.: always
1597  */
1598 EmberAfStatus emberAfExternalAttributeWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
1599                                                     EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode,
1600                                                     uint8_t * buffer);
1601
1602 /** @brief Report Attributes
1603  *
1604  * This function is called by the application framework when a Report Attributes
1605  * command is received from an external device.  The application should return
1606  * true if the message was processed or false if it was not.
1607  *
1608  * @param clusterId The cluster identifier of this command.  Ver.: always
1609  * @param buffer Buffer containing the list of attribute report records.  Ver.:
1610  * always
1611  * @param bufLen The length in bytes of the list.  Ver.: always
1612  */
1613 bool emberAfReportAttributesCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1614
1615 /** @brief Get Current Time
1616  *
1617  * This callback is called when device attempts to get current time from the
1618  * hardware. If this device has means to retrieve exact time, then this method
1619  * should implement it. If the callback can't provide the exact time it should
1620  * return 0 to indicate failure. Default action is to return 0, which indicates
1621  * that device does not have access to real time.
1622  *
1623  */
1624 uint32_t emberAfGetCurrentTimeCallback();
1625
1626 /** @brief Get Endpoint Info
1627  *
1628  * This function is a callback to an application implemented endpoint that
1629  * operates outside the normal application framework.  When the framework wishes
1630  * to perform operations with that endpoint it uses this callback to retrieve
1631  * the endpoint's information.  If the endpoint exists and the application can
1632  * provide data then true shall be returned.  Otherwise the callback must return
1633  * false.
1634  *
1635  * @param endpoint The endpoint to retrieve data for.  Ver.: always
1636  * @param returnNetworkIndex The index corresponding to the ZigBee network the
1637  * endpoint belongs to.  If not using a multi-network device, 0 must be
1638  * returned.  Otherwise on a multi-network device the stack will switch to this
1639  * network before sending the message.  Ver.: always
1640  * @param returnEndpointInfo A pointer to a data struct that will be written
1641  * with information about the endpoint.  Ver.: always
1642  */
1643 bool emberAfGetEndpointInfoCallback(chip::EndpointId endpoint, uint8_t * returnNetworkIndex,
1644                                     EmberAfEndpointInfoStruct * returnEndpointInfo);
1645
1646 /** @brief Get Source Route Overhead
1647  *
1648  * This function is called by the framework to determine the overhead required
1649  * in the network frame for source routing to a particular destination.
1650  *
1651  * @param destination The node id of the destination  Ver.: always
1652  */
1653 uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination);
1654
1655 /** @brief Registration Abort
1656  *
1657  * This callback is called when the device should abort the registration
1658  * process.
1659  *
1660  */
1661 void emberAfRegistrationAbortCallback();
1662
1663 /** @brief Interpan Send Message
1664  *
1665  * This function will send a raw MAC message with interpan frame format using
1666  * the passed parameters.
1667  *
1668  * @param header Interpan header info  Ver.: always
1669  * @param messageLength The length of the message received or to send  Ver.:
1670  * always
1671  * @param message The message data received or to send.  Ver.: always
1672  */
1673 EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message);
1674
1675 /** @brief Start Move
1676  *
1677  * This function is called to initiate the process for a device to move (rejoin)
1678  * to a new parent.
1679  *
1680  */
1681 bool emberAfStartMoveCallback();