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 /** @brief Cluster Init
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.
33 * @param endpoint Ver.: always
34 * @param clusterId Ver.: always
36 void emberAfClusterInitCallback(chip::EndpointId endpoint, chip::ClusterId clusterId);
38 // Cluster Init Functions
40 /** @brief Barrier Control Cluster Init
44 * @param endpoint Endpoint that is being initialized
46 void emberAfBarrierControlClusterInitCallback(chip::EndpointId endpoint);
48 /** @brief Basic Cluster Init
52 * @param endpoint Endpoint that is being initialized
54 void emberAfBasicClusterInitCallback(chip::EndpointId endpoint);
56 /** @brief Binding Cluster Init
60 * @param endpoint Endpoint that is being initialized
62 void emberAfBindingClusterInitCallback(chip::EndpointId endpoint);
64 /** @brief Color Control Cluster Init
68 * @param endpoint Endpoint that is being initialized
70 void emberAfColorControlClusterInitCallback(chip::EndpointId endpoint);
72 /** @brief Door Lock Cluster Init
76 * @param endpoint Endpoint that is being initialized
78 void emberAfDoorLockClusterInitCallback(chip::EndpointId endpoint);
80 /** @brief Groups Cluster Init
84 * @param endpoint Endpoint that is being initialized
86 void emberAfGroupsClusterInitCallback(chip::EndpointId endpoint);
88 /** @brief Identify Cluster Init
92 * @param endpoint Endpoint that is being initialized
94 void emberAfIdentifyClusterInitCallback(chip::EndpointId endpoint);
96 /** @brief Level Control Cluster Init
100 * @param endpoint Endpoint that is being initialized
102 void emberAfLevelControlClusterInitCallback(chip::EndpointId endpoint);
104 /** @brief On/off Cluster Init
108 * @param endpoint Endpoint that is being initialized
110 void emberAfOnOffClusterInitCallback(chip::EndpointId endpoint);
112 /** @brief Scenes Cluster Init
116 * @param endpoint Endpoint that is being initialized
118 void emberAfScenesClusterInitCallback(chip::EndpointId endpoint);
120 /** @brief Temperature Measurement Cluster Init
124 * @param endpoint Endpoint that is being initialized
126 void emberAfTemperatureMeasurementClusterInitCallback(chip::EndpointId endpoint);
128 // Cluster Server/Client Init Functions
131 // Barrier Control Cluster client
134 /** @brief Barrier Control Cluster Client Init
138 * @param endpoint Endpoint that is being initialized
140 void emberAfBarrierControlClusterClientInitCallback(chip::EndpointId endpoint);
142 /** @brief Barrier Control Cluster Client Attribute Changed
144 * Client Attribute Changed
146 * @param endpoint Endpoint that is being initialized
147 * @param attributeId Attribute that changed
149 void emberAfBarrierControlClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
151 /** @brief Barrier Control Cluster Client Manufacturer Specific Attribute Changed
153 * Client Manufacturer Specific Attribute Changed
155 * @param endpoint Endpoint that is being initialized
156 * @param attributeId Attribute that changed
157 * @param manufacturerCode Manufacturer Code of the attribute that changed
159 void emberAfBarrierControlClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
160 chip::AttributeId attributeId,
161 uint16_t manufacturerCode);
163 /** @brief Barrier Control Cluster Client Message Sent
165 * Client Message Sent
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
174 void emberAfBarrierControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
175 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
178 /** @brief Barrier Control Cluster Client Pre Attribute Changed
180 * client Pre Attribute Changed
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
188 EmberAfStatus emberAfBarrierControlClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint,
189 chip::AttributeId attributeId,
190 EmberAfAttributeType attributeType, uint8_t size,
193 /** @brief Barrier Control Cluster Client Tick
197 * @param endpoint Endpoint that is being served
199 void emberAfBarrierControlClusterClientTickCallback(chip::EndpointId endpoint);
202 // Basic Cluster client
205 /** @brief Basic Cluster Client Init
209 * @param endpoint Endpoint that is being initialized
211 void emberAfBasicClusterClientInitCallback(chip::EndpointId endpoint);
213 /** @brief Basic Cluster Client Attribute Changed
215 * Client Attribute Changed
217 * @param endpoint Endpoint that is being initialized
218 * @param attributeId Attribute that changed
220 void emberAfBasicClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
222 /** @brief Basic Cluster Client Manufacturer Specific Attribute Changed
224 * Client Manufacturer Specific Attribute Changed
226 * @param endpoint Endpoint that is being initialized
227 * @param attributeId Attribute that changed
228 * @param manufacturerCode Manufacturer Code of the attribute that changed
230 void emberAfBasicClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
231 uint16_t manufacturerCode);
233 /** @brief Basic Cluster Client Message Sent
235 * Client Message Sent
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
244 void emberAfBasicClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
245 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status);
247 /** @brief Basic Cluster Client Pre Attribute Changed
249 * client Pre Attribute Changed
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
257 EmberAfStatus emberAfBasicClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
258 EmberAfAttributeType attributeType, uint8_t size,
261 /** @brief Basic Cluster Client Tick
265 * @param endpoint Endpoint that is being served
267 void emberAfBasicClusterClientTickCallback(chip::EndpointId endpoint);
270 // Binding Cluster client
273 /** @brief Binding Cluster Client Init
277 * @param endpoint Endpoint that is being initialized
279 void emberAfBindingClusterClientInitCallback(chip::EndpointId endpoint);
281 /** @brief Binding Cluster Client Attribute Changed
283 * Client Attribute Changed
285 * @param endpoint Endpoint that is being initialized
286 * @param attributeId Attribute that changed
288 void emberAfBindingClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
290 /** @brief Binding Cluster Client Manufacturer Specific Attribute Changed
292 * Client Manufacturer Specific Attribute Changed
294 * @param endpoint Endpoint that is being initialized
295 * @param attributeId Attribute that changed
296 * @param manufacturerCode Manufacturer Code of the attribute that changed
298 void emberAfBindingClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
299 chip::AttributeId attributeId,
300 uint16_t manufacturerCode);
302 /** @brief Binding Cluster Client Message Sent
304 * Client Message Sent
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
313 void emberAfBindingClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
314 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
317 /** @brief Binding Cluster Client Pre Attribute Changed
319 * client Pre Attribute Changed
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
327 EmberAfStatus emberAfBindingClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
328 EmberAfAttributeType attributeType, uint8_t size,
331 /** @brief Binding Cluster Client Tick
335 * @param endpoint Endpoint that is being served
337 void emberAfBindingClusterClientTickCallback(chip::EndpointId endpoint);
340 // Color Control Cluster client
343 /** @brief Color Control Cluster Client Init
347 * @param endpoint Endpoint that is being initialized
349 void emberAfColorControlClusterClientInitCallback(chip::EndpointId endpoint);
351 /** @brief Color Control Cluster Client Attribute Changed
353 * Client Attribute Changed
355 * @param endpoint Endpoint that is being initialized
356 * @param attributeId Attribute that changed
358 void emberAfColorControlClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
360 /** @brief Color Control Cluster Client Manufacturer Specific Attribute Changed
362 * Client Manufacturer Specific Attribute Changed
364 * @param endpoint Endpoint that is being initialized
365 * @param attributeId Attribute that changed
366 * @param manufacturerCode Manufacturer Code of the attribute that changed
368 void emberAfColorControlClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
369 chip::AttributeId attributeId,
370 uint16_t manufacturerCode);
372 /** @brief Color Control Cluster Client Message Sent
374 * Client Message Sent
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
383 void emberAfColorControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
384 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
387 /** @brief Color Control Cluster Client Pre Attribute Changed
389 * client Pre Attribute Changed
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
397 EmberAfStatus emberAfColorControlClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
398 EmberAfAttributeType attributeType, uint8_t size,
401 /** @brief Color Control Cluster Client Tick
405 * @param endpoint Endpoint that is being served
407 void emberAfColorControlClusterClientTickCallback(chip::EndpointId endpoint);
410 // Door Lock Cluster client
413 /** @brief Door Lock Cluster Client Init
417 * @param endpoint Endpoint that is being initialized
419 void emberAfDoorLockClusterClientInitCallback(chip::EndpointId endpoint);
421 /** @brief Door Lock Cluster Client Attribute Changed
423 * Client Attribute Changed
425 * @param endpoint Endpoint that is being initialized
426 * @param attributeId Attribute that changed
428 void emberAfDoorLockClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
430 /** @brief Door Lock Cluster Client Manufacturer Specific Attribute Changed
432 * Client Manufacturer Specific Attribute Changed
434 * @param endpoint Endpoint that is being initialized
435 * @param attributeId Attribute that changed
436 * @param manufacturerCode Manufacturer Code of the attribute that changed
438 void emberAfDoorLockClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
439 chip::AttributeId attributeId,
440 uint16_t manufacturerCode);
442 /** @brief Door Lock Cluster Client Message Sent
444 * Client Message Sent
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
453 void emberAfDoorLockClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
454 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
457 /** @brief Door Lock Cluster Client Pre Attribute Changed
459 * client Pre Attribute Changed
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
467 EmberAfStatus emberAfDoorLockClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
468 EmberAfAttributeType attributeType, uint8_t size,
471 /** @brief Door Lock Cluster Client Tick
475 * @param endpoint Endpoint that is being served
477 void emberAfDoorLockClusterClientTickCallback(chip::EndpointId endpoint);
480 // Groups Cluster client
483 /** @brief Groups Cluster Client Init
487 * @param endpoint Endpoint that is being initialized
489 void emberAfGroupsClusterClientInitCallback(chip::EndpointId endpoint);
491 /** @brief Groups Cluster Client Attribute Changed
493 * Client Attribute Changed
495 * @param endpoint Endpoint that is being initialized
496 * @param attributeId Attribute that changed
498 void emberAfGroupsClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
500 /** @brief Groups Cluster Client Manufacturer Specific Attribute Changed
502 * Client Manufacturer Specific Attribute Changed
504 * @param endpoint Endpoint that is being initialized
505 * @param attributeId Attribute that changed
506 * @param manufacturerCode Manufacturer Code of the attribute that changed
508 void emberAfGroupsClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
509 chip::AttributeId attributeId,
510 uint16_t manufacturerCode);
512 /** @brief Groups Cluster Client Message Sent
514 * Client Message Sent
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
523 void emberAfGroupsClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
524 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
527 /** @brief Groups Cluster Client Pre Attribute Changed
529 * client Pre Attribute Changed
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
537 EmberAfStatus emberAfGroupsClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
538 EmberAfAttributeType attributeType, uint8_t size,
541 /** @brief Groups Cluster Client Tick
545 * @param endpoint Endpoint that is being served
547 void emberAfGroupsClusterClientTickCallback(chip::EndpointId endpoint);
550 // Identify Cluster client
553 /** @brief Identify Cluster Client Init
557 * @param endpoint Endpoint that is being initialized
559 void emberAfIdentifyClusterClientInitCallback(chip::EndpointId endpoint);
561 /** @brief Identify Cluster Client Attribute Changed
563 * Client Attribute Changed
565 * @param endpoint Endpoint that is being initialized
566 * @param attributeId Attribute that changed
568 void emberAfIdentifyClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
570 /** @brief Identify Cluster Client Manufacturer Specific Attribute Changed
572 * Client Manufacturer Specific Attribute Changed
574 * @param endpoint Endpoint that is being initialized
575 * @param attributeId Attribute that changed
576 * @param manufacturerCode Manufacturer Code of the attribute that changed
578 void emberAfIdentifyClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
579 chip::AttributeId attributeId,
580 uint16_t manufacturerCode);
582 /** @brief Identify Cluster Client Message Sent
584 * Client Message Sent
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
593 void emberAfIdentifyClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
594 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
597 /** @brief Identify Cluster Client Pre Attribute Changed
599 * client Pre Attribute Changed
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
607 EmberAfStatus emberAfIdentifyClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
608 EmberAfAttributeType attributeType, uint8_t size,
611 /** @brief Identify Cluster Client Tick
615 * @param endpoint Endpoint that is being served
617 void emberAfIdentifyClusterClientTickCallback(chip::EndpointId endpoint);
620 // Level Control Cluster client
623 /** @brief Level Control Cluster Client Init
627 * @param endpoint Endpoint that is being initialized
629 void emberAfLevelControlClusterClientInitCallback(chip::EndpointId endpoint);
631 /** @brief Level Control Cluster Client Attribute Changed
633 * Client Attribute Changed
635 * @param endpoint Endpoint that is being initialized
636 * @param attributeId Attribute that changed
638 void emberAfLevelControlClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
640 /** @brief Level Control Cluster Client Manufacturer Specific Attribute Changed
642 * Client Manufacturer Specific Attribute Changed
644 * @param endpoint Endpoint that is being initialized
645 * @param attributeId Attribute that changed
646 * @param manufacturerCode Manufacturer Code of the attribute that changed
648 void emberAfLevelControlClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
649 chip::AttributeId attributeId,
650 uint16_t manufacturerCode);
652 /** @brief Level Control Cluster Client Message Sent
654 * Client Message Sent
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
663 void emberAfLevelControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
664 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
667 /** @brief Level Control Cluster Client Pre Attribute Changed
669 * client Pre Attribute Changed
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
677 EmberAfStatus emberAfLevelControlClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
678 EmberAfAttributeType attributeType, uint8_t size,
681 /** @brief Level Control Cluster Client Tick
685 * @param endpoint Endpoint that is being served
687 void emberAfLevelControlClusterClientTickCallback(chip::EndpointId endpoint);
690 // On/off Cluster client
693 /** @brief On/off Cluster Client Init
697 * @param endpoint Endpoint that is being initialized
699 void emberAfOnOffClusterClientInitCallback(chip::EndpointId endpoint);
701 /** @brief On/off Cluster Client Attribute Changed
703 * Client Attribute Changed
705 * @param endpoint Endpoint that is being initialized
706 * @param attributeId Attribute that changed
708 void emberAfOnOffClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
710 /** @brief On/off Cluster Client Manufacturer Specific Attribute Changed
712 * Client Manufacturer Specific Attribute Changed
714 * @param endpoint Endpoint that is being initialized
715 * @param attributeId Attribute that changed
716 * @param manufacturerCode Manufacturer Code of the attribute that changed
718 void emberAfOnOffClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
719 uint16_t manufacturerCode);
721 /** @brief On/off Cluster Client Message Sent
723 * Client Message Sent
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
732 void emberAfOnOffClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
733 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status);
735 /** @brief On/off Cluster Client Pre Attribute Changed
737 * client Pre Attribute Changed
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
745 EmberAfStatus emberAfOnOffClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
746 EmberAfAttributeType attributeType, uint8_t size,
749 /** @brief On/off Cluster Client Tick
753 * @param endpoint Endpoint that is being served
755 void emberAfOnOffClusterClientTickCallback(chip::EndpointId endpoint);
758 // Scenes Cluster client
761 /** @brief Scenes Cluster Client Init
765 * @param endpoint Endpoint that is being initialized
767 void emberAfScenesClusterClientInitCallback(chip::EndpointId endpoint);
769 /** @brief Scenes Cluster Client Attribute Changed
771 * Client Attribute Changed
773 * @param endpoint Endpoint that is being initialized
774 * @param attributeId Attribute that changed
776 void emberAfScenesClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
778 /** @brief Scenes Cluster Client Manufacturer Specific Attribute Changed
780 * Client Manufacturer Specific Attribute Changed
782 * @param endpoint Endpoint that is being initialized
783 * @param attributeId Attribute that changed
784 * @param manufacturerCode Manufacturer Code of the attribute that changed
786 void emberAfScenesClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
787 chip::AttributeId attributeId,
788 uint16_t manufacturerCode);
790 /** @brief Scenes Cluster Client Message Sent
792 * Client Message Sent
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
801 void emberAfScenesClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
802 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
805 /** @brief Scenes Cluster Client Pre Attribute Changed
807 * client Pre Attribute Changed
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
815 EmberAfStatus emberAfScenesClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId,
816 EmberAfAttributeType attributeType, uint8_t size,
819 /** @brief Scenes Cluster Client Tick
823 * @param endpoint Endpoint that is being served
825 void emberAfScenesClusterClientTickCallback(chip::EndpointId endpoint);
828 // Temperature Measurement Cluster client
831 /** @brief Temperature Measurement Cluster Client Init
835 * @param endpoint Endpoint that is being initialized
837 void emberAfTemperatureMeasurementClusterClientInitCallback(chip::EndpointId endpoint);
839 /** @brief Temperature Measurement Cluster Client Attribute Changed
841 * Client Attribute Changed
843 * @param endpoint Endpoint that is being initialized
844 * @param attributeId Attribute that changed
846 void emberAfTemperatureMeasurementClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
848 /** @brief Temperature Measurement Cluster Client Manufacturer Specific Attribute Changed
850 * Client Manufacturer Specific Attribute Changed
852 * @param endpoint Endpoint that is being initialized
853 * @param attributeId Attribute that changed
854 * @param manufacturerCode Manufacturer Code of the attribute that changed
856 void emberAfTemperatureMeasurementClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
857 chip::AttributeId attributeId,
858 uint16_t manufacturerCode);
860 /** @brief Temperature Measurement Cluster Client Message Sent
862 * Client Message Sent
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
871 void emberAfTemperatureMeasurementClusterClientMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination,
872 EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
875 /** @brief Temperature Measurement Cluster Client Pre Attribute Changed
877 * client Pre Attribute Changed
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
885 EmberAfStatus emberAfTemperatureMeasurementClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint,
886 chip::AttributeId attributeId,
887 EmberAfAttributeType attributeType,
888 uint8_t size, uint8_t * value);
890 /** @brief Temperature Measurement Cluster Client Tick
894 * @param endpoint Endpoint that is being served
896 void emberAfTemperatureMeasurementClusterClientTickCallback(chip::EndpointId endpoint);
898 // Cluster Commands Callback
901 * @brief Door Lock Cluster ClearAllPinsResponse Command callback
905 bool emberAfDoorLockClusterClearAllPinsResponseCallback(uint8_t status);
908 * @brief Door Lock Cluster ClearAllRfidsResponse Command callback
912 bool emberAfDoorLockClusterClearAllRfidsResponseCallback(uint8_t status);
915 * @brief Door Lock Cluster ClearHolidayScheduleResponse Command callback
919 bool emberAfDoorLockClusterClearHolidayScheduleResponseCallback(uint8_t status);
922 * @brief Door Lock Cluster ClearPinResponse Command callback
926 bool emberAfDoorLockClusterClearPinResponseCallback(uint8_t status);
929 * @brief Door Lock Cluster ClearRfidResponse Command callback
933 bool emberAfDoorLockClusterClearRfidResponseCallback(uint8_t status);
936 * @brief Door Lock Cluster ClearWeekdayScheduleResponse Command callback
940 bool emberAfDoorLockClusterClearWeekdayScheduleResponseCallback(uint8_t status);
943 * @brief Door Lock Cluster ClearYeardayScheduleResponse Command callback
947 bool emberAfDoorLockClusterClearYeardayScheduleResponseCallback(uint8_t status);
950 * @brief Door Lock Cluster GetHolidayScheduleResponse Command callback
953 * @param localStartTime
954 * @param localEndTime
955 * @param operatingModeDuringHoliday
958 bool emberAfDoorLockClusterGetHolidayScheduleResponseCallback(uint8_t scheduleId, uint8_t status, uint32_t localStartTime,
959 uint32_t localEndTime, uint8_t operatingModeDuringHoliday);
962 * @brief Door Lock Cluster GetLogRecordResponse Command callback
967 * @param eventIdOrAlarmCode
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);
976 * @brief Door Lock Cluster GetPinResponse Command callback
983 bool emberAfDoorLockClusterGetPinResponseCallback(uint16_t userId, uint8_t userStatus, uint8_t userType, uint8_t * pin);
986 * @brief Door Lock Cluster GetRfidResponse Command callback
993 bool emberAfDoorLockClusterGetRfidResponseCallback(uint16_t userId, uint8_t userStatus, uint8_t userType, uint8_t * rfid);
996 * @brief Door Lock Cluster GetUserTypeResponse Command callback
1001 bool emberAfDoorLockClusterGetUserTypeResponseCallback(uint16_t userId, uint8_t userType);
1004 * @brief Door Lock Cluster GetWeekdayScheduleResponse Command callback
1010 * @param startMinute
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,
1020 * @brief Door Lock Cluster GetYeardayScheduleResponse Command callback
1024 * @param localStartTime
1025 * @param localEndTime
1028 bool emberAfDoorLockClusterGetYeardayScheduleResponseCallback(uint8_t scheduleId, uint16_t userId, uint8_t status,
1029 uint32_t localStartTime, uint32_t localEndTime);
1032 * @brief Door Lock Cluster LockDoorResponse Command callback
1036 bool emberAfDoorLockClusterLockDoorResponseCallback(uint8_t status);
1039 * @brief Door Lock Cluster SetHolidayScheduleResponse Command callback
1043 bool emberAfDoorLockClusterSetHolidayScheduleResponseCallback(uint8_t status);
1046 * @brief Door Lock Cluster SetPinResponse Command callback
1050 bool emberAfDoorLockClusterSetPinResponseCallback(uint8_t status);
1053 * @brief Door Lock Cluster SetRfidResponse Command callback
1057 bool emberAfDoorLockClusterSetRfidResponseCallback(uint8_t status);
1060 * @brief Door Lock Cluster SetUserTypeResponse Command callback
1064 bool emberAfDoorLockClusterSetUserTypeResponseCallback(uint8_t status);
1067 * @brief Door Lock Cluster SetWeekdayScheduleResponse Command callback
1071 bool emberAfDoorLockClusterSetWeekdayScheduleResponseCallback(uint8_t status);
1074 * @brief Door Lock Cluster SetYeardayScheduleResponse Command callback
1078 bool emberAfDoorLockClusterSetYeardayScheduleResponseCallback(uint8_t status);
1081 * @brief Door Lock Cluster UnlockDoorResponse Command callback
1085 bool emberAfDoorLockClusterUnlockDoorResponseCallback(uint8_t status);
1088 * @brief Door Lock Cluster UnlockWithTimeoutResponse Command callback
1092 bool emberAfDoorLockClusterUnlockWithTimeoutResponseCallback(uint8_t status);
1095 * @brief Groups Cluster AddGroupResponse Command callback
1100 bool emberAfGroupsClusterAddGroupResponseCallback(uint8_t status, uint16_t groupId);
1103 * @brief Groups Cluster GetGroupMembershipResponse Command callback
1109 bool emberAfGroupsClusterGetGroupMembershipResponseCallback(uint8_t capacity, uint8_t groupCount,
1110 /* TYPE WARNING: array array defaults to */ uint8_t * groupList);
1113 * @brief Groups Cluster RemoveGroupResponse Command callback
1118 bool emberAfGroupsClusterRemoveGroupResponseCallback(uint8_t status, uint16_t groupId);
1121 * @brief Groups Cluster ViewGroupResponse Command callback
1127 bool emberAfGroupsClusterViewGroupResponseCallback(uint8_t status, uint16_t groupId, uint8_t * groupName);
1130 * @brief Identify Cluster IdentifyQueryResponse Command callback
1134 bool emberAfIdentifyClusterIdentifyQueryResponseCallback(uint16_t timeout);
1137 * @brief Scenes Cluster AddSceneResponse Command callback
1143 bool emberAfScenesClusterAddSceneResponseCallback(uint8_t status, uint16_t groupId, uint8_t sceneId);
1146 * @brief Scenes Cluster GetSceneMembershipResponse Command callback
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);
1158 * @brief Scenes Cluster RemoveAllScenesResponse Command callback
1163 bool emberAfScenesClusterRemoveAllScenesResponseCallback(uint8_t status, uint16_t groupId);
1166 * @brief Scenes Cluster RemoveSceneResponse Command callback
1172 bool emberAfScenesClusterRemoveSceneResponseCallback(uint8_t status, uint16_t groupId, uint8_t sceneId);
1175 * @brief Scenes Cluster StoreSceneResponse Command callback
1181 bool emberAfScenesClusterStoreSceneResponseCallback(uint8_t status, uint16_t groupId, uint8_t sceneId);
1184 * @brief Scenes Cluster ViewSceneResponse Command callback
1188 * @param transitionTime
1190 * @param extensionFieldSets
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);
1198 // Non-Cluster Related Callbacks
1201 /** @brief Add To Current App Tasks
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
1210 * @param tasks Ver.: always
1212 void emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks);
1214 /** @brief Remove From Current App Tasks
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.
1224 * @param tasks Ver.: always
1226 void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks);
1228 /** @brief Allow Network Write Attribute
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
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.
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
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);
1265 /** @brief Attribute Read Access
1267 * This function is called whenever the Application Framework needs to check
1268 * access permission for an attribute read.
1270 * @param endpoint Ver.: always
1271 * @param clusterId Ver.: always
1272 * @param manufacturerCode Ver.: always
1273 * @param attributeId Ver.: always
1275 bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode,
1276 chip::AttributeId attributeId);
1278 /** @brief Attribute Write Access
1280 * This function is called whenever the Application Framework needs to check
1281 * access permission for an attribute write.
1283 * @param endpoint Ver.: always
1284 * @param clusterId Ver.: always
1285 * @param manufacturerCode Ver.: always
1286 * @param attributeId Ver.: always
1288 bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode,
1289 chip::AttributeId attributeId);
1291 /** @brief Default Response
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.
1297 * @param clusterId The cluster identifier of this response. Ver.: always
1298 * @param commandId The command identifier to which this is a response. Ver.:
1300 * @param status Specifies either SUCCESS or the nature of the error that was
1301 * detected in the received command. Ver.: always
1303 bool emberAfDefaultResponseCallback(chip::ClusterId clusterId, chip::CommandId commandId, EmberAfStatus status);
1305 /** @brief Configure Reporting Response
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
1312 * @param clusterId The cluster identifier of this response. Ver.: always
1313 * @param buffer Buffer containing the list of attribute status records. Ver.:
1315 * @param bufLen The length in bytes of the list. Ver.: always
1317 bool emberAfConfigureReportingResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1319 /** @brief Read Reporting Configuration Response
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
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
1331 bool emberAfReadReportingConfigurationResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1333 /** @brief Discover Attributes Response
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.
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.:
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
1353 bool emberAfDiscoverAttributesResponseCallback(chip::ClusterId clusterId, bool discoveryComplete, uint8_t * buffer, uint16_t bufLen,
1356 /** @brief Discover Commands Generated Response
1358 * This function is called by the framework when Discover Commands Generated
1359 * Response is received.
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.:
1367 * @param commandIdCount The length of bytes of the list, whish is the same as
1368 * the number of identifiers. Ver.: always
1370 bool emberAfDiscoverCommandsGeneratedResponseCallback(chip::ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete,
1371 chip::CommandId * commandIds, uint16_t commandIdCount);
1373 /** @brief Discover Commands Received Response
1375 * This function is called by the framework when Discover Commands Received
1376 * Response is received.
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.:
1384 * @param commandIdCount The length of bytes of the list, whish is the same as
1385 * the number of identifiers. Ver.: always
1387 bool emberAfDiscoverCommandsReceivedResponseCallback(chip::ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete,
1388 chip::CommandId * commandIds, uint16_t commandIdCount);
1390 /** @brief Pre Command Received
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.
1401 * @param cmd Ver.: always
1403 bool emberAfPreCommandReceivedCallback(EmberAfClusterCommand * cmd);
1405 /** @brief Pre Message Send
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
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.
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.
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
1424 bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status);
1426 /** @brief Message Sent
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.
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
1444 bool emberAfMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame,
1445 uint16_t msgLen, uint8_t * message, EmberStatus status);
1447 /** @brief Pre Attribute Change
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
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
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,
1468 /** @brief Post Attribute Change
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.
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
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);
1486 /** @brief Read Attributes Response
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.
1492 * @param clusterId The cluster identifier of this response. Ver.: always
1493 * @param buffer Buffer containing the list of read attribute status records.
1495 * @param bufLen The length in bytes of the list. Ver.: always
1497 bool emberAfReadAttributesResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1499 /** @brief External Attribute Read
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.
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
1535 EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
1536 EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode,
1537 uint8_t * buffer, uint16_t maxReadLength);
1539 /** @brief Write Attributes Response
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.
1545 * @param clusterId The cluster identifier of this response. Ver.: always
1546 * @param buffer Buffer containing the list of write attribute status records.
1548 * @param bufLen The length in bytes of the list. Ver.: always
1550 bool emberAfWriteAttributesResponseCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1552 /** @brief External Attribute Write
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.
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
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
1598 EmberAfStatus emberAfExternalAttributeWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
1599 EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode,
1602 /** @brief Report Attributes
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.
1608 * @param clusterId The cluster identifier of this command. Ver.: always
1609 * @param buffer Buffer containing the list of attribute report records. Ver.:
1611 * @param bufLen The length in bytes of the list. Ver.: always
1613 bool emberAfReportAttributesCallback(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);
1615 /** @brief Get Current Time
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.
1624 uint32_t emberAfGetCurrentTimeCallback();
1626 /** @brief Get Endpoint Info
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
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
1643 bool emberAfGetEndpointInfoCallback(chip::EndpointId endpoint, uint8_t * returnNetworkIndex,
1644 EmberAfEndpointInfoStruct * returnEndpointInfo);
1646 /** @brief Get Source Route Overhead
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.
1651 * @param destination The node id of the destination Ver.: always
1653 uint8_t emberAfGetSourceRouteOverheadCallback(chip::NodeId destination);
1655 /** @brief Registration Abort
1657 * This callback is called when the device should abort the registration
1661 void emberAfRegistrationAbortCallback();
1663 /** @brief Interpan Send Message
1665 * This function will send a raw MAC message with interpan frame format using
1666 * the passed parameters.
1668 * @param header Interpan header info Ver.: always
1669 * @param messageLength The length of the message received or to send Ver.:
1671 * @param message The message data received or to send. Ver.: always
1673 EmberStatus emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message);
1675 /** @brief Start Move
1677 * This function is called to initiate the process for a device to move (rejoin)
1681 bool emberAfStartMoveCallback();