forked from nrfconnect/ncs-zigbee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzboss_api_zdo.h
4247 lines (3626 loc) · 156 KB
/
zboss_api_zdo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* ZBOSS Zigbee 3.0
*
* Copyright (c) 2012-2025 DSR Corporation, Denver CO, USA.
* www.dsr-zboss.com
* www.dsr-corporation.com
* All rights reserved.
*
*
* Use in source and binary forms, redistribution in binary form only, with
* or without modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 2. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* 3. This software, with or without modification, must only be used with a Nordic
* Semiconductor ASA integrated circuit.
*
* 4. Any software provided in binary form under this license must not be reverse
* engineered, decompiled, modified and/or disassembled.
*
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* PURPOSE: Public ZDO layer API
*/
#ifndef ZB_ZBOSS_API_ZDO_H
#define ZB_ZBOSS_API_ZDO_H 1
#ifdef ZB_ENABLE_ZGP_SINK
#include "zboss_api_zgp.h"
#endif
/*! \addtogroup zb_comm_signals */
/*! @{ */
/**
* @name ZDP status values
* @anchor zdp_status
* @see 2.4.5 - ZDP Enumeration Description
*/
/** @{ */
/** The requested operation or transmission was completed successfully. */
#define ZB_ZDP_STATUS_SUCCESS 0x00U
/*!< The supplied request type was invalid. */
#define ZB_ZDP_STATUS_INV_REQUESTTYPE 0x80U
/*!< The requested device did not exist on a device following a child descriptor request to a
* parent.*/
#define ZB_ZDP_STATUS_DEVICE_NOT_FOUND 0x81U
/*!< The supplied endpoint was equal to 0x00 or between 0xf1 and 0xff. */
#define ZB_ZDP_STATUS_INVALID_EP 0x82U
/*!< The requested endpoint is not described by simple descriptor. */
#define ZB_ZDP_STATUS_NOT_ACTIVE 0x83U
/*!< The requested optional feature is not supported on the target device. */
#define ZB_ZDP_STATUS_NOT_SUPPORTED 0x84U
/*!< A timeout has occurred with the requested operation. */
#define ZB_ZDP_STATUS_TIMEOUT 0x85U
/*!< The end device bind request was unsuccessful due to a failure to match any suitable clusters.*/
#define ZB_ZDP_STATUS_NO_MATCH 0x86U
/*!< The unbind request was unsuccessful due to the coordinator or source device not having an
* entry in its binding table to unbind.*/
#define ZB_ZDP_STATUS_NO_ENTRY 0x88U
/*!< A child descriptor was not available following a discovery request to a parent. */
#define ZB_ZDP_STATUS_NO_DESCRIPTOR 0x89U
/*!< The device does not have storage space to support the requested operation. */
#define ZB_ZDP_STATUS_INSUFFICIENT_SPACE 0x8aU
/*!< The device is not in the proper state to support the requested operation. */
#define ZB_ZDP_STATUS_NOT_PERMITTED 0x8bU
/*!< The device does not have table space to support the operation. */
#define ZB_ZDP_STATUS_TABLE_FULL 0x8cU
/*!< The permissions configuration table on the target indicates that the request is not authorized
* from this device.*/
#define ZB_ZDP_STATUS_NOT_AUTHORIZED 0x8dU
/*!< The index in the received command is out of bounds. */
#define ZB_ZDP_STATUS_INVALID_INDEX 0x8fU
/**< The response was too large to fit in a single unfragmented message. */
#define ZB_ZDP_STATUS_FRAME_TOO_LARGE 0x90U
/**< A TLV required for processing the ZDO Request was absent from the
* received ZDO message. */
#define ZB_ZDP_STATUS_BAD_KEY_NEG_METHOD 0x91U
/**< The request encountered a temporary failure but a retry at a later time should be attempted and may succeed. */
#define ZB_ZDP_STATUS_TEMPORARY_FAILURE 0x92U
/**< Custom internal statuses. */
#define ZB_ZDP_STATUS_DEV_ANNCE_SENDING_FAILED 0x0feU
#define ZB_ZDP_STATUS_TIMEOUT_BY_STACK 0xffU
/** @} */
/**
* @brief Type for ZDP status values.
*
* Holds one of @ref zdp_status. Kept for backward compatibility as
* @ref zdp_status were declared previously as enum.
*/
typedef zb_uint8_t zb_zdp_status_t;
/**
* @name Signals passed to application signal handler
* @anchor zdo_app_signal_type
*
* @note If an application requires the parameters to be passed to the @ref zboss_signal_handler, it
* is recommended to introduce the structure according to the pattern below:
*
* @code
* typedef struct zb_zdo_app_my_custom_signal_s
* {
* zb_zdo_app_signal_type_t super;
* zb_my_custom_data_type_t my_custom_data;
* }
* @endcode
*/
/** @{ */
/** Obsolete signal, used for pre-R21 ZBOSS API compatibility. Not recommended to use.
* @parblock
* When generated:
* - After the device has been started and the non-BDB commissioning completed.
* - In case of the commissioning error.
*
* Status codes:
* - RET_OK: Device has started and joined the network.
* - RET_ERROR: An error of any type.
*
* Signal parameters:
* - none
* @endparblock */
#define ZB_ZDO_SIGNAL_DEFAULT_START 0U
/** Notifies the application that ZBOSS framework (scheduler, buffer pool, etc.) has started, but no
* join/rejoin/formation/BDB initialization has been done yet.
*
* @parblock
* When generated:
* - When the application calls zboss_start_no_autostart() instead of zboss_start() before the
* zboss_main_loop(). Used when some hardware must be initialized before the Zigbee commissioning,
* but already has ZBOSS scheduler running. Example: sensor connected through UART.
* - On macsplit architecture, when the application calls zboss_start_no_autostart() and both
* host, SoC components completed initialization procedure.
* This signal is always generated after ZB_MACSPLIT_DEVICE_BOOT in such case.
*
* Status codes:
* - RET_OK: Only ZBOSS framework has been initialized.
* - Does not return error status.
*
* Signal parameters:
* - none
*
* @snippet smart_plug_v2/sp_device/sp_device.c signal_skip_startup
* @endparblock */
#define ZB_ZDO_SIGNAL_SKIP_STARTUP 1U
/** Notifies the application about the new device appearance.
* @parblock
* When generated:
* - Upon receiving the Device_annce command.
*
* Status codes:
* - RET_OK: Device_annce command was received.
* - Does not return error status.
*
* Signal parameters:
* - @ref zb_zdo_signal_device_annce_params_t
*
* @snippet simple_gw/simple_gw.c signal_device_annce
* @endparblock */
#define ZB_ZDO_SIGNAL_DEVICE_ANNCE 2U
/** Notifies the application that the device itself has left the network.
* @parblock
* When generated:
* - Upon sending the "Leave" command.
*
* Status codes:
* - RET_OK: Device has sent the "Leave" command.
* - Does not return error status.
*
* Signal parameters:
* - @ref zb_zdo_signal_leave_params_t
*
* @note All callbacks for ZDO requests will be cleared and will be never called.
* For example, if zb_zdo_simple_desc_req has been sent with cb argument set
* and leave received before ZDO cb called, then this cb will be never called later.
*
* @snippet light_sample/light_control/light_control.c signal_leave
* @endparblock */
#define ZB_ZDO_SIGNAL_LEAVE 3U
/** Corrupted or incorrect signal information.
* @parblock
* When generated:
* - Incorrect buffer length detected by zb_get_app_signal (less then zb_zdo_app_signal_hdr_t)
*
* Status codes:
* - none
*
* Signal parameters:
* - none
* @endparblock */
#define ZB_ZDO_SIGNAL_ERROR 4U
/** Device started for the first time after the NVRAM erase.
* @parblock
* When generated:
* - Upon completing the typical device startup (network formation for ZC or
* rejoin/discovery/association for ZR and ZED).
* - This signal is exclusive to @ref ZB_BDB_SIGNAL_DEVICE_REBOOT
*
* @note No @ref ZB_BDB_SIGNAL_STEERING or @ref ZB_BDB_SIGNAL_FORMATION signals will be generated.
*
* Status codes:
* - RET_OK: Device started after the NVRAM erase
* - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action()
* - RET_ERROR: An error of any type.
*
* Signal parameters:
* - none
*
* @snippet HA_samples/on_off_switch/sample_zed.c signal_first
* @endparblock */
#define ZB_BDB_SIGNAL_DEVICE_FIRST_START 5U
/** Device started using the NVRAM contents.
* @parblock
* When generated:
* - Upon the device joining/rejoining Zigbee network using restored parameters.
* - This signal is exclusive to @ref ZB_BDB_SIGNAL_DEVICE_FIRST_START
*
* @note No @ref ZB_BDB_SIGNAL_STEERING or @ref ZB_BDB_SIGNAL_FORMATION signals will be generated.
*
* Status codes:
* - RET_OK: Device started using configuration stored in NVRAM
* - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action()
* - RET_ERROR: An error of any type.
*
* Signal parameters:
* - none
*
* @snippet HA_samples/on_off_switch/sample_zed.c signal_reboot
* @endparblock */
#define ZB_BDB_SIGNAL_DEVICE_REBOOT 6U
/** @cond DOXYGEN_BDB_SECTION */
#define ZB_SIGNAL_DEVICE_FIRST_START ZB_BDB_SIGNAL_DEVICE_FIRST_START
#define ZB_SIGNAL_DEVICE_REBOOT ZB_BDB_SIGNAL_DEVICE_REBOOT
#ifdef ZB_ENABLE_ZLL
/**
* @cond DOXYGEN_TOUCHLINK_FEATURE
* @addtogroup touchlink
* @{ */
/** Informs the Touchlink initiator about the new network has been created.
* @parblock
* When generated:
* - Upon generating the Network Start Response during the Touchlink commissioning procedure.
*
* Status codes:
* - RET_OK: New Zigbee network created.
* - Does not return error status.
*
* Signal parameters:
* - @ref zb_bdb_signal_touchlink_nwk_started_params_t
*
* @snippet lighting/dimmable_light_tl/light_controller_zed.c signal_touchlink_nwk_started
* @endparblock */
#define ZB_BDB_SIGNAL_TOUCHLINK_NWK_STARTED 7U
/** Inform the Touchlink initiator that the new router joined the network.
* @parblock
* When generated:
* - Upon receiving the Commissioning Network Join Router Response.
*
* Status codes:
* - RET_OK: New router joined the network.
* - Does not return error status.
*
* Signal parameters:
* - @ref zb_bdb_signal_touchlink_nwk_started_params_t
*
* @snippet lighting/dimmable_light_tl/light_controller_zed.c signal_touchlink_nwk_joined_router
* @endparblock */
#define ZB_BDB_SIGNAL_TOUCHLINK_NWK_JOINED_ROUTER 8U
/** Touchlink commissioning done.
* @parblock
* When generated:
* - Touchlink initiator device joined the network.
*
* Status codes:
* - ZB_BDB_STATUS_SUCCESS: Commissioning successful.
* - ZB_BDB_STATUS_NO_SCAN_RESPONSE:
* 1. No Touchlink commissioning cluster scan response inter-PAN commands were received
* 2. No touchlink commissioning cluster scan response inter-PAN commands were received with the
* inter-PAN transaction identifier field equal to that used by the initiator in its scan request
* command.
* - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action()
*
* Signal parameters:
* - none
* @endparblock */
#define ZB_BDB_SIGNAL_TOUCHLINK 9U
/** @} */ /* touchlink */
/** @endcond */ /* DOXYGEN_TOUCHLINK_FEATURE */
#endif /*ZB_ENABLE_ZLL*/
/** BDB network steering completed (Network steering only).
*
* @parblock
* When generated:
* - Upon completing Network steering initiated by
* bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING).
*
* Status codes:
* - RET_OK: Network steering completed.
* - RET_INTERRUPTED: was cancelled with bdb_cancel_joining()
* or with zb_bdb_reset_via_local_action()
*
* Has additional data of type zb_zdo_signal_leave_indication_params_t.
*
* Signal parameters:
* - none
* @endparblock */
#define ZB_BDB_SIGNAL_STEERING 10U
/** BDB network formation completed (Network formation only).
*
* @parblock
* When generated:
* - Upon completing Network formation initiated by
* bdb_start_top_level_commissioning(ZB_BDB_NETWORK_FORMATION).
*
* Status codes:
* - RET_OK: Network formation completed.
* - RET_INTERRUPTED: was cancelled with bdb_cancel_formation()
* or with zb_bdb_reset_via_local_action()
*
* Signal parameters:
* - none
* @endparblock */
#define ZB_BDB_SIGNAL_FORMATION 11U
/** BDB finding and binding for a target endpoint completed.
*
* @parblock
* When generated:
* - F&B target timeout expires.
*
* Status codes:
* - RET_OK: F&B target identifying time is expired.
* - RET_CANCELLED: F&B target identifying is cancelled during the IdentifyTime.
* - RET_ERROR: An error of any type.
*
* Signal parameters:
* - @ref zb_uint8_t - endpoint ID
* @endparblock */
#define ZB_BDB_SIGNAL_FINDING_AND_BINDING_TARGET_FINISHED 12U
/** BDB finding and binding for an initiator endpoint completed.
*
* @parblock
* When generated:
* - F&B with a Target succeeded or F&B initiator timeout expired or cancelled.
*
* Status codes:
* - @ref zdo_fb_initiator_finished_status
*
* Signal parameters:
* - @ref zb_zdo_signal_fb_initiator_finished_params_t
* @endparblock */
#define ZB_BDB_SIGNAL_FINDING_AND_BINDING_INITIATOR_FINISHED 13U
#ifdef ZB_ENABLE_ZLL
/**
* @cond DOXYGEN_TOUCHLINK_FEATURE
* @addtogroup touchlink
* @{ */
/** Touchlink procedure started.
*
* @parblock
* When generated:
* - Touchlink procedure started on the Target device.
*
* Status codes:
* - RET_OK: Procedure started on the Target device
* - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action()
*
* Signal parameters:
* - none
* @endparblock */
#define ZB_BDB_SIGNAL_TOUCHLINK_TARGET 14U
/** Touchlink Target network started (Target only).
*
* @parblock
* When generated:
* - Touchlink target initiated by bdb_touchlink_target_start().
*
* Status codes:
* - RET_OK: Touchlink network started successfully.
* - RET_INTERRUPTED: The operation was cancelled with zb_bdb_reset_via_local_action()
*
* Signal parameters:
* - none
* @endparblock */
#define ZB_BDB_SIGNAL_TOUCHLINK_NWK 15U
/** Touchlink Target finished (Target only).
*
* @parblock
* When generated:
* - Touchlink target finished
*
* Status codes:
* - RET_OK: Touchlink target finished successfully.
* - Does not return error status.
*
* Signal parameters:
* - none
* @endparblock */
#define ZB_BDB_SIGNAL_TOUCHLINK_TARGET_FINISHED 16U
#define ZB_BDB_SIGNAL_TOUCHLINK_ADD_DEVICE_TO_NWK 17U
/** @} */ /* touchlink */
/** @endcond */ /* DOXYGEN_TOUCHLINK_FEATURE */
#endif /*ZB_ENABLE_ZLL*/
/** @endcond */ /* DOXYGEN_BDB_SECTION */
/** Obsolete signal, used for pre-R21 ZBOSS API compatibility. Use ZB_ZDO_SIGNAL_DEVICE_ANNCE signal
* instead!
*
* @parblock
* When generated:
* - Indicates that there is a new device associated with Zigbee Coordinator or router.
*
* Status codes:
* - RET_OK: New device associated.
* - Does not return error status.
*
* Signal parameters:
* - @ref zb_nwk_signal_device_associated_params_t
* @endparblock */
#define ZB_NWK_SIGNAL_DEVICE_ASSOCIATED 18U
/** Network leave indication.
*
* @parblock
* When generated:
* - The child device has left the network.
*
* Status codes:
* - RET_OK: Leave command received from the child device.
* - RET_ERROR: An error of any type.
*
* Signal parameters:
* - @ref zb_zdo_signal_leave_indication_params_t
*
* @snippet simple_gw/simple_gw.c signal_leave_ind
* @endparblock */
#define ZB_ZDO_SIGNAL_LEAVE_INDICATION 19U
/** WWAH Rejoin start indication.
*
* @parblock
* When generated:
* - Device lost communication with the parent and started WWAH Rejoin procedure.
*
* Status codes:
* - RET_OK: Leave command received from the child device.
* - Does not return error status.
*
* Signal parameters: no
* @endparblock */
#define ZB_BDB_SIGNAL_WWAH_REJOIN_STARTED 20U
/** @cond DOXYGEN_ZGP_SECTION */
/** ZGP commissioning signal.
*
* @parblock
* When generated:
* - GPCB commissioned/decommissioned a device.
*
* Status codes:
* - RET_OK: commissioning/decommissioned complete.
* - Does not return error status.
*
* Signal parameters:
* - zb_zgp_signal_commissioning_params_s
*
* @snippet light_sample/light_coordinator_combo/light_zc.c signal_zgp_commissioning
* @endparblock */
#define ZB_ZGP_SIGNAL_COMMISSIONING 21U
/** @endcond */ /* DOXYGEN_ZGP_SECTION */
/** Notifies the application that the MCU can sleep for the specified period of time.
* @note Signal will not be generated if the sleep interval is less than sleep threshold
* ZB_SCHED_SLEEP_THRESHOLD_MS. To change the sleep threshold see zb_ret_t zb_sleep_set_threshold().
*
*
* @parblock
*
* When generated:
* - ZBOSS scheduler detects that the sleep mode can be enabled on the device.
*
* Status codes:
* - RET_OK: The sleep mode can be enabled on the device.
* - Does not return error status.
*
* Signal parameters:
* - @ref zb_zdo_signal_can_sleep_params_t
*
* @snippet onoff_server/on_off_switch_zed.c signal_can_sleep
*
* @endparblock
*/
#define ZB_COMMON_SIGNAL_CAN_SLEEP 22U
/** Notifies the application that the application specific part of the production configuration was
* found and restored and provides the application with this data.
*
* @parblock
* When generated:
* - After restoring the production configuration.
*
* Status codes:
* - RET_OK: The application specific part of the production configuration exists.
* - RET_ERROR: An error of any type.
*
* Signal parameters:
* - Passed up with application specific data from production configuration.
*
* @endparblock
*/
#define ZB_ZDO_SIGNAL_PRODUCTION_CONFIG_READY 23U
/** Notifies the application about the Neighbor Table expiration.
* It means that the neighbor devices did not send the Link Status messages for @ref
* ZB_NWK_ROUTER_AGE_LIMIT * @ref ZB_NWK_LINK_STATUS_PERIOD seconds.
*
* @parblock
* When generated:
* - All routes expired (usually when the link is down).
*
* Status codes:
* - RET_OK: All routers expired.
* - Does not return error status.
*
* Signal parameters:
* - none
* @endparblock */
#define ZB_NWK_SIGNAL_NO_ACTIVE_LINKS_LEFT 24U
#if defined ZB_ENABLE_SE_MIN_CONFIG || defined DOXYGEN
/* SE signals */
/** @cond DOXYGEN_SE_SECTION */
/** Device started. No auto-join/rejoin configured, no join attempts were performed, control is
* passed to application.
* @par Signal parameter
* - N/A
*/
#define ZB_SE_SIGNAL_SKIP_JOIN 25U
/** SE Rejoin start indication.
*
* @parblock
* When generated:
* - Device lost communication with the parent and started SE rejoin procedure.
*
* Status codes:
* - RET_OK: Leave command received from the child device.
* - Does not return error status.
*
* Signal parameters: no
* @endparblock */
#define ZB_SE_SIGNAL_REJOIN_STARTED ZB_BDB_SIGNAL_WWAH_REJOIN_STARTED
/** We are rejoined
* @par Signal parameter
* - N/A
*/
#define ZB_SE_SIGNAL_REJOIN 26U
/** Our child rejoined.
* @par Signal parameter
* @ref zb_ieee_addr_t - long remote device address
*/
#define ZB_SE_SIGNAL_CHILD_REJOIN 27U
/** Some device joined & authenticated in the net, established TCLK using CBKE procedure. Only TC
* can receive that signal.
* @par Signal parameter
* @ref zb_ieee_addr_t - long remote device address
* @par Example
* @snippet se/energy_service_interface/se_esi_zc.c SIGNAL_HANDLER_GET_SIGNAL
* @snippet se/energy_service_interface/se_esi_zc.c SIGNAL_HANDLER_TC_SIGNAL_CHILD_JOIN
*/
#define ZB_SE_TC_SIGNAL_CHILD_JOIN_CBKE 28U
/** Some device joined & authenticated in the net, established TCLK, but using non-CBKE procedure
* (BDB). Only TC can receive that signal.
* @par Signal parameter
* @ref zb_ieee_addr_t - long remote device address
*/
#define ZB_SE_TC_SIGNAL_CHILD_JOIN_NON_CBKE 29U
/** CBKE procedure failed. Application may set another certificate & key and retry CBKE procedure.
* @par Signal parameter
* N/A
* @par Example
* Signal processing code for @ref ZB_SE_SIGNAL_CBKE_OK can be used as a template
* @see zb_se_load_ecc_cert - set certificate
* @see zb_se_retry_cbke_with_tc - retry CBKE procedure
*/
#define ZB_SE_SIGNAL_CBKE_FAILED 30U
/** CBKE procedure with TC succeed.
* Note: TC can't receive that signal.
* @par Signal parameter
* N/A
* @par Example
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_GET_SIGNAL
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_CBKE_OK
*/
#define ZB_SE_SIGNAL_CBKE_OK 31U
/** Ready to start Service Discovery. Application can issue @ref zb_se_service_discovery_start to
* actually start discovery
* @par Signal parameter
* N/A
* @par Example
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_GET_SIGNAL
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_START_DISCOVERY
*/
#define ZB_SE_SIGNAL_SERVICE_DISCOVERY_START 32U
/** Service Discovery found a device that can be bound.
* @par Signal parameter
* @ref zb_se_signal_service_discovery_bind_params_t
* @par Example
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_GET_SIGNAL
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_DO_BIND
* @see zb_se_signal_service_discovery_bind_params_t
* @see ZB_ZDO_SIGNAL_GET_PARAMS
* @see zb_se_service_discovery_bind_req
*/
#define ZB_SE_SIGNAL_SERVICE_DISCOVERY_DO_BIND 33U
/** Bind request initiated by @ref zb_se_service_discovery_bind_req() succeeded.
* @par Signal parameter
* @ref zb_uint16_t - short remote device address
* @par Example
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_GET_SIGNAL
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_BIND_OK
*/
#define ZB_SE_SIGNAL_SERVICE_DISCOVERY_BIND_OK 34U
/** Bind request failed.
* @par Signal parameter
* @ref zb_uint16_t - short remote device address
* @par Example
* The same code to @ref ZB_SE_SIGNAL_SERVICE_DISCOVERY_BIND_OK can be used for signal processing.
*/
#define ZB_SE_SIGNAL_SERVICE_DISCOVERY_BIND_FAILED 35U
/** Successful bind initiated by other device.
* @par Signal parameter
* @ref zb_se_signal_service_discovery_bind_params_t
* @par Example
* @snippet se/energy_service_interface/se_esi_zc.c SIGNAL_HANDLER_GET_SIGNAL
* @snippet se/energy_service_interface/se_esi_zc.c SIGNAL_HANDLER_BIND_INDICATION
*/
#define ZB_SE_SIGNAL_SERVICE_DISCOVERY_BIND_INDICATION 36U
/** Service Discovery succeeded
* @par Signal parameter
* N/A
* @par Example
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_GET_SIGNAL
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_DISCOVERY_OK
*/
#define ZB_SE_SIGNAL_SERVICE_DISCOVERY_OK 37U
/** Service Discovery failed (no devices found)
* @par Signal parameter
* N/A
* @par Example
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_GET_SIGNAL
* @snippet se/in_home_display/se_ihd_zr.c SIGNAL_HANDLER_DISCOVERY_FAILED
*/
#define ZB_SE_SIGNAL_SERVICE_DISCOVERY_FAILED 38U
/** Partner link key initiated by @ref zb_se_start_aps_key_establishment is done. Keypair with some
* device is ready.
* @par Signal parameter
* @ref zb_ieee_addr_t - long remote device address
* @see zb_se_start_aps_key_establishment
*/
#define ZB_SE_SIGNAL_APS_KEY_READY 39U
/** Failed to establish a keypair
* @par Signal parameter
* @ref zb_ieee_addr_t - long remote device address
* @see zb_se_start_aps_key_establishment
*/
#define ZB_SE_SIGNAL_APS_KEY_FAIL 40U
#endif /* ZB_ENABLE_SE_MIN_CONFIG */
/** @endcond */
/** @cond DOXYGEN_SE_SECTION */
/** ZC / our MAC suspended our device tx: out of Duty cycle (sub-ghz only)
* @par Signal parameter - number of minutes to suspend, -1 if unknown
*/
#define ZB_SIGNAL_SUBGHZ_SUSPEND 41U
/** ZC resumed our device tx (sub-ghz only) */
#define ZB_SIGNAL_SUBGHZ_RESUME 42U
/** @endcond */ /* DOXYGEN_SE_SECTION */
#ifdef ZB_MACSPLIT
/** Notifies the application about macsplit mac device boot.
*
* When generated:
* - When MAC device completed initialization procedure.
* - When the application calls zboss_start_no_autostart() and both
* host, SoC components have completed initialization procedure.
* This signal is always generated before @ref ZB_ZDO_SIGNAL_SKIP_STARTUP in such case.
*
* Status codes:
* - RET_OK: Device information updated.
* - Does not return error status.
* Signal parameters:
* - @ref zb_zdo_signal_macsplit_dev_boot_params_t
*/
#define ZB_MACSPLIT_DEVICE_BOOT 43U
#define ZB_MACSPLIT_DEVICE_READY_FOR_UPGRADE 44U /*!< macsplit mac device is ready for upgrade */
/** macsplit device upgrade event: device ready for upgrade or error indication */
#define ZB_MACSPLIT_DEVICE_FW_UPGRADE_EVENT 45U
#endif /*ZB_MACSPLIT*/
#ifdef NCP_MODE
#define ZB_SIGNAL_NWK_INIT_DONE 46U
#endif /* NCP_MODE */
/** Notifies the Zigbee Trust center application about a new device is authorized in the network.
* For Zigbee R21 devices it means that the TCLK exchange procedure was finished, for the legacy
* devices it means that the Transport key was send to the device.
*
* When generated:
* - Authorization success
* - Authorization failed
* - Authorization timeout
*
* Status codes:
* - RET_OK: Device information updated.
* - Does not return error status.
* Signal parameters:
* - @ref zb_zdo_signal_device_authorized_params_t
*/
#define ZB_ZDO_SIGNAL_DEVICE_AUTHORIZED 47U
/** Notifies the Zigbee Trust center or parent router application about a new device joined,
* rejoined or left the network.
*
* When generated:
* - Standard device secured rejoin
* - Standard device unsecured join
* - Device left
* - Standard device trust center rejoin
*
* Status codes:
* - RET_OK: Device information updated.
* - Does not return error status.
*
* Signal parameters:
* - @ref zb_zdo_signal_device_update_params_t
*/
#define ZB_ZDO_SIGNAL_DEVICE_UPDATE 48U
/** Notifies the Zigbee Trust center that new device is ready for Device Interview.
*
* @param[in] param_in @ref zb_zdo_signal_device_ready_for_interview_params_t
*
* TC can exchange APS encrypted APS Data (including ZDO) with Joiner during Device Interview.
* TC can finish Device Interview by calling either zb_tc_auth_device_after_interview() or zb_tc_reject_device_after_interview ().
*
* Status codes:
* - RET_OK: Device is ready and can be authorized.
*
* Signal parameters:
* - @ref zb_zdo_signal_device_ready_for_interview_params_t
*
* @snippet r23_new_api/r23_zc.c device_interview1_snippet
* @snippet r23_new_api/r23_zc.c device_interview2_snippet
* @snippet r23_new_api/r23_zc.c device_interview3_snippet
*/
#define ZB_ZDO_SIGNAL_DEVICE_READY_FOR_INTERVIEW 49U
/** Notifies the Joiner device that Device Interview was started
*
* Status codes:
* - RET_OK: Device Interview is started.
*
* Device Interview is finished when device is authorized.
*
* @snippet r23_new_api/r23_zed.c device_interview4_snippet
*/
#define ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_STARTED 50U
/** PAN ID conflict has been detected. Application has to decide whether to initiate its resolution
* or not.
* @par Signal parameter
* @see zb_start_pan_id_conflict_resolution
*/
#define ZB_NWK_SIGNAL_PANID_CONFLICT_DETECTED 51U
/** NLME status indication. Application may implement additional logic based on receiving some
* statuses.
* @par Signal parameter
* @ref zb_zdo_signal_nlme_status_indication_params_t
* @see zb_nwk_command_status_t is the full list of NLME statuses
*/
#define ZB_NLME_STATUS_INDICATION 52U
/**
@addtogroup tc_swap
@{
*/
/**
it is time to backup TC database (signal at TC)
@snippet tc_swap_out/tcso_zc.c tcsw_backup1_snippet
@snippet tc_swap_out/tcso_zc.c tcsw_backup2_snippet
*/
#define ZB_TCSWAP_DB_BACKUP_REQUIRED_SIGNAL 53U
/**
TC is swapped (signal at Joiner)
@snippet tc_swap_out/tcso_zed.c tcsw_cli_sig_snippet
*/
#define ZB_TC_SWAPPED_SIGNAL 54U
/*! @} tc_swap */
/**
TCLK update completed (signal at Joiner)
@snippet tc_swap_out/tcso_zed.c tclk_updated_snippet
*/
#define ZB_TCLK_UPDATED_SIGNAL 55U
/**
Signal indicating that device just joined/rejoined, but not authorized yet
To be used mainly for certification testing, when run-time visibility setting is required
@snippet tc_swap_out/tcso_zed.c join_done_snippet
*/
#define ZB_SIGNAL_JOIN_DONE 56U
/** Test Profile 2 Buffer Test Req received. To be used in certification tests .
@param zb_buffer_test_response_t
*/
#define ZB_BUFFER_TEST_REQ_SIGNAL 57U
/** TC rejoin is completed
*
* @parblock
* When generated:
* - Device completes TC rejoin procedure.
*
* Status codes:
* - RET_OK: TC rejoin completed successful
* - RET_ERROR: An error of any type.
*
* Signal parameters:
* - none
*
* @snippet onoff_server/on_off_switch_zed.c signal_bdb_tc_rejoin_done
* @endparblock */
#define ZB_BDB_SIGNAL_TC_REJOIN_DONE 58U
/** Notifies the Zigbee Trust center or router application about permit join status changed.
* @par When generated:
* - Network was just open
* - Network was just closed
*
* @par Status codes:
* - RET_OK: Device information updated.
* - Does not return error status.
*
* @par Signal parameters:
* - @ref zb_uint8_t - Open time or zero if network closed. Value of @ref zb_zdo_mgmt_permit_joining_req_param_t.permit_duration
*
* @par Signal handling:
* @snippet thermostat/thermostat_zr/thermostat_zr.c zb_zdo_signal_permit_join_status_example
*
* @par Signal generation:
* - To self:
* @snippet thermostat/thermostat_zr/thermostat_zr.c permit_join_request_local_example
* - To other devices:
* @snippet thermostat/thermostat_zr/thermostat_zr.c permit_join_request_broadcast_example
*
*/
#define ZB_NWK_SIGNAL_PERMIT_JOIN_STATUS 59U
/**
* Notifies the TC that Device Interview was finished
*
* Status codes:
* - RET_OK: DDevice interview finished succeed
* - RET_ERROR: Device interview failed and the device was removed.
*
* Signal parameters:
* - @ref zb_zdo_signal_device_ready_for_interview_params_t
*
* @snippet r23_new_api/r23_zc.c device_interview1_snippet
* @snippet r23_new_api/r23_zc.c device_interview2_snippet
* @snippet r23_new_api/r23_zc.c device_interview3_snippet
*/
#define ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_FINISHED 60U
/** BDB steering cancel request processed
*
* @parblock
* When generated:
* - after the cancel request called with bdb_cancel_steering() is processed
*
* Status codes:
* - RET_ILLEGAL_REQUEST: device is a ZC
* - RET_INVALID_STATE: steering for a node not a network is not in progress
* - RET_PENDING: it is too late to cancel a steering, it will be completed soon
* - RET_IGNORE: cancellation was already requested
* - RET_OK: steering is cancelled successfully
*
* Signal parameters:
* - none
*
* @endparblock */
#define ZB_BDB_SIGNAL_STEERING_CANCELLED 61U
/** BDB formation cancel request processed
*
* @parblock
* When generated:
* - after the cancel request called with bdb_cancel_formation() is processed
*
* Status codes:
* - RET_INVALID_STATE: formation is not in progress
* - RET_PENDING: it is too late to cancel a formation, it will be completed soon
* - RET_IGNORE: cancellation was already requested
* - RET_OK: formation is cancelled successfully
*
* Signal parameters:
* - none