3 * Copyright (c) 2021 Project CHIP Authors
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 // THIS FILE IS GENERATED BY ZAP
20 // Prevent multiple inclusion
23 #include "af-structs.h"
25 #include "basic-types.h"
27 #include <lib/support/Span.h>
29 /** @brief Cluster Init
31 * This function is called when a specific cluster is initialized. It gives the
32 * application an opportunity to take care of cluster initialization procedures.
33 * It is called exactly once for each endpoint where cluster is present.
35 * @param endpoint Ver.: always
36 * @param clusterId Ver.: always
38 void emberAfClusterInitCallback(chip::EndpointId endpoint, chip::ClusterId clusterId);
40 // Cluster Init Functions
42 /** @brief Application Basic Cluster Init
46 * @param endpoint Endpoint that is being initialized
48 void emberAfApplicationBasicClusterInitCallback(chip::EndpointId endpoint);
50 /** @brief Barrier Control Cluster Init
54 * @param endpoint Endpoint that is being initialized
56 void emberAfBarrierControlClusterInitCallback(chip::EndpointId endpoint);
58 /** @brief Basic Cluster Init
62 * @param endpoint Endpoint that is being initialized
64 void emberAfBasicClusterInitCallback(chip::EndpointId endpoint);
66 /** @brief Binding Cluster Init
70 * @param endpoint Endpoint that is being initialized
72 void emberAfBindingClusterInitCallback(chip::EndpointId endpoint);
74 /** @brief Color Control Cluster Init
78 * @param endpoint Endpoint that is being initialized
80 void emberAfColorControlClusterInitCallback(chip::EndpointId endpoint);
82 /** @brief Door Lock Cluster Init
86 * @param endpoint Endpoint that is being initialized
88 void emberAfDoorLockClusterInitCallback(chip::EndpointId endpoint);
90 /** @brief General Commissioning Cluster Init
94 * @param endpoint Endpoint that is being initialized
96 void emberAfGeneralCommissioningClusterInitCallback(chip::EndpointId endpoint);
98 /** @brief Groups Cluster Init
102 * @param endpoint Endpoint that is being initialized
104 void emberAfGroupsClusterInitCallback(chip::EndpointId endpoint);
106 /** @brief Identify Cluster Init
110 * @param endpoint Endpoint that is being initialized
112 void emberAfIdentifyClusterInitCallback(chip::EndpointId endpoint);
114 /** @brief Level Control Cluster Init
118 * @param endpoint Endpoint that is being initialized
120 void emberAfLevelControlClusterInitCallback(chip::EndpointId endpoint);
122 /** @brief Low Power Cluster Init
126 * @param endpoint Endpoint that is being initialized
128 void emberAfLowPowerClusterInitCallback(chip::EndpointId endpoint);
130 /** @brief On/off Cluster Init
134 * @param endpoint Endpoint that is being initialized
136 void emberAfOnOffClusterInitCallback(chip::EndpointId endpoint);
138 /** @brief Scenes Cluster Init
142 * @param endpoint Endpoint that is being initialized
144 void emberAfScenesClusterInitCallback(chip::EndpointId endpoint);
146 /** @brief Temperature Measurement Cluster Init
150 * @param endpoint Endpoint that is being initialized
152 void emberAfTemperatureMeasurementClusterInitCallback(chip::EndpointId endpoint);
154 // Cluster Server/Client Init Functions
157 // Application Basic Cluster client
160 /** @brief Application Basic Cluster Client Init
164 * @param endpoint Endpoint that is being initialized
166 void emberAfApplicationBasicClusterClientInitCallback(chip::EndpointId endpoint);
168 /** @brief Application Basic Cluster Client Attribute Changed
170 * Client Attribute Changed
172 * @param endpoint Endpoint that is being initialized
173 * @param attributeId Attribute that changed
175 void emberAfApplicationBasicClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
177 /** @brief Application Basic Cluster Client Manufacturer Specific Attribute Changed
179 * Client Manufacturer Specific Attribute Changed
181 * @param endpoint Endpoint that is being initialized
182 * @param attributeId Attribute that changed
183 * @param manufacturerCode Manufacturer Code of the attribute that changed
185 void emberAfApplicationBasicClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
186 chip::AttributeId attributeId,
187 uint16_t manufacturerCode);
189 /** @brief Application Basic Cluster Client Message Sent
191 * Client Message Sent
193 * @param type The type of message sent
194 * @param indexOrDestination The destination or address to which the message was sent
195 * @param apsFrame The APS frame for the message
196 * @param msgLen The length of the message
197 * @param message The message that was sent
198 * @param status The status of the sent message
200 void emberAfApplicationBasicClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
201 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
204 /** @brief Application Basic Cluster Client Pre Attribute Changed
206 * client Pre Attribute Changed
208 * @param endpoint Endpoint that is being initialized
209 * @param attributeId Attribute to be changed
210 * @param attributeType Attribute type
211 * @param size Attribute size
212 * @param value Attribute value
214 EmberAfStatus emberAfApplicationBasicClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint,
215 chip::AttributeId attributeId,
216 EmberAfAttributeType attributeType, uint8_t size,
219 /** @brief Application Basic Cluster Client Tick
223 * @param endpoint Endpoint that is being served
225 void emberAfApplicationBasicClusterClientTickCallback(chip::EndpointId endpoint);
228 // Barrier Control Cluster client
231 /** @brief Barrier Control Cluster Client Init
235 * @param endpoint Endpoint that is being initialized
237 void emberAfBarrierControlClusterClientInitCallback(chip::EndpointId endpoint);
239 /** @brief Barrier Control Cluster Client Attribute Changed
241 * Client Attribute Changed
243 * @param endpoint Endpoint that is being initialized
244 * @param attributeId Attribute that changed
246 void emberAfBarrierControlClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
248 /** @brief Barrier Control Cluster Client Manufacturer Specific Attribute Changed
250 * Client Manufacturer Specific Attribute Changed
252 * @param endpoint Endpoint that is being initialized
253 * @param attributeId Attribute that changed
254 * @param manufacturerCode Manufacturer Code of the attribute that changed
256 void emberAfBarrierControlClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
257 chip::AttributeId attributeId,
258 uint16_t manufacturerCode);
260 /** @brief Barrier Control Cluster Client Message Sent
262 * Client Message Sent
264 * @param type The type of message sent
265 * @param indexOrDestination The destination or address to which the message was sent
266 * @param apsFrame The APS frame for the message
267 * @param msgLen The length of the message
268 * @param message The message that was sent
269 * @param status The status of the sent message
271 void emberAfBarrierControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
272 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
275 /** @brief Barrier Control Cluster Client Pre Attribute Changed
277 * client Pre Attribute Changed
279 * @param endpoint Endpoint that is being initialized
280 * @param attributeId Attribute to be changed
281 * @param attributeType Attribute type
282 * @param size Attribute size
283 * @param value Attribute value
285 EmberAfStatus emberAfBarrierControlClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint,
286 chip::AttributeId attributeId,
287 EmberAfAttributeType attributeType, uint8_t size,
290 /** @brief Barrier Control Cluster Client Tick
294 * @param endpoint Endpoint that is being served
296 void emberAfBarrierControlClusterClientTickCallback(chip::EndpointId endpoint);
299 // Basic Cluster client
302 /** @brief Basic Cluster Client Init
306 * @param endpoint Endpoint that is being initialized
308 void emberAfBasicClusterClientInitCallback(chip::EndpointId endpoint);
310 /** @brief Basic Cluster Client Attribute Changed
312 * Client Attribute Changed
314 * @param endpoint Endpoint that is being initialized
315 * @param attributeId Attribute that changed
317 void emberAfBasicClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
319 /** @brief Basic Cluster Client Manufacturer Specific Attribute Changed
321 * Client Manufacturer Specific Attribute Changed
323 * @param endpoint Endpoint that is being initialized
324 * @param attributeId Attribute that changed
325 * @param manufacturerCode Manufacturer Code of the attribute that changed
327 void emberAfBasicClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
328 uint16_t manufacturerCode);
330 /** @brief Basic Cluster Client Message Sent
332 * Client Message Sent
334 * @param type The type of message sent
335 * @param indexOrDestination The destination or address to which the message was sent
336 * @param apsFrame The APS frame for the message
337 * @param msgLen The length of the message
338 * @param message The message that was sent
339 * @param status The status of the sent message
341 void emberAfBasicClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
342 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status);
344 /** @brief Basic Cluster Client Pre Attribute Changed
346 * client Pre Attribute Changed
348 * @param endpoint Endpoint that is being initialized
349 * @param attributeId Attribute to be changed
350 * @param attributeType Attribute type
351 * @param size Attribute size
352 * @param value Attribute value
354 EmberAfStatus emberAfBasicClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
355 EmberAfAttributeType attributeType, uint8_t size,
358 /** @brief Basic Cluster Client Tick
362 * @param endpoint Endpoint that is being served
364 void emberAfBasicClusterClientTickCallback(chip::EndpointId endpoint);
367 // Binding Cluster client
370 /** @brief Binding Cluster Client Init
374 * @param endpoint Endpoint that is being initialized
376 void emberAfBindingClusterClientInitCallback(chip::EndpointId endpoint);
378 /** @brief Binding Cluster Client Attribute Changed
380 * Client Attribute Changed
382 * @param endpoint Endpoint that is being initialized
383 * @param attributeId Attribute that changed
385 void emberAfBindingClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
387 /** @brief Binding Cluster Client Manufacturer Specific Attribute Changed
389 * Client Manufacturer Specific Attribute Changed
391 * @param endpoint Endpoint that is being initialized
392 * @param attributeId Attribute that changed
393 * @param manufacturerCode Manufacturer Code of the attribute that changed
395 void emberAfBindingClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
396 chip::AttributeId attributeId,
397 uint16_t manufacturerCode);
399 /** @brief Binding Cluster Client Message Sent
401 * Client Message Sent
403 * @param type The type of message sent
404 * @param indexOrDestination The destination or address to which the message was sent
405 * @param apsFrame The APS frame for the message
406 * @param msgLen The length of the message
407 * @param message The message that was sent
408 * @param status The status of the sent message
410 void emberAfBindingClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
411 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
414 /** @brief Binding Cluster Client Pre Attribute Changed
416 * client Pre Attribute Changed
418 * @param endpoint Endpoint that is being initialized
419 * @param attributeId Attribute to be changed
420 * @param attributeType Attribute type
421 * @param size Attribute size
422 * @param value Attribute value
424 EmberAfStatus emberAfBindingClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
425 EmberAfAttributeType attributeType, uint8_t size,
428 /** @brief Binding Cluster Client Tick
432 * @param endpoint Endpoint that is being served
434 void emberAfBindingClusterClientTickCallback(chip::EndpointId endpoint);
437 // Color Control Cluster client
440 /** @brief Color Control Cluster Client Init
444 * @param endpoint Endpoint that is being initialized
446 void emberAfColorControlClusterClientInitCallback(chip::EndpointId endpoint);
448 /** @brief Color Control Cluster Client Attribute Changed
450 * Client Attribute Changed
452 * @param endpoint Endpoint that is being initialized
453 * @param attributeId Attribute that changed
455 void emberAfColorControlClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
457 /** @brief Color Control Cluster Client Manufacturer Specific Attribute Changed
459 * Client Manufacturer Specific Attribute Changed
461 * @param endpoint Endpoint that is being initialized
462 * @param attributeId Attribute that changed
463 * @param manufacturerCode Manufacturer Code of the attribute that changed
465 void emberAfColorControlClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
466 chip::AttributeId attributeId,
467 uint16_t manufacturerCode);
469 /** @brief Color Control Cluster Client Message Sent
471 * Client Message Sent
473 * @param type The type of message sent
474 * @param indexOrDestination The destination or address to which the message was sent
475 * @param apsFrame The APS frame for the message
476 * @param msgLen The length of the message
477 * @param message The message that was sent
478 * @param status The status of the sent message
480 void emberAfColorControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
481 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
484 /** @brief Color Control Cluster Client Pre Attribute Changed
486 * client Pre Attribute Changed
488 * @param endpoint Endpoint that is being initialized
489 * @param attributeId Attribute to be changed
490 * @param attributeType Attribute type
491 * @param size Attribute size
492 * @param value Attribute value
494 EmberAfStatus emberAfColorControlClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
495 EmberAfAttributeType attributeType, uint8_t size,
498 /** @brief Color Control Cluster Client Tick
502 * @param endpoint Endpoint that is being served
504 void emberAfColorControlClusterClientTickCallback(chip::EndpointId endpoint);
507 // Door Lock Cluster client
510 /** @brief Door Lock Cluster Client Init
514 * @param endpoint Endpoint that is being initialized
516 void emberAfDoorLockClusterClientInitCallback(chip::EndpointId endpoint);
518 /** @brief Door Lock Cluster Client Attribute Changed
520 * Client Attribute Changed
522 * @param endpoint Endpoint that is being initialized
523 * @param attributeId Attribute that changed
525 void emberAfDoorLockClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
527 /** @brief Door Lock Cluster Client Manufacturer Specific Attribute Changed
529 * Client Manufacturer Specific Attribute Changed
531 * @param endpoint Endpoint that is being initialized
532 * @param attributeId Attribute that changed
533 * @param manufacturerCode Manufacturer Code of the attribute that changed
535 void emberAfDoorLockClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
536 chip::AttributeId attributeId,
537 uint16_t manufacturerCode);
539 /** @brief Door Lock Cluster Client Message Sent
541 * Client Message Sent
543 * @param type The type of message sent
544 * @param indexOrDestination The destination or address to which the message was sent
545 * @param apsFrame The APS frame for the message
546 * @param msgLen The length of the message
547 * @param message The message that was sent
548 * @param status The status of the sent message
550 void emberAfDoorLockClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
551 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
554 /** @brief Door Lock Cluster Client Pre Attribute Changed
556 * client Pre Attribute Changed
558 * @param endpoint Endpoint that is being initialized
559 * @param attributeId Attribute to be changed
560 * @param attributeType Attribute type
561 * @param size Attribute size
562 * @param value Attribute value
564 EmberAfStatus emberAfDoorLockClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
565 EmberAfAttributeType attributeType, uint8_t size,
568 /** @brief Door Lock Cluster Client Tick
572 * @param endpoint Endpoint that is being served
574 void emberAfDoorLockClusterClientTickCallback(chip::EndpointId endpoint);
577 // General Commissioning Cluster client
580 /** @brief General Commissioning Cluster Client Init
584 * @param endpoint Endpoint that is being initialized
586 void emberAfGeneralCommissioningClusterClientInitCallback(chip::EndpointId endpoint);
588 /** @brief General Commissioning Cluster Client Attribute Changed
590 * Client Attribute Changed
592 * @param endpoint Endpoint that is being initialized
593 * @param attributeId Attribute that changed
595 void emberAfGeneralCommissioningClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
597 /** @brief General Commissioning Cluster Client Manufacturer Specific Attribute Changed
599 * Client Manufacturer Specific Attribute Changed
601 * @param endpoint Endpoint that is being initialized
602 * @param attributeId Attribute that changed
603 * @param manufacturerCode Manufacturer Code of the attribute that changed
605 void emberAfGeneralCommissioningClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
606 chip::AttributeId attributeId,
607 uint16_t manufacturerCode);
609 /** @brief General Commissioning Cluster Client Message Sent
611 * Client Message Sent
613 * @param type The type of message sent
614 * @param indexOrDestination The destination or address to which the message was sent
615 * @param apsFrame The APS frame for the message
616 * @param msgLen The length of the message
617 * @param message The message that was sent
618 * @param status The status of the sent message
620 void emberAfGeneralCommissioningClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
621 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
624 /** @brief General Commissioning Cluster Client Pre Attribute Changed
626 * client Pre Attribute Changed
628 * @param endpoint Endpoint that is being initialized
629 * @param attributeId Attribute to be changed
630 * @param attributeType Attribute type
631 * @param size Attribute size
632 * @param value Attribute value
634 EmberAfStatus emberAfGeneralCommissioningClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint,
635 chip::AttributeId attributeId,
636 EmberAfAttributeType attributeType, uint8_t size,
639 /** @brief General Commissioning Cluster Client Tick
643 * @param endpoint Endpoint that is being served
645 void emberAfGeneralCommissioningClusterClientTickCallback(chip::EndpointId endpoint);
648 // Groups Cluster client
651 /** @brief Groups Cluster Client Init
655 * @param endpoint Endpoint that is being initialized
657 void emberAfGroupsClusterClientInitCallback(chip::EndpointId endpoint);
659 /** @brief Groups Cluster Client Attribute Changed
661 * Client Attribute Changed
663 * @param endpoint Endpoint that is being initialized
664 * @param attributeId Attribute that changed
666 void emberAfGroupsClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
668 /** @brief Groups Cluster Client Manufacturer Specific Attribute Changed
670 * Client Manufacturer Specific Attribute Changed
672 * @param endpoint Endpoint that is being initialized
673 * @param attributeId Attribute that changed
674 * @param manufacturerCode Manufacturer Code of the attribute that changed
676 void emberAfGroupsClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
677 chip::AttributeId attributeId,
678 uint16_t manufacturerCode);
680 /** @brief Groups Cluster Client Message Sent
682 * Client Message Sent
684 * @param type The type of message sent
685 * @param indexOrDestination The destination or address to which the message was sent
686 * @param apsFrame The APS frame for the message
687 * @param msgLen The length of the message
688 * @param message The message that was sent
689 * @param status The status of the sent message
691 void emberAfGroupsClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
692 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
695 /** @brief Groups Cluster Client Pre Attribute Changed
697 * client Pre Attribute Changed
699 * @param endpoint Endpoint that is being initialized
700 * @param attributeId Attribute to be changed
701 * @param attributeType Attribute type
702 * @param size Attribute size
703 * @param value Attribute value
705 EmberAfStatus emberAfGroupsClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
706 EmberAfAttributeType attributeType, uint8_t size,
709 /** @brief Groups Cluster Client Tick
713 * @param endpoint Endpoint that is being served
715 void emberAfGroupsClusterClientTickCallback(chip::EndpointId endpoint);
718 // Identify Cluster client
721 /** @brief Identify Cluster Client Init
725 * @param endpoint Endpoint that is being initialized
727 void emberAfIdentifyClusterClientInitCallback(chip::EndpointId endpoint);
729 /** @brief Identify Cluster Client Attribute Changed
731 * Client Attribute Changed
733 * @param endpoint Endpoint that is being initialized
734 * @param attributeId Attribute that changed
736 void emberAfIdentifyClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
738 /** @brief Identify Cluster Client Manufacturer Specific Attribute Changed
740 * Client Manufacturer Specific Attribute Changed
742 * @param endpoint Endpoint that is being initialized
743 * @param attributeId Attribute that changed
744 * @param manufacturerCode Manufacturer Code of the attribute that changed
746 void emberAfIdentifyClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
747 chip::AttributeId attributeId,
748 uint16_t manufacturerCode);
750 /** @brief Identify Cluster Client Message Sent
752 * Client Message Sent
754 * @param type The type of message sent
755 * @param indexOrDestination The destination or address to which the message was sent
756 * @param apsFrame The APS frame for the message
757 * @param msgLen The length of the message
758 * @param message The message that was sent
759 * @param status The status of the sent message
761 void emberAfIdentifyClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
762 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
765 /** @brief Identify Cluster Client Pre Attribute Changed
767 * client Pre Attribute Changed
769 * @param endpoint Endpoint that is being initialized
770 * @param attributeId Attribute to be changed
771 * @param attributeType Attribute type
772 * @param size Attribute size
773 * @param value Attribute value
775 EmberAfStatus emberAfIdentifyClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
776 EmberAfAttributeType attributeType, uint8_t size,
779 /** @brief Identify Cluster Client Tick
783 * @param endpoint Endpoint that is being served
785 void emberAfIdentifyClusterClientTickCallback(chip::EndpointId endpoint);
788 // Level Control Cluster client
791 /** @brief Level Control Cluster Client Init
795 * @param endpoint Endpoint that is being initialized
797 void emberAfLevelControlClusterClientInitCallback(chip::EndpointId endpoint);
799 /** @brief Level Control Cluster Client Attribute Changed
801 * Client Attribute Changed
803 * @param endpoint Endpoint that is being initialized
804 * @param attributeId Attribute that changed
806 void emberAfLevelControlClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
808 /** @brief Level Control Cluster Client Manufacturer Specific Attribute Changed
810 * Client Manufacturer Specific Attribute Changed
812 * @param endpoint Endpoint that is being initialized
813 * @param attributeId Attribute that changed
814 * @param manufacturerCode Manufacturer Code of the attribute that changed
816 void emberAfLevelControlClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
817 chip::AttributeId attributeId,
818 uint16_t manufacturerCode);
820 /** @brief Level Control Cluster Client Message Sent
822 * Client Message Sent
824 * @param type The type of message sent
825 * @param indexOrDestination The destination or address to which the message was sent
826 * @param apsFrame The APS frame for the message
827 * @param msgLen The length of the message
828 * @param message The message that was sent
829 * @param status The status of the sent message
831 void emberAfLevelControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
832 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
835 /** @brief Level Control Cluster Client Pre Attribute Changed
837 * client Pre Attribute Changed
839 * @param endpoint Endpoint that is being initialized
840 * @param attributeId Attribute to be changed
841 * @param attributeType Attribute type
842 * @param size Attribute size
843 * @param value Attribute value
845 EmberAfStatus emberAfLevelControlClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
846 EmberAfAttributeType attributeType, uint8_t size,
849 /** @brief Level Control Cluster Client Tick
853 * @param endpoint Endpoint that is being served
855 void emberAfLevelControlClusterClientTickCallback(chip::EndpointId endpoint);
858 // Low Power Cluster client
861 /** @brief Low Power Cluster Client Init
865 * @param endpoint Endpoint that is being initialized
867 void emberAfLowPowerClusterClientInitCallback(chip::EndpointId endpoint);
869 /** @brief Low Power Cluster Client Attribute Changed
871 * Client Attribute Changed
873 * @param endpoint Endpoint that is being initialized
874 * @param attributeId Attribute that changed
876 void emberAfLowPowerClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
878 /** @brief Low Power Cluster Client Manufacturer Specific Attribute Changed
880 * Client Manufacturer Specific Attribute Changed
882 * @param endpoint Endpoint that is being initialized
883 * @param attributeId Attribute that changed
884 * @param manufacturerCode Manufacturer Code of the attribute that changed
886 void emberAfLowPowerClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
887 chip::AttributeId attributeId,
888 uint16_t manufacturerCode);
890 /** @brief Low Power Cluster Client Message Sent
892 * Client Message Sent
894 * @param type The type of message sent
895 * @param indexOrDestination The destination or address to which the message was sent
896 * @param apsFrame The APS frame for the message
897 * @param msgLen The length of the message
898 * @param message The message that was sent
899 * @param status The status of the sent message
901 void emberAfLowPowerClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
902 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
905 /** @brief Low Power Cluster Client Pre Attribute Changed
907 * client Pre Attribute Changed
909 * @param endpoint Endpoint that is being initialized
910 * @param attributeId Attribute to be changed
911 * @param attributeType Attribute type
912 * @param size Attribute size
913 * @param value Attribute value
915 EmberAfStatus emberAfLowPowerClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
916 EmberAfAttributeType attributeType, uint8_t size,
919 /** @brief Low Power Cluster Client Tick
923 * @param endpoint Endpoint that is being served
925 void emberAfLowPowerClusterClientTickCallback(chip::EndpointId endpoint);
928 // On/off Cluster client
931 /** @brief On/off Cluster Client Init
935 * @param endpoint Endpoint that is being initialized
937 void emberAfOnOffClusterClientInitCallback(chip::EndpointId endpoint);
939 /** @brief On/off Cluster Client Attribute Changed
941 * Client Attribute Changed
943 * @param endpoint Endpoint that is being initialized
944 * @param attributeId Attribute that changed
946 void emberAfOnOffClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
948 /** @brief On/off Cluster Client Manufacturer Specific Attribute Changed
950 * Client Manufacturer Specific Attribute Changed
952 * @param endpoint Endpoint that is being initialized
953 * @param attributeId Attribute that changed
954 * @param manufacturerCode Manufacturer Code of the attribute that changed
956 void emberAfOnOffClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
957 uint16_t manufacturerCode);
959 /** @brief On/off Cluster Client Message Sent
961 * Client Message Sent
963 * @param type The type of message sent
964 * @param indexOrDestination The destination or address to which the message was sent
965 * @param apsFrame The APS frame for the message
966 * @param msgLen The length of the message
967 * @param message The message that was sent
968 * @param status The status of the sent message
970 void emberAfOnOffClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
971 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status);
973 /** @brief On/off Cluster Client Pre Attribute Changed
975 * client Pre Attribute Changed
977 * @param endpoint Endpoint that is being initialized
978 * @param attributeId Attribute to be changed
979 * @param attributeType Attribute type
980 * @param size Attribute size
981 * @param value Attribute value
983 EmberAfStatus emberAfOnOffClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
984 EmberAfAttributeType attributeType, uint8_t size,
987 /** @brief On/off Cluster Client Tick
991 * @param endpoint Endpoint that is being served
993 void emberAfOnOffClusterClientTickCallback(chip::EndpointId endpoint);
996 // Scenes Cluster client
999 /** @brief Scenes Cluster Client Init
1003 * @param endpoint Endpoint that is being initialized
1005 void emberAfScenesClusterClientInitCallback(chip::EndpointId endpoint);
1007 /** @brief Scenes Cluster Client Attribute Changed
1009 * Client Attribute Changed
1011 * @param endpoint Endpoint that is being initialized
1012 * @param attributeId Attribute that changed
1014 void emberAfScenesClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
1016 /** @brief Scenes Cluster Client Manufacturer Specific Attribute Changed
1018 * Client Manufacturer Specific Attribute Changed
1020 * @param endpoint Endpoint that is being initialized
1021 * @param attributeId Attribute that changed
1022 * @param manufacturerCode Manufacturer Code of the attribute that changed
1024 void emberAfScenesClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
1025 chip::AttributeId attributeId,
1026 uint16_t manufacturerCode);
1028 /** @brief Scenes Cluster Client Message Sent
1030 * Client Message Sent
1032 * @param type The type of message sent
1033 * @param indexOrDestination The destination or address to which the message was sent
1034 * @param apsFrame The APS frame for the message
1035 * @param msgLen The length of the message
1036 * @param message The message that was sent
1037 * @param status The status of the sent message
1039 void emberAfScenesClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
1040 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
1041 EmberStatus status);
1043 /** @brief Scenes Cluster Client Pre Attribute Changed
1045 * client Pre Attribute Changed
1047 * @param endpoint Endpoint that is being initialized
1048 * @param attributeId Attribute to be changed
1049 * @param attributeType Attribute type
1050 * @param size Attribute size
1051 * @param value Attribute value
1053 EmberAfStatus emberAfScenesClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
1054 EmberAfAttributeType attributeType, uint8_t size,
1057 /** @brief Scenes Cluster Client Tick
1061 * @param endpoint Endpoint that is being served
1063 void emberAfScenesClusterClientTickCallback(chip::EndpointId endpoint);
1066 // Temperature Measurement Cluster client
1069 /** @brief Temperature Measurement Cluster Client Init
1073 * @param endpoint Endpoint that is being initialized
1075 void emberAfTemperatureMeasurementClusterClientInitCallback(chip::EndpointId endpoint);
1077 /** @brief Temperature Measurement Cluster Client Attribute Changed
1079 * Client Attribute Changed
1081 * @param endpoint Endpoint that is being initialized
1082 * @param attributeId Attribute that changed
1084 void emberAfTemperatureMeasurementClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
1086 /** @brief Temperature Measurement Cluster Client Manufacturer Specific Attribute Changed
1088 * Client Manufacturer Specific Attribute Changed
1090 * @param endpoint Endpoint that is being initialized
1091 * @param attributeId Attribute that changed
1092 * @param manufacturerCode Manufacturer Code of the attribute that changed
1094 void emberAfTemperatureMeasurementClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
1095 chip::AttributeId attributeId,
1096 uint16_t manufacturerCode);
1098 /** @brief Temperature Measurement Cluster Client Message Sent
1100 * Client Message Sent
1102 * @param type The type of message sent
1103 * @param indexOrDestination The destination or address to which the message was sent
1104 * @param apsFrame The APS frame for the message
1105 * @param msgLen The length of the message
1106 * @param message The message that was sent
1107 * @param status The status of the sent message
1109 void emberAfTemperatureMeasurementClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
1110 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
1111 EmberStatus status);
1113 /** @brief Temperature Measurement Cluster Client Pre Attribute Changed
1115 * client Pre Attribute Changed
1117 * @param endpoint Endpoint that is being initialized
1118 * @param attributeId Attribute to be changed
1119 * @param attributeType Attribute type
1120 * @param size Attribute size
1121 * @param value Attribute value
1123 EmberAfStatus emberAfTemperatureMeasurementClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint,
1124 chip::AttributeId attributeId,
1125 EmberAfAttributeType attributeType,
1126 uint8_t size, uint8_t * value);
1128 /** @brief Temperature Measurement Cluster Client Tick
1132 * @param endpoint Endpoint that is being served
1134 void emberAfTemperatureMeasurementClusterClientTickCallback(chip::EndpointId endpoint);
1136 // Cluster Commands Callback
1139 * @brief Door Lock Cluster ClearAllPinsResponse Command callback
1143 bool emberAfDoorLockClusterClearAllPinsResponseCallback(uint8_t status);
1146 * @brief Door Lock Cluster ClearAllRfidsResponse Command callback
1150 bool emberAfDoorLockClusterClearAllRfidsResponseCallback(uint8_t status);
1153 * @brief Door Lock Cluster ClearHolidayScheduleResponse Command callback
1157 bool emberAfDoorLockClusterClearHolidayScheduleResponseCallback(uint8_t status);
1160 * @brief Door Lock Cluster ClearPinResponse Command callback
1164 bool emberAfDoorLockClusterClearPinResponseCallback(uint8_t status);
1167 * @brief Door Lock Cluster ClearRfidResponse Command callback
1171 bool emberAfDoorLockClusterClearRfidResponseCallback(uint8_t status);
1174 * @brief Door Lock Cluster ClearWeekdayScheduleResponse Command callback
1178 bool emberAfDoorLockClusterClearWeekdayScheduleResponseCallback(uint8_t status);
1181 * @brief Door Lock Cluster ClearYeardayScheduleResponse Command callback
1185 bool emberAfDoorLockClusterClearYeardayScheduleResponseCallback(uint8_t status);
1188 * @brief Door Lock Cluster GetHolidayScheduleResponse Command callback
1191 * @param localStartTime
1192 * @param localEndTime
1193 * @param operatingModeDuringHoliday
1196 bool emberAfDoorLockClusterGetHolidayScheduleResponseCallback(uint8_t scheduleId, uint8_t status, uint32_t localStartTime,
1197 uint32_t localEndTime, uint8_t operatingModeDuringHoliday);
1200 * @brief Door Lock Cluster GetLogRecordResponse Command callback
1205 * @param eventIdOrAlarmCode
1210 bool emberAfDoorLockClusterGetLogRecordResponseCallback(uint16_t logEntryId, uint32_t timestamp, uint8_t eventType, uint8_t source,
1211 uint8_t eventIdOrAlarmCode, uint16_t userId, uint8_t * pin);
1214 * @brief Door Lock Cluster GetPinResponse Command callback
1221 bool emberAfDoorLockClusterGetPinResponseCallback(uint16_t userId, uint8_t userStatus, uint8_t userType, uint8_t * pin);
1224 * @brief Door Lock Cluster GetRfidResponse Command callback
1231 bool emberAfDoorLockClusterGetRfidResponseCallback(uint16_t userId, uint8_t userStatus, uint8_t userType, uint8_t * rfid);
1234 * @brief Door Lock Cluster GetUserTypeResponse Command callback
1239 bool emberAfDoorLockClusterGetUserTypeResponseCallback(uint16_t userId, uint8_t userType);
1242 * @brief Door Lock Cluster GetWeekdayScheduleResponse Command callback
1248 * @param startMinute
1253 bool emberAfDoorLockClusterGetWeekdayScheduleResponseCallback(uint8_t scheduleId, uint16_t userId, uint8_t status, uint8_t daysMask,
1254 uint8_t startHour, uint8_t startMinute, uint8_t endHour,
1258 * @brief Door Lock Cluster GetYeardayScheduleResponse Command callback
1262 * @param localStartTime
1263 * @param localEndTime
1266 bool emberAfDoorLockClusterGetYeardayScheduleResponseCallback(uint8_t scheduleId, uint16_t userId, uint8_t status,
1267 uint32_t localStartTime, uint32_t localEndTime);
1270 * @brief Door Lock Cluster LockDoorResponse Command callback
1274 bool emberAfDoorLockClusterLockDoorResponseCallback(uint8_t status);
1277 * @brief Door Lock Cluster SetHolidayScheduleResponse Command callback
1281 bool emberAfDoorLockClusterSetHolidayScheduleResponseCallback(uint8_t status);
1284 * @brief Door Lock Cluster SetPinResponse Command callback
1288 bool emberAfDoorLockClusterSetPinResponseCallback(uint8_t status);
1291 * @brief Door Lock Cluster SetRfidResponse Command callback
1295 bool emberAfDoorLockClusterSetRfidResponseCallback(uint8_t status);
1298 * @brief Door Lock Cluster SetUserTypeResponse Command callback
1302 bool emberAfDoorLockClusterSetUserTypeResponseCallback(uint8_t status);
1305 * @brief Door Lock Cluster SetWeekdayScheduleResponse Command callback
1309 bool emberAfDoorLockClusterSetWeekdayScheduleResponseCallback(uint8_t status);
1312 * @brief Door Lock Cluster SetYeardayScheduleResponse Command callback
1316 bool emberAfDoorLockClusterSetYeardayScheduleResponseCallback(uint8_t status);
1319 * @brief Door Lock Cluster UnlockDoorResponse Command callback
1323 bool emberAfDoorLockClusterUnlockDoorResponseCallback(uint8_t status);
1326 * @brief Door Lock Cluster UnlockWithTimeoutResponse Command callback
1330 bool emberAfDoorLockClusterUnlockWithTimeoutResponseCallback(uint8_t status);
1333 * @brief General Commissioning Cluster ArmFailSafeResponse Command callback
1338 bool emberAfGeneralCommissioningClusterArmFailSafeResponseCallback(uint8_t errorCode, uint8_t * debugText);
1341 * @brief General Commissioning Cluster CommissioningCompleteResponse Command callback
1346 bool emberAfGeneralCommissioningClusterCommissioningCompleteResponseCallback(uint8_t errorCode, uint8_t * debugText);
1349 * @brief General Commissioning Cluster SetFabricResponse Command callback
1354 bool emberAfGeneralCommissioningClusterSetFabricResponseCallback(uint8_t errorCode, uint8_t * debugText);
1357 * @brief Groups Cluster AddGroupResponse Command callback
1362 bool emberAfGroupsClusterAddGroupResponseCallback(uint8_t status, uint16_t groupId);
1365 * @brief Groups Cluster GetGroupMembershipResponse Command callback
1371 bool emberAfGroupsClusterGetGroupMembershipResponseCallback(uint8_t capacity, uint8_t groupCount,
1372 /* TYPE WARNING: array array defaults to */ uint8_t * groupList);
1375 * @brief Groups Cluster RemoveGroupResponse Command callback
1380 bool emberAfGroupsClusterRemoveGroupResponseCallback(uint8_t status, uint16_t groupId);
1383 * @brief Groups Cluster ViewGroupResponse Command callback
1389 bool emberAfGroupsClusterViewGroupResponseCallback(uint8_t status, uint16_t groupId, uint8_t * groupName);
1392 * @brief Identify Cluster IdentifyQueryResponse Command callback
1396 bool emberAfIdentifyClusterIdentifyQueryResponseCallback(uint16_t timeout);
1399 * @brief Scenes Cluster AddSceneResponse Command callback
1405 bool emberAfScenesClusterAddSceneResponseCallback(uint8_t status, uint16_t groupId, uint8_t sceneId);
1408 * @brief Scenes Cluster GetSceneMembershipResponse Command callback
1416 bool emberAfScenesClusterGetSceneMembershipResponseCallback(uint8_t status, uint8_t capacity, uint16_t groupId, uint8_t sceneCount,
1417 /* TYPE WARNING: array array defaults to */ uint8_t * sceneList);
1420 * @brief Scenes Cluster RemoveAllScenesResponse Command callback
1425 bool emberAfScenesClusterRemoveAllScenesResponseCallback(uint8_t status, uint16_t groupId);
1428 * @brief Scenes Cluster RemoveSceneResponse Command callback
1434 bool emberAfScenesClusterRemoveSceneResponseCallback(uint8_t status, uint16_t groupId, uint8_t sceneId);
1437 * @brief Scenes Cluster StoreSceneResponse Command callback
1443 bool emberAfScenesClusterStoreSceneResponseCallback(uint8_t status, uint16_t groupId, uint8_t sceneId);
1446 * @brief Scenes Cluster ViewSceneResponse Command callback
1450 * @param transitionTime
1452 * @param extensionFieldSets
1455 bool emberAfScenesClusterViewSceneResponseCallback(uint8_t status, uint16_t groupId, uint8_t sceneId, uint16_t transitionTime,
1456 uint8_t * sceneName,
1457 /* TYPE WARNING: array array defaults to */ uint8_t * extensionFieldSets);
1460 // Non-Cluster Related Callbacks
1463 /** @brief Add To Current App Tasks
1465 * This function is only useful to sleepy end devices. This function will note
1466 * the passed item as part of a set of tasks the application has outstanding
1467 * (e.g. message sent requiring APS acknwoledgement). This will affect how the
1468 * application behaves with regard to sleeping and polling. Until the
1469 * outstanding task is completed, the device may poll more frequently and sleep
1472 * @param tasks Ver.: always
1474 void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks);
1476 /** @brief Remove From Current App Tasks
1478 * This function is only useful to sleepy end devices. This function will
1479 * remove the passed item from the set of tasks the application has outstanding
1480 * (e.g. message sent requiring APS acknwoledgement). This will affect how the
1481 * application behaves with regard to sleeping and polling. Removing the item
1482 * from the list of outstanding tasks may allow the device to sleep longer and
1483 * poll less frequently. If there are other outstanding tasks the system may
1484 * still have to stay away and poll more often.
1486 * @param tasks Ver.: always
1488 void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks);
1490 /** @brief Allow Network Write Attribute
1492 * This function is called by the application framework before it writes an
1493 * attribute in response to a write attribute request from an external device.
1494 * The value passed into this callback is the value to which the attribute is to
1495 * be set by the framework.
1496 Example: In mirroring simple metering data
1497 * on an Energy Services Interface (ESI) (formerly called Energy Service Portal
1498 * (ESP) in SE 1.0).), a mirrored simple meter needs to write read-only
1499 * attributes on its mirror. The-meter-mirror sample application, located in
1500 * app/framework/sample-apps, uses this callback to allow the mirrored device to
1501 * write simple metering attributes on the mirror regardless of the fact that
1502 * most simple metering attributes are defined as read-only by the ZigBee
1504 Note: The ZCL specification does not (as of this
1505 * writing) specify any permission-level security for writing writeable
1506 * attributes. As far as the ZCL specification is concerned, if an attribute is
1507 * writeable, any device that has a link key for the device should be able to
1508 * write that attribute. Furthermore if an attribute is read only, it should not
1509 * be written over the air. Thus, if you implement permissions for writing
1510 * attributes as a feature, you MAY be operating outside the specification. This
1511 * is unlikely to be a problem for writing read-only attributes, but it may be a
1512 * problem for attributes that are writeable according to the specification but
1513 * restricted by the application implementing this callback.
1515 * @param endpoint Ver.: always
1516 * @param clusterId Ver.: always
1517 * @param attributeId Ver.: always
1518 * @param mask Ver.: always
1519 * @param manufacturerCode Ver.: always
1520 * @param value Ver.: always
1521 * @param type Ver.: always
1523 EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
1524 chip::AttributeId attributeId, uint8_t mask,
1525 uint16_t manufacturerCode, uint8_t * value, uint8_t type);
1527 /** @brief Attribute Read Access
1529 * This function is called whenever the Application Framework needs to check
1530 * access permission for an attribute read.
1532 * @param endpoint Ver.: always
1533 * @param clusterId Ver.: always
1534 * @param manufacturerCode Ver.: always
1535 * @param attributeId Ver.: always
1537 bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode,
1538 chip::AttributeId attributeId);
1540 /** @brief Attribute Write Access
1542 * This function is called whenever the Application Framework needs to check
1543 * access permission for an attribute write.
1545 * @param endpoint Ver.: always
1546 * @param clusterId Ver.: always
1547 * @param manufacturerCode Ver.: always
1548 * @param attributeId Ver.: always
1550 bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode,
1551 chip::AttributeId attributeId);
1553 /** @brief Default Response
1555 * This function is called by the application framework when a Default Response
1556 * command is received from an external device. The application should return
1557 * true if the message was processed or false if it was not.
1559 * @param clusterId The cluster identifier of this response. Ver.: always
1560 * @param commandId The command identifier to which this is a response. Ver.:
1562 * @param status Specifies either SUCCESS or the nature of the error that was
1563 * detected in the received command. Ver.: always
1565 bool emberAfDefaultResponseCallback(chip::ClusterId clusterId, chip::CommandId commandId, EmberAfStatus status);
1567 /** @brief Configure Reporting Response
1569 * This function is called by the application framework when a Configure
1570 * Reporting Response command is received from an external device. The
1571 * application should return true if the message was processed or false if it
1574 * @param clusterId The cluster identifier of this response. Ver.: always
1575 * @param buffer Buffer containing the list of attribute status records. Ver.:
1577 * @param bufLen The length in bytes of the list. Ver.: always
1579 bool emberAfConfigureReportingResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1581 /** @brief Read Reporting Configuration Response
1583 * This function is called by the application framework when a Read Reporting
1584 * Configuration Response command is received from an external device. The
1585 * application should return true if the message was processed or false if it
1588 * @param clusterId The cluster identifier of this response. Ver.: always
1589 * @param buffer Buffer containing the list of attribute reporting configuration
1590 * records. Ver.: always
1591 * @param bufLen The length in bytes of the list. Ver.: always
1593 bool emberAfReadReportingConfigurationResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1595 /** @brief Discover Attributes Response
1597 * This function is called by the application framework when a Discover
1598 * Attributes Response or Discover Attributes Extended Response command is
1599 * received from an external device. The Discover Attributes Response command
1600 * contains a bool indicating if discovery is complete and a list of zero or
1601 * more attribute identifier/type records. The final argument indicates whether
1602 * the response is in the extended format or not. The application should return
1603 * true if the message was processed or false if it was not.
1605 * @param clusterId The cluster identifier of this response. Ver.: always
1606 * @param discoveryComplete Indicates whether there are more attributes to be
1607 * discovered. true if there are no more attributes to be discovered. Ver.:
1609 * @param buffer Buffer containing the list of attribute identifier/type
1610 * records. Ver.: always
1611 * @param bufLen The length in bytes of the list. Ver.: always
1612 * @param extended Indicates whether the response is in the extended format or
1615 bool emberAfDiscoverAttributesResponseCallback(chip::ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, uint16_t bufLen,
1618 /** @brief Discover Commands Generated Response
1620 * This function is called by the framework when Discover Commands Generated
1621 * Response is received.
1623 * @param clusterId The cluster identifier of this response. Ver.: always
1624 * @param manufacturerCode Manufacturer code Ver.: always
1625 * @param discoveryComplete Indicates whether there are more commands to be
1626 * discovered. Ver.: always
1627 * @param commandIds Buffer containing the list of command identifiers. Ver.:
1629 * @param commandIdCount The length of bytes of the list, whish is the same as
1630 * the number of identifiers. Ver.: always
1632 bool emberAfDiscoverCommandsGeneratedResponseCallback(chip::ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete,
1633 chip::CommandId * commandIds, uint16_t commandIdCount);
1635 /** @brief Discover Commands Received Response
1637 * This function is called by the framework when Discover Commands Received
1638 * Response is received.
1640 * @param clusterId The cluster identifier of this response. Ver.: always
1641 * @param manufacturerCode Manufacturer code Ver.: always
1642 * @param discoveryComplete Indicates whether there are more commands to be
1643 * discovered. Ver.: always
1644 * @param commandIds Buffer containing the list of command identifiers. Ver.:
1646 * @param commandIdCount The length of bytes of the list, whish is the same as
1647 * the number of identifiers. Ver.: always
1649 bool emberAfDiscoverCommandsReceivedResponseCallback(chip::ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete,
1650 chip::CommandId * commandIds, uint16_t commandIdCount);
1652 /** @brief Pre Command Received
1654 * This callback is the second in the Application Framework's message processing
1655 * chain. At this point in the processing of incoming over-the-air messages, the
1656 * application has determined that the incoming message is a ZCL command. It
1657 * parses enough of the message to populate an EmberAfClusterCommand struct. The
1658 * Application Framework defines this struct value in a local scope to the
1659 * command processing but also makes it available through a global pointer
1660 * called emberAfCurrentCommand, in app/framework/util/util.c. When command
1661 * processing is complete, this pointer is cleared.
1663 * @param cmd Ver.: always
1665 bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd);
1667 /** @brief Pre Message Send
1669 * This function is called by the framework when it is about to pass a message
1670 * to the stack primitives for sending. This message may or may not be ZCL,
1671 * ZDO, or some other protocol. This is called prior to
1673 * fragmentation that may be done. If the function returns true it is assumed
1674 * the callback has consumed and processed the message. The callback must also
1675 * set the EmberStatus status code to be passed back to the caller. The
1676 * framework will do no further processing on the message.
1678 * function returns false then it is assumed that the callback has not processed
1679 * the mesasge and the framework will continue to process accordingly.
1681 * @param messageStruct The structure containing the parameters of the APS
1682 * message to be sent. Ver.: always
1683 * @param status A pointer to the status code value that will be returned to the
1684 * caller. Ver.: always
1686 bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status);
1688 /** @brief Message Sent
1690 * This function is called by the application framework from the message sent
1691 * handler, when it is informed by the stack regarding the message sent status.
1692 * All of the values passed to the emberMessageSentHandler are passed on to this
1693 * callback. This provides an opportunity for the application to verify that its
1694 * message has been sent successfully and take the appropriate action. This
1695 * callback should return a bool value of true or false. A value of true
1696 * indicates that the message sent notification has been handled and should not
1697 * be handled by the application framework.
1699 * @param type Ver.: always
1700 * @param indexOrDestination Ver.: always
1701 * @param apsFrame Ver.: always
1702 * @param msgLen Ver.: always
1703 * @param message Ver.: always
1704 * @param status Ver.: always
1706 bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame,
1707 uint16_t msgLen, uint8_t * message, EmberStatus status);
1709 /** @brief Pre Attribute Change
1711 * This function is called by the application framework before it changes an
1712 * attribute value. The value passed into this callback is the value to which
1713 * the attribute is to be set by the framework. The application should return
1714 * ::EMBER_ZCL_STATUS_SUCCESS to permit the change or any other ::EmberAfStatus
1717 * @param endpoint Ver.: always
1718 * @param clusterId Ver.: always
1719 * @param attributeId Ver.: always
1720 * @param mask Ver.: always
1721 * @param manufacturerCode Ver.: always
1722 * @param type Ver.: always
1723 * @param size Ver.: always
1724 * @param value Ver.: always
1726 EmberAfStatus emberAfPreAttributeChangeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId,
1727 uint8_t mask, uint16_t manufacturerCode, uint8_t type, uint8_t size,
1730 /** @brief Post Attribute Change
1732 * This function is called by the application framework after it changes an
1733 * attribute value. The value passed into this callback is the value to which
1734 * the attribute was set by the framework.
1736 * @param endpoint Ver.: always
1737 * @param clusterId Ver.: always
1738 * @param attributeId Ver.: always
1739 * @param mask Ver.: always
1740 * @param manufacturerCode Ver.: always
1741 * @param type Ver.: always
1742 * @param size Ver.: always
1743 * @param value Ver.: always
1745 void emberAfPostAttributeChangeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId,
1746 uint8_t mask, uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value);
1748 /** @brief Read Attributes Response
1750 * This function is called by the application framework when a Read Attributes
1751 * Response command is received from an external device. The application should
1752 * return true if the message was processed or false if it was not.
1754 * @param clusterId The cluster identifier of this response. Ver.: always
1755 * @param buffer Buffer containing the list of read attribute status records.
1757 * @param bufLen The length in bytes of the list. Ver.: always
1759 bool emberAfReadAttributesResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1761 /** @brief External Attribute Read
1763 * Like emberAfExternalAttributeWriteCallback above, this function is called
1764 * when the framework needs to read an attribute that is not stored within the
1765 * Application Framework's data structures.
1766 All of the important
1767 * information about the attribute itself is passed as a pointer to an
1768 * EmberAfAttributeMetadata struct, which is stored within the application and
1769 * used to manage the attribute. A complete description of the
1770 * EmberAfAttributeMetadata struct is provided in
1771 * app/framework/include/af-types.h
1772 This function assumes that the
1773 * application is able to read the attribute, write it into the passed buffer,
1774 * and return immediately. Any attributes that require a state machine for
1775 * reading and writing are not really candidates for externalization at the
1776 * present time. The Application Framework does not currently include a state
1777 * machine for reading or writing attributes that must take place across a
1778 * series of application ticks. Attributes that cannot be read in a timely
1779 * manner should be stored within the Application Framework and updated
1780 * occasionally by the application code from within the
1781 * emberAfMainTickCallback.
1782 If the application was successfully able to
1783 * read the attribute and write it into the passed buffer, it should return a
1784 * value of EMBER_ZCL_STATUS_SUCCESS. Ensure that the size of the externally
1785 * managed attribute value is smaller than what the buffer can hold. In the case
1786 * of a buffer overflow throw an appropriate error such as
1787 * EMBER_ZCL_STATUS_INSUFFICIENT_SPACE. Any other return value indicates the
1788 * application was not able to read the attribute.
1790 * @param endpoint Ver.: always
1791 * @param clusterId Ver.: always
1792 * @param attributeMetadata Ver.: always
1793 * @param manufacturerCode Ver.: always
1794 * @param buffer Ver.: always
1795 * @param maxReadLength Ver.: always
1797 EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
1798 EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode,
1799 uint8_t * buffer, uint16_t maxReadLength);
1801 /** @brief Write Attributes Response
1803 * This function is called by the application framework when a Write Attributes
1804 * Response command is received from an external device. The application should
1805 * return true if the message was processed or false if it was not.
1807 * @param clusterId The cluster identifier of this response. Ver.: always
1808 * @param buffer Buffer containing the list of write attribute status records.
1810 * @param bufLen The length in bytes of the list. Ver.: always
1812 bool emberAfWriteAttributesResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1814 /** @brief External Attribute Write
1816 * This function is called whenever the Application Framework needs to write an
1817 * attribute which is not stored within the data structures of the Application
1818 * Framework itself. One of the new features in Version 2 is the ability to
1819 * store attributes outside the Framework. This is particularly useful for
1820 * attributes that do not need to be stored because they can be read off the
1821 * hardware when they are needed, or are stored in some central location used by
1822 * many modules within the system. In this case, you can indicate that the
1823 * attribute is stored externally. When the framework needs to write an external
1824 * attribute, it makes a call to this callback.
1825 This callback is very
1826 * useful for host micros which need to store attributes in persistent memory.
1827 * Because each host micro (used with an Ember NCP) has its own type of
1828 * persistent memory storage, the Application Framework does not include the
1829 * ability to mark attributes as stored in flash the way that it does for Ember
1830 * SoCs like the EM35x. On a host micro, any attributes that need to be stored
1831 * in persistent memory should be marked as external and accessed through the
1832 * external read and write callbacks. Any host code associated with the
1833 * persistent storage should be implemented within this callback.
1835 * the important information about the attribute itself is passed as a pointer
1836 * to an EmberAfAttributeMetadata struct, which is stored within the application
1837 * and used to manage the attribute. A complete description of the
1838 * EmberAfAttributeMetadata struct is provided in
1839 * app/framework/include/af-types.h.
1840 This function assumes that the
1841 * application is able to write the attribute and return immediately. Any
1842 * attributes that require a state machine for reading and writing are not
1843 * candidates for externalization at the present time. The Application Framework
1844 * does not currently include a state machine for reading or writing attributes
1845 * that must take place across a series of application ticks. Attributes that
1846 * cannot be written immediately should be stored within the Application
1847 * Framework and updated occasionally by the application code from within the
1848 * emberAfMainTickCallback.
1849 If the application was successfully able to
1850 * write the attribute, it returns a value of EMBER_ZCL_STATUS_SUCCESS. Any
1851 * other return value indicates the application was not able to write the
1854 * @param endpoint Ver.: always
1855 * @param clusterId Ver.: always
1856 * @param attributeMetadata Ver.: always
1857 * @param manufacturerCode Ver.: always
1858 * @param buffer Ver.: always
1860 EmberAfStatus emberAfExternalAttributeWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
1861 EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode,
1864 /** @brief Report Attributes
1866 * This function is called by the application framework when a Report Attributes
1867 * command is received from an external device. The application should return
1868 * true if the message was processed or false if it was not.
1870 * @param clusterId The cluster identifier of this command. Ver.: always
1871 * @param buffer Buffer containing the list of attribute report records. Ver.:
1873 * @param bufLen The length in bytes of the list. Ver.: always
1875 bool emberAfReportAttributesCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1877 /** @brief Get Current Time
1879 * This callback is called when device attempts to get current time from the
1880 * hardware. If this device has means to retrieve exact time, then this method
1881 * should implement it. If the callback can't provide the exact time it should
1882 * return 0 to indicate failure. Default action is to return 0, which indicates
1883 * that device does not have access to real time.
1886 uint32_t emberAfGetCurrentTimeCallback();
1888 /** @brief Get Endpoint Info
1890 * This function is a callback to an application implemented endpoint that
1891 * operates outside the normal application framework. When the framework wishes
1892 * to perform operations with that endpoint it uses this callback to retrieve
1893 * the endpoint's information. If the endpoint exists and the application can
1894 * provide data then true shall be returned. Otherwise the callback must return
1897 * @param endpoint The endpoint to retrieve data for. Ver.: always
1898 * @param returnNetworkIndex The index corresponding to the ZigBee network the
1899 * endpoint belongs to. If not using a multi-network device, 0 must be
1900 * returned. Otherwise on a multi-network device the stack will switch to this
1901 * network before sending the message. Ver.: always
1902 * @param returnEndpointInfo A pointer to a data struct that will be written
1903 * with information about the endpoint. Ver.: always
1905 bool emberAfGetEndpointInfoCallback(chip::EndpointId endpoint, uint8_t * returnNetworkIndex,
1906 EmberAfEndpointInfoStruct * returnEndpointInfo);
1908 /** @brief Get Source Route Overhead
1910 * This function is called by the framework to determine the overhead required
1911 * in the network frame for source routing to a particular destination.
1913 * @param destination The node id of the destination Ver.: always
1915 uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination);
1917 /** @brief Registration Abort
1919 * This callback is called when the device should abort the registration
1923 void emberAfRegistrationAbortCallback();
1925 /** @brief Interpan Send Message
1927 * This function will send a raw MAC message with interpan frame format using
1928 * the passed parameters.
1930 * @param header Interpan header info Ver.: always
1931 * @param messageLength The length of the message received or to send Ver.:
1933 * @param message The message data received or to send. Ver.: always
1935 EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message);
1937 /** @brief Start Move
1939 * This function is called to initiate the process for a device to move (rejoin)
1943 bool emberAfStartMoveCallback();