Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / lib / core / CHIPError.h
1 /*
2  *
3  *    Copyright (c) 2020 Project CHIP Authors
4  *    Copyright (c) 2013-2017 Nest Labs, Inc.
5  *
6  *    Licensed under the Apache License, Version 2.0 (the "License");
7  *    you may not use this file except in compliance with the License.
8  *    You may obtain a copy of the License at
9  *
10  *        http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *    Unless required by applicable law or agreed to in writing, software
13  *    distributed under the License is distributed on an "AS IS" BASIS,
14  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *    See the License for the specific language governing permissions and
16  *    limitations under the License.
17  */
18
19 /**
20  *    @file
21  *      This file defines error constants for the CHIP core
22  *      subsystem.
23  *
24  *      Error types, ranges, and mappings overrides may be made by
25  *      defining the appropriate CHIP_CONFIG_* or _CHIP_CONFIG_*
26  *      macros.
27  *
28  *  NOTE WELL: On some platforms, this header is included by C-language programs.
29  *
30  */
31
32 #pragma once
33
34 #include <core/CHIPConfig.h>
35 // clang-format off
36
37 /**
38  *  @def CHIP_NO_ERROR
39  *
40  *  @brief
41  *    This defines the CHIP error code for success or no error.
42  *    This value may be configured via #CHIP_CONFIG_NO_ERROR."
43  *
44  */
45 #define CHIP_NO_ERROR                                          CHIP_CONFIG_NO_ERROR
46
47 /**
48  *  @def CHIP_ERROR_MIN
49  *
50  *  @brief
51  *    This defines the bottom or minimum CHIP error number range.
52  *    This value may be configured via #CHIP_CONFIG_ERROR_MIN.
53  *
54  */
55 #define CHIP_ERROR_MIN                                         CHIP_CONFIG_ERROR_MIN
56
57 /**
58  *  @def CHIP_ERROR_MAX
59  *
60  *  @brief
61  *    This defines the top or maximum CHIP error number range.
62  *    This value may be configured via #CHIP_CONFIG_ERROR_MAX.
63  *
64  */
65 #define CHIP_ERROR_MAX                                         CHIP_CONFIG_ERROR_MAX
66
67 /**
68  *  @def _CHIP_ERROR(e)
69  *
70  *  @brief
71  *    This defines a mapping function for CHIP errors that allows
72  *    mapping such errors into a platform- or system-specific range.
73  *    This function may be configured via #_CHIP_CONFIG_ERROR(e).
74  *
75  *  @param[in] e       The CHIP error to map.
76  *
77  *  @return    The mapped CHIP error.
78  *
79  *
80  */
81 #define _CHIP_ERROR(e)                                         _CHIP_CONFIG_ERROR(e)
82
83 /**
84  *  The basic type for all CHIP errors.
85  *
86  *  @brief
87  *    This is defined to a platform- or system-specific type.
88  *
89  */
90 typedef CHIP_CONFIG_ERROR_TYPE CHIP_ERROR;
91
92 /**
93  *  @name Error Definitions
94  *
95  *  @{
96  */
97
98 /**
99  *  @def CHIP_ERROR_TOO_MANY_CONNECTIONS
100  *
101  *  @brief
102  *    The attempt to allocate a connection object failed because too many
103  *    connections exist.
104  *
105  */
106 #define CHIP_ERROR_TOO_MANY_CONNECTIONS                        _CHIP_ERROR(0)
107
108 /**
109  *  @def CHIP_ERROR_SENDING_BLOCKED
110  *
111  *  @brief
112  *    A message exceeds the sent limit.
113  *
114  */
115 #define CHIP_ERROR_SENDING_BLOCKED                             _CHIP_ERROR(1)
116
117 /**
118  *  @def CHIP_ERROR_CONNECTION_ABORTED
119  *
120  *  @brief
121  *    A connection has been aborted.
122  *
123  */
124 #define CHIP_ERROR_CONNECTION_ABORTED                          _CHIP_ERROR(2)
125
126 /**
127  *  @def CHIP_ERROR_INCORRECT_STATE
128  *
129  *  @brief
130  *    An unexpected state was encountered.
131  *
132  */
133 #define CHIP_ERROR_INCORRECT_STATE                             _CHIP_ERROR(3)
134
135 /**
136  *  @def CHIP_ERROR_MESSAGE_TOO_LONG
137  *
138  *  @brief
139  *    A message is too long.
140  *
141  */
142 #define CHIP_ERROR_MESSAGE_TOO_LONG                            _CHIP_ERROR(4)
143
144 /**
145  *  @def CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION
146  *
147  *  @brief
148  *    An exchange version is not supported.
149  *
150  */
151 #define CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION                _CHIP_ERROR(5)
152
153 /**
154  *  @def CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS
155  *
156  *  @brief
157  *    The attempt to register an unsolicited message handler failed because the
158  *    unsolicited message handler pool is full.
159  *
160  */
161 #define CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS       _CHIP_ERROR(6)
162
163 /**
164  *  @def CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER
165  *
166  *  @brief
167  *    The attempt to unregister an unsolicited message handler failed because
168  *    the target handler was not found in the unsolicited message handler pool.
169  *
170  */
171 #define CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER              _CHIP_ERROR(7)
172
173 /**
174  *  @def CHIP_ERROR_NO_CONNECTION_HANDLER
175  *
176  *  @brief
177  *    No callback has been registered for handling a connection.
178  *
179  */
180 #define CHIP_ERROR_NO_CONNECTION_HANDLER                       _CHIP_ERROR(8)
181
182 /**
183  *  @def CHIP_ERROR_TOO_MANY_PEER_NODES
184  *
185  *  @brief
186  *    The number of peer nodes exceeds the maximum limit of a local node.
187  *
188  */
189 #define CHIP_ERROR_TOO_MANY_PEER_NODES                         _CHIP_ERROR(9)
190
191 /**
192  *  @def CHIP_ERROR_NO_MEMORY
193  *
194  *  @brief
195  *    The attempt to allocate a buffer or object failed due to a lack of memory.
196  *
197  */
198 #define CHIP_ERROR_NO_MEMORY                                   _CHIP_ERROR(11)
199
200 /**
201  *  @def CHIP_ERROR_NO_MESSAGE_HANDLER
202  *
203  *  @brief
204  *    No callback has been registered for handling a message.
205  *
206  */
207 #define CHIP_ERROR_NO_MESSAGE_HANDLER                          _CHIP_ERROR(12)
208
209 /**
210  *  @def CHIP_ERROR_MESSAGE_INCOMPLETE
211  *
212  *  @brief
213  *    A message is incomplete.
214  *
215  */
216 #define CHIP_ERROR_MESSAGE_INCOMPLETE                          _CHIP_ERROR(13)
217
218 /**
219  *  @def CHIP_ERROR_DATA_NOT_ALIGNED
220  *
221  *  @brief
222  *    The data is not aligned.
223  *
224  */
225 #define CHIP_ERROR_DATA_NOT_ALIGNED                            _CHIP_ERROR(14)
226
227 /**
228  *  @def CHIP_ERROR_UNKNOWN_KEY_TYPE
229  *
230  *  @brief
231  *    The encryption key type is unknown.
232  *
233  */
234 #define CHIP_ERROR_UNKNOWN_KEY_TYPE                            _CHIP_ERROR(15)
235
236 /**
237  *  @def CHIP_ERROR_KEY_NOT_FOUND
238  *
239  *  @brief
240  *    The encryption key is not found.
241  *
242  */
243 #define CHIP_ERROR_KEY_NOT_FOUND                               _CHIP_ERROR(16)
244
245 /**
246  *  @def CHIP_ERROR_WRONG_ENCRYPTION_TYPE
247  *
248  *  @brief
249  *    The encryption type is incorrect for the specified key.
250  *
251  */
252 #define CHIP_ERROR_WRONG_ENCRYPTION_TYPE                       _CHIP_ERROR(17)
253
254 /**
255  *  @def CHIP_ERROR_TOO_MANY_KEYS
256  *
257  *  @brief
258  *    The attempt to allocate a key failed because the number of active keys
259  *    exceeds the maximum limit.
260  *
261  */
262 #define CHIP_ERROR_TOO_MANY_KEYS                               _CHIP_ERROR(18)
263
264 /**
265  *  @def CHIP_ERROR_INTEGRITY_CHECK_FAILED
266  *
267  *  @brief
268  *    The integrity check in the message does not match the expected integrity
269  *    check.
270  *
271  */
272 #define CHIP_ERROR_INTEGRITY_CHECK_FAILED                      _CHIP_ERROR(19)
273
274 /**
275  *  @def CHIP_ERROR_INVALID_SIGNATURE
276  *
277  *  @brief
278  *    Invalid signature.
279  *
280  */
281 #define CHIP_ERROR_INVALID_SIGNATURE                           _CHIP_ERROR(20)
282
283 /**
284  *  @def CHIP_ERROR_UNSUPPORTED_MESSAGE_VERSION
285  *
286  *  @brief
287  *    A message version is unsupported.
288  *
289  */
290 #define CHIP_ERROR_UNSUPPORTED_MESSAGE_VERSION                 _CHIP_ERROR(21)
291
292 /**
293  *  @def CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE
294  *
295  *  @brief
296  *    An encryption type is unsupported.
297  *
298  */
299 #define CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE                 _CHIP_ERROR(22)
300
301 /**
302  *  @def CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE
303  *
304  *  @brief
305  *    A signature type is unsupported.
306  *
307  */
308 #define CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE                  _CHIP_ERROR(23)
309
310 /**
311  *  @def CHIP_ERROR_INVALID_MESSAGE_LENGTH
312  *
313  *  @brief
314  *    A message length is invalid.
315  *
316  */
317 #define CHIP_ERROR_INVALID_MESSAGE_LENGTH                      _CHIP_ERROR(24)
318
319 /**
320  *  @def CHIP_ERROR_BUFFER_TOO_SMALL
321  *
322  *  @brief
323  *    A buffer is too small.
324  *
325  */
326 #define CHIP_ERROR_BUFFER_TOO_SMALL                            _CHIP_ERROR(25)
327
328 /**
329  *  @def CHIP_ERROR_DUPLICATE_KEY_ID
330  *
331  *  @brief
332  *    A key id is duplicate.
333  *
334  */
335 #define CHIP_ERROR_DUPLICATE_KEY_ID                            _CHIP_ERROR(26)
336
337 /**
338  *  @def CHIP_ERROR_WRONG_KEY_TYPE
339  *
340  *  @brief
341  *    A key type does not match the expected key type.
342  *
343  */
344 #define CHIP_ERROR_WRONG_KEY_TYPE                              _CHIP_ERROR(27)
345
346 /**
347  *  @def CHIP_ERROR_WELL_UNINITIALIZED
348  *
349  *  @brief
350  *    A requested object is uninitialized.
351  *
352  */
353 #define CHIP_ERROR_WELL_UNINITIALIZED                          _CHIP_ERROR(28)
354
355 /**
356  *  @def CHIP_ERROR_WELL_EMPTY
357  *
358  *  @brief
359  *    A requested object is empty.
360  *
361  */
362 #define CHIP_ERROR_WELL_EMPTY                                  _CHIP_ERROR(29)
363
364 /**
365  *  @def CHIP_ERROR_INVALID_STRING_LENGTH
366  *
367  *  @brief
368  *    A string length is invalid.
369  *
370  */
371 #define CHIP_ERROR_INVALID_STRING_LENGTH                       _CHIP_ERROR(30)
372
373 /**
374  *  @def CHIP_ERROR_INVALID_LIST_LENGTH
375  *
376  *  @brief
377  *    A list length is invalid.
378  *
379  */
380 #define CHIP_ERROR_INVALID_LIST_LENGTH                         _CHIP_ERROR(31)
381
382 /**
383  *  @def CHIP_ERROR_INVALID_INTEGRITY_TYPE
384  *
385  *  @brief
386  *    An integrity type is invalid.
387  *
388  */
389 #define CHIP_ERROR_INVALID_INTEGRITY_TYPE                      _CHIP_ERROR(32)
390
391 /**
392  *  @def CHIP_END_OF_TLV
393  *
394  *  @brief
395  *    The end of a TLV encoding,
396  *    or the end of a TLV container element has been reached.
397  *
398  */
399 #define CHIP_END_OF_TLV                                        _CHIP_ERROR(33)
400
401 /**
402  *  @def CHIP_ERROR_TLV_UNDERRUN
403  *
404  *  @brief
405  *    The TLV encoding ended prematurely.
406  *
407  */
408 #define CHIP_ERROR_TLV_UNDERRUN                                _CHIP_ERROR(34)
409
410 /**
411  *  @def CHIP_ERROR_INVALID_TLV_ELEMENT
412  *
413  *  @brief
414  *    A TLV element is invalid.
415  *
416  */
417 #define CHIP_ERROR_INVALID_TLV_ELEMENT                         _CHIP_ERROR(35)
418
419 /**
420  *  @def CHIP_ERROR_INVALID_TLV_TAG
421  *
422  *  @brief
423  *    A TLV tag is invalid.
424  *
425  */
426 #define CHIP_ERROR_INVALID_TLV_TAG                             _CHIP_ERROR(36)
427
428 /**
429  *  @def CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG
430  *
431  *  @brief
432  *    An implicitly encoded TLV tag was encountered,
433  *    but an implicit profile id has not been defined.
434  *
435  */
436 #define CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG                    _CHIP_ERROR(37)
437
438 /**
439  *  @def CHIP_ERROR_WRONG_TLV_TYPE
440  *
441  *  @brief
442  *    A TLV type is wrong.
443  *
444  */
445 #define CHIP_ERROR_WRONG_TLV_TYPE                              _CHIP_ERROR(38)
446
447 /**
448  *  @def CHIP_ERROR_TLV_CONTAINER_OPEN
449  *
450  *  @brief
451  *    A TLV container is unexpectedly open.
452  *
453  */
454 #define CHIP_ERROR_TLV_CONTAINER_OPEN                          _CHIP_ERROR(39)
455
456 /**
457  *  @def CHIP_ERROR_INVALID_TRANSFER_MODE
458  *
459  *  @brief
460  *    A transfer mode is invalid.
461  *
462  */
463 #define CHIP_ERROR_INVALID_TRANSFER_MODE                       _CHIP_ERROR(40)
464
465 /**
466  *  @def CHIP_ERROR_INVALID_PROFILE_ID
467  *
468  *  @brief
469  *    A profile id is invalid.
470  *
471  */
472 #define CHIP_ERROR_INVALID_PROFILE_ID                          _CHIP_ERROR(41)
473
474 /**
475  *  @def CHIP_ERROR_INVALID_MESSAGE_TYPE
476  *
477  *  @brief
478  *    A message type is invalid.
479  *
480  */
481 #define CHIP_ERROR_INVALID_MESSAGE_TYPE                        _CHIP_ERROR(42)
482
483 /**
484  *  @def CHIP_ERROR_UNEXPECTED_TLV_ELEMENT
485  *
486  *  @brief
487  *    An unexpected TLV element was encountered.
488  *
489  */
490 #define CHIP_ERROR_UNEXPECTED_TLV_ELEMENT                      _CHIP_ERROR(43)
491
492 /**
493  *  @def CHIP_ERROR_STATUS_REPORT_RECEIVED
494  *
495  *  @brief
496  *    A status report is received from a peer node.
497  *
498  */
499 #define CHIP_ERROR_STATUS_REPORT_RECEIVED                      _CHIP_ERROR(44)
500
501 /**
502  *  @def CHIP_ERROR_NOT_IMPLEMENTED
503  *
504  *  @brief
505  *    A requested function or feature is not implemented.
506  *
507  */
508 #define CHIP_ERROR_NOT_IMPLEMENTED                             _CHIP_ERROR(45)
509
510 /**
511  *  @def CHIP_ERROR_INVALID_ADDRESS
512  *
513  *  @brief
514  *    An address is invalid.
515  *
516  */
517 #define CHIP_ERROR_INVALID_ADDRESS                             _CHIP_ERROR(46)
518
519 /**
520  *  @def CHIP_ERROR_INVALID_ARGUMENT
521  *
522  *  @brief
523  *    An argument is invalid.
524  *
525  */
526 #define CHIP_ERROR_INVALID_ARGUMENT                            _CHIP_ERROR(47)
527
528 /**
529  *  @def CHIP_ERROR_INVALID_PATH_LIST
530  *
531  *  @brief
532  *    A TLV path list is invalid.
533  *
534  */
535 #define CHIP_ERROR_INVALID_PATH_LIST                           _CHIP_ERROR(48)
536
537 /**
538  *  @def CHIP_ERROR_INVALID_DATA_LIST
539  *
540  *  @brief
541  *    A TLV data list is invalid.
542  *
543  */
544 #define CHIP_ERROR_INVALID_DATA_LIST                           _CHIP_ERROR(49)
545
546 /**
547  *  @def CHIP_ERROR_TIMEOUT
548  *
549  *  @brief
550  *    A request timed out.
551  *
552  */
553 #define CHIP_ERROR_TIMEOUT                                     _CHIP_ERROR(50)
554
555 /**
556  *  @def CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR
557  *
558  *  @brief
559  *    A device descriptor is invalid.
560  *
561  */
562 #define CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR                   _CHIP_ERROR(51)
563
564 /**
565  *  @def CHIP_ERROR_UNSUPPORTED_DEVICE_DESCRIPTOR_VERSION
566  *
567  *  @brief
568  *    A device descriptor version is unsupported.
569  *
570  */
571 #define CHIP_ERROR_UNSUPPORTED_DEVICE_DESCRIPTOR_VERSION       _CHIP_ERROR(52)
572
573 /**
574  *  @def CHIP_END_OF_INPUT
575  *
576  *  @brief
577  *    An input ended.
578  *
579  */
580 #define CHIP_END_OF_INPUT                                      _CHIP_ERROR(53)
581
582 /**
583  *  @def CHIP_ERROR_RATE_LIMIT_EXCEEDED
584  *
585  *  @brief
586  *    A rate limit is exceeded.
587  *
588  */
589 #define CHIP_ERROR_RATE_LIMIT_EXCEEDED                         _CHIP_ERROR(54)
590
591 /**
592  *  @def CHIP_ERROR_SECURITY_MANAGER_BUSY
593  *
594  *  @brief
595  *    A security manager is busy.
596  *
597  */
598 #define CHIP_ERROR_SECURITY_MANAGER_BUSY                       _CHIP_ERROR(55)
599
600 /**
601  *  @def CHIP_ERROR_INVALID_PASE_PARAMETER
602  *
603  *  @brief
604  *    A PASE parameter is invalid.
605  *
606  */
607 #define CHIP_ERROR_INVALID_PASE_PARAMETER                      _CHIP_ERROR(56)
608
609 /**
610  *  @def CHIP_ERROR_PASE_SUPPORTS_ONLY_CONFIG1
611  *
612  *  @brief
613  *    PASE supports only config1.
614  *
615  */
616 #define CHIP_ERROR_PASE_SUPPORTS_ONLY_CONFIG1                  _CHIP_ERROR(57)
617
618 /**
619  *  @def CHIP_ERROR_KEY_CONFIRMATION_FAILED
620  *
621  *  @brief
622  *    A key confirmation failed.
623  *
624  */
625 #define CHIP_ERROR_KEY_CONFIRMATION_FAILED                     _CHIP_ERROR(58)
626
627 /**
628  *  @def CHIP_ERROR_INVALID_USE_OF_SESSION_KEY
629  *
630  *  @brief
631  *    A use of session key is invalid.
632  *
633  */
634 #define CHIP_ERROR_INVALID_USE_OF_SESSION_KEY                  _CHIP_ERROR(59)
635
636 /**
637  *  @def CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY
638  *
639  *  @brief
640  *    A connection is closed unexpectedly.
641  *
642  */
643 #define CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY              _CHIP_ERROR(60)
644
645 /**
646  *  @def CHIP_ERROR_MISSING_TLV_ELEMENT
647  *
648  *  @brief
649  *    A TLV element is missing.
650  *
651  */
652 #define CHIP_ERROR_MISSING_TLV_ELEMENT                         _CHIP_ERROR(61)
653
654 /**
655  *  @def CHIP_ERROR_RANDOM_DATA_UNAVAILABLE
656  *
657  *  @brief
658  *    Secure random data is not available.
659  *
660  */
661 #define CHIP_ERROR_RANDOM_DATA_UNAVAILABLE                     _CHIP_ERROR(62)
662
663 /**
664  *  @def CHIP_ERROR_UNSUPPORTED_HOST_PORT_ELEMENT
665  *
666  *  @brief
667  *    A type in host/port list is unsupported.
668  *
669  */
670 #define CHIP_ERROR_UNSUPPORTED_HOST_PORT_ELEMENT               _CHIP_ERROR(63)
671
672 /**
673  *  @def CHIP_ERROR_INVALID_HOST_SUFFIX_INDEX
674  *
675  *  @brief
676  *    A suffix index in host/port list is invalid.
677  *
678  */
679 #define CHIP_ERROR_INVALID_HOST_SUFFIX_INDEX                   _CHIP_ERROR(64)
680
681 /**
682  *  @def CHIP_ERROR_HOST_PORT_LIST_EMPTY
683  *
684  *  @brief
685  *    A host/port list is empty.
686  *
687  */
688 #define CHIP_ERROR_HOST_PORT_LIST_EMPTY                        _CHIP_ERROR(65)
689
690 /**
691  *  @def CHIP_ERROR_UNSUPPORTED_AUTH_MODE
692  *
693  *  @brief
694  *    An authentication mode is unsupported.
695  *
696  */
697 #define CHIP_ERROR_UNSUPPORTED_AUTH_MODE                       _CHIP_ERROR(66)
698
699 /**
700  *  @def CHIP_ERROR_INVALID_SERVICE_EP
701  *
702  *  @brief
703  *    A service endpoint is invalid.
704  *
705  */
706 #define CHIP_ERROR_INVALID_SERVICE_EP                          _CHIP_ERROR(67)
707
708 /**
709  *  @def CHIP_ERROR_INVALID_DIRECTORY_ENTRY_TYPE
710  *
711  *  @brief
712  *    A directory entry type is unknown.
713  *
714  */
715 #define CHIP_ERROR_INVALID_DIRECTORY_ENTRY_TYPE                _CHIP_ERROR(68)
716
717 /**
718  *  @def CHIP_ERROR_FORCED_RESET
719  *
720  *  @brief
721  *    A service manager is forced to reset.
722  *
723  */
724 #define CHIP_ERROR_FORCED_RESET                                _CHIP_ERROR(69)
725
726 /**
727  *  @def CHIP_ERROR_NO_ENDPOINT
728  *
729  *  @brief
730  *    No endpoint is available.
731  *
732  */
733 #define CHIP_ERROR_NO_ENDPOINT                                 _CHIP_ERROR(70)
734
735 /**
736  *  @def CHIP_ERROR_INVALID_DESTINATION_NODE_ID
737  *
738  *  @brief
739  *    A destination node id is invalid.
740  *
741  */
742 #define CHIP_ERROR_INVALID_DESTINATION_NODE_ID                 _CHIP_ERROR(71)
743
744 /**
745  *  @def CHIP_ERROR_NOT_CONNECTED
746  *
747  *  @brief
748  *    The operation cannot be performed because the underlying object is not
749  *    connected.
750  *
751  */
752 #define CHIP_ERROR_NOT_CONNECTED                               _CHIP_ERROR(72)
753
754 /**
755  *  @def CHIP_ERROR_NO_SW_UPDATE_AVAILABLE
756  *
757  *  @brief
758  *    No software update is available.
759  *
760  */
761 #define CHIP_ERROR_NO_SW_UPDATE_AVAILABLE                      _CHIP_ERROR(73)
762
763 /**
764  *  @def CHIP_ERROR_CA_CERT_NOT_FOUND
765  *
766  *  @brief
767  *    CA certificate is not found.
768  *
769  */
770 #define CHIP_ERROR_CA_CERT_NOT_FOUND                           _CHIP_ERROR(74)
771
772 /**
773  *  @def CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED
774  *
775  *  @brief
776  *    A certificate path length exceeds the constraint.
777  *
778  */
779 #define CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED           _CHIP_ERROR(75)
780
781 /**
782  *  @def CHIP_ERROR_CERT_PATH_TOO_LONG
783  *
784  *  @brief
785  *    A certificate path is too long.
786  *
787  */
788 #define CHIP_ERROR_CERT_PATH_TOO_LONG                          _CHIP_ERROR(76)
789
790 /**
791  *  @def CHIP_ERROR_CERT_USAGE_NOT_ALLOWED
792  *
793  *  @brief
794  *    A requested certificate usage is not allowed.
795  *
796  */
797 #define CHIP_ERROR_CERT_USAGE_NOT_ALLOWED                      _CHIP_ERROR(77)
798
799 /**
800  *  @def CHIP_ERROR_CERT_EXPIRED
801  *
802  *  @brief
803  *    A certificate expired.
804  *
805  */
806 #define CHIP_ERROR_CERT_EXPIRED                                _CHIP_ERROR(78)
807
808 /**
809  *  @def CHIP_ERROR_CERT_NOT_VALID_YET
810  *
811  *  @brief
812  *    A certificate is not valid yet.
813  *
814  */
815 #define CHIP_ERROR_CERT_NOT_VALID_YET                          _CHIP_ERROR(79)
816
817 /**
818  *  @def CHIP_ERROR_UNSUPPORTED_CERT_FORMAT
819  *
820  *  @brief
821  *    A certificate format is unsupported.
822  *
823  */
824 #define CHIP_ERROR_UNSUPPORTED_CERT_FORMAT                     _CHIP_ERROR(80)
825
826 /**
827  *  @def CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE
828  *
829  *  @brief
830  *    An elliptic curve is unsupported.
831  *
832  */
833 #define CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE                  _CHIP_ERROR(81)
834
835 /**
836  *  @def CHIP_CERT_NOT_USED
837  *
838  *  @brief
839  *    A certificate was not used during the chain validation.
840  *
841  */
842 #define CHIP_CERT_NOT_USED                                     _CHIP_ERROR(82)
843
844 /**
845  *  @def CHIP_ERROR_CERT_NOT_FOUND
846  *
847  *  @brief
848  *    A certificate is not found.
849  *
850  */
851 #define CHIP_ERROR_CERT_NOT_FOUND                              _CHIP_ERROR(83)
852
853 /**
854  *  @def CHIP_ERROR_INVALID_CASE_PARAMETER
855  *
856  *  @brief
857  *    A CASE parameter is invalid.
858  *
859  */
860 #define CHIP_ERROR_INVALID_CASE_PARAMETER                      _CHIP_ERROR(84)
861
862 /**
863  *  @def CHIP_ERROR_UNSUPPORTED_CASE_CONFIGURATION
864  *
865  *  @brief
866  *    A CASE configuration is unsupported.
867  *
868  */
869 #define CHIP_ERROR_UNSUPPORTED_CASE_CONFIGURATION              _CHIP_ERROR(85)
870
871 /**
872  *  @def CHIP_ERROR_CERT_LOAD_FAILED
873  *
874  *  @brief
875  *    A certificate load failed.
876  *
877  */
878 #define CHIP_ERROR_CERT_LOAD_FAILED                             _CHIP_ERROR(86)
879
880 /**
881  *  @def CHIP_ERROR_CERT_NOT_TRUSTED
882  *
883  *  @brief
884  *    A certificate is not trusted.
885  *
886  */
887 #define CHIP_ERROR_CERT_NOT_TRUSTED                            _CHIP_ERROR(87)
888
889 /**
890  *  @def CHIP_ERROR_INVALID_ACCESS_TOKEN
891  *
892  *  @brief
893  *    An access token is invalid.
894  *
895  */
896 #define CHIP_ERROR_INVALID_ACCESS_TOKEN                        _CHIP_ERROR(88)
897
898 /**
899  *  @def CHIP_ERROR_WRONG_CERT_SUBJECT
900  *
901  *  @brief
902  *    A certificate subject is wrong.
903  *
904  */
905 #define CHIP_ERROR_WRONG_CERT_SUBJECT                          _CHIP_ERROR(89)
906
907 // deprecated alias
908 #define CHIP_ERROR_WRONG_CERTIFICATE_SUBJECT CHIP_ERROR_WRONG_CERT_SUBJECT
909
910 /**
911  *  @def CHIP_ERROR_INVALID_PROVISIONING_BUNDLE
912  *
913  *  @brief
914  *    A provisioning bundle is invalid.
915  *
916  */
917 #define CHIP_ERROR_INVALID_PROVISIONING_BUNDLE                 _CHIP_ERROR(90)
918
919 /**
920  *  @def CHIP_ERROR_PROVISIONING_BUNDLE_DECRYPTION_ERROR
921  *
922  *  @brief
923  *    A provision bundle encountered a decryption error.
924  *
925  */
926 #define CHIP_ERROR_PROVISIONING_BUNDLE_DECRYPTION_ERROR        _CHIP_ERROR(91)
927
928 /**
929  *  @def CHIP_ERROR_WRONG_NODE_ID
930  *
931  *  @brief
932  *    A node id is wrong.
933  *
934  */
935 #define CHIP_ERROR_WRONG_NODE_ID                               _CHIP_ERROR(92)
936
937 /**
938  *  @def CHIP_ERROR_CONN_ACCEPTED_ON_WRONG_PORT
939  *
940  *  @brief
941  *    A connection is accepted on a wrong port.
942  *
943  */
944 #define CHIP_ERROR_CONN_ACCEPTED_ON_WRONG_PORT                 _CHIP_ERROR(93)
945
946 /**
947  *  @def CHIP_ERROR_CALLBACK_REPLACED
948  *
949  *  @brief
950  *    An application callback has been replaced.
951  *
952  */
953 #define CHIP_ERROR_CALLBACK_REPLACED                           _CHIP_ERROR(94)
954
955 /**
956  *  @def CHIP_ERROR_NO_CASE_AUTH_DELEGATE
957  *
958  *  @brief
959  *    No CASE authentication delegate is set.
960  *
961  */
962 #define CHIP_ERROR_NO_CASE_AUTH_DELEGATE                       _CHIP_ERROR(95)
963
964 /**
965  *  @def CHIP_ERROR_DEVICE_LOCATE_TIMEOUT
966  *
967  *  @brief
968  *    The attempt to locate device timed out.
969  *
970  */
971 #define CHIP_ERROR_DEVICE_LOCATE_TIMEOUT                       _CHIP_ERROR(96)
972
973 /**
974  *  @def CHIP_ERROR_DEVICE_CONNECT_TIMEOUT
975  *
976  *  @brief
977  *    The attempt to connect device timed out.
978  *
979  */
980 #define CHIP_ERROR_DEVICE_CONNECT_TIMEOUT                      _CHIP_ERROR(97)
981
982 /**
983  *  @def CHIP_ERROR_DEVICE_AUTH_TIMEOUT
984  *
985  *  @brief
986  *    The attempt to authenticate device timed out.
987  *
988  */
989 #define CHIP_ERROR_DEVICE_AUTH_TIMEOUT                         _CHIP_ERROR(98)
990
991 /**
992  *  @def CHIP_ERROR_MESSAGE_NOT_ACKNOWLEDGED
993  *
994  *  @brief
995  *    A message is not acknowledged after max retries.
996  *
997  */
998 #define CHIP_ERROR_MESSAGE_NOT_ACKNOWLEDGED                    _CHIP_ERROR(99)
999
1000 /**
1001  *  @def CHIP_ERROR_RETRANS_TABLE_FULL
1002  *
1003  *  @brief
1004  *    A retransmission table is already full.
1005  *
1006  */
1007 #define CHIP_ERROR_RETRANS_TABLE_FULL                          _CHIP_ERROR(100)
1008
1009 /**
1010  *  @def CHIP_ERROR_INVALID_ACK_ID
1011  *
1012  *  @brief
1013  *    An acknowledgment id is invalid.
1014  *
1015  */
1016 #define CHIP_ERROR_INVALID_ACK_ID                              _CHIP_ERROR(101)
1017
1018 /**
1019  *  @def CHIP_ERROR_SEND_THROTTLED
1020  *
1021  *  @brief
1022  *    A send is throttled.
1023  *
1024  */
1025 #define CHIP_ERROR_SEND_THROTTLED                              _CHIP_ERROR(102)
1026
1027 /**
1028  *  @def CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE
1029  *
1030  *  @brief
1031  *    A message version is not supported by the current exchange context.
1032  *
1033  */
1034 #define CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE              _CHIP_ERROR(103)
1035
1036 /**
1037  *  @def CHIP_ERROR_TRANSACTION_CANCELED
1038  *
1039  *  @brief
1040  *    A transaction is cancelled.
1041  *
1042  */
1043 #define CHIP_ERROR_TRANSACTION_CANCELED                        _CHIP_ERROR(104)
1044
1045 /**
1046  *  @def CHIP_ERROR_LISTENER_ALREADY_STARTED
1047  *
1048  *  @brief
1049  *    A listener has already started.
1050  *
1051  */
1052 #define CHIP_ERROR_LISTENER_ALREADY_STARTED                    _CHIP_ERROR(105)
1053
1054 /**
1055  *  @def CHIP_ERROR_LISTENER_ALREADY_STOPPED
1056  *
1057  *  @brief
1058  *    A listener has already stopped.
1059  *
1060  */
1061 #define CHIP_ERROR_LISTENER_ALREADY_STOPPED                    _CHIP_ERROR(106)
1062
1063 /**
1064  *  @def CHIP_ERROR_UNKNOWN_TOPIC
1065  *
1066  *  @brief
1067  *    A topic ID was unknown to the recipient.
1068  *
1069  */
1070 #define CHIP_ERROR_UNKNOWN_TOPIC                               _CHIP_ERROR(107)
1071
1072 /**
1073  *  @def CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
1074  *
1075  *  @brief
1076  *    A CHIP feature is unsupported.
1077  *
1078  */
1079 #define CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE                   _CHIP_ERROR(108)
1080
1081 /**
1082  *  @def CHIP_ERROR_PASE_RECONFIGURE_REQUIRED
1083  *
1084  *  @brief
1085  *    PASE is required to reconfigure.
1086  *
1087  */
1088 #define CHIP_ERROR_PASE_RECONFIGURE_REQUIRED                   _CHIP_ERROR(109)
1089
1090 /**
1091  *  @def CHIP_ERROR_INVALID_PASE_CONFIGURATION
1092  *
1093  *  @brief
1094  *    A PASE configuration is invalid.
1095  *
1096  */
1097 #define CHIP_ERROR_INVALID_PASE_CONFIGURATION                  _CHIP_ERROR(110)
1098
1099 /**
1100  *  @def CHIP_ERROR_NO_COMMON_PASE_CONFIGURATIONS
1101  *
1102  *  @brief
1103  *    No PASE configuration is in common.
1104  *
1105  */
1106 #define CHIP_ERROR_NO_COMMON_PASE_CONFIGURATIONS               _CHIP_ERROR(111)
1107
1108 /**
1109  *  @def CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR
1110  *
1111  *  @brief
1112  *    An unsolicited message with the originator bit clear.
1113  *
1114  */
1115 #define CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR               _CHIP_ERROR(112)
1116
1117 /**
1118  *  @def CHIP_ERROR_INVALID_FABRIC_ID
1119  *
1120  *  @brief
1121  *    A fabric id is invalid.
1122  *
1123  */
1124 #define CHIP_ERROR_INVALID_FABRIC_ID                           _CHIP_ERROR(113)
1125
1126 /**
1127  *  @def CHIP_ERROR_DRBG_ENTROPY_SOURCE_FAILED
1128  *
1129  *  @brief
1130  *    DRBG entropy source failed to generate entropy data.
1131  *
1132  */
1133 #define CHIP_ERROR_DRBG_ENTROPY_SOURCE_FAILED                  _CHIP_ERROR(117)
1134
1135 /**
1136  *  @def CHIP_ERROR_TLV_TAG_NOT_FOUND
1137  *
1138  *  @brief
1139  *    A specified TLV tag was not found.
1140  *
1141  */
1142 #define CHIP_ERROR_TLV_TAG_NOT_FOUND                           _CHIP_ERROR(118)
1143
1144 /**
1145  *  @def CHIP_ERROR_INVALID_TOKENPAIRINGBUNDLE
1146  *
1147  *  @brief
1148  *    A token pairing bundle is invalid.
1149  *
1150  */
1151 #define CHIP_ERROR_INVALID_TOKENPAIRINGBUNDLE                  _CHIP_ERROR(119)
1152
1153 /**
1154  *  @def CHIP_ERROR_UNSUPPORTED_TOKENPAIRINGBUNDLE_VERSION
1155  *
1156  *  @brief
1157  *    A token pairing bundle is invalid.
1158  *
1159  */
1160 #define CHIP_ERROR_UNSUPPORTED_TOKENPAIRINGBUNDLE_VERSION      _CHIP_ERROR(120)
1161
1162 /**
1163  *  @def CHIP_ERROR_NO_TAKE_AUTH_DELEGATE
1164  *
1165  *  @brief
1166  *    No TAKE authentication delegate is set.
1167  *
1168  */
1169 #define CHIP_ERROR_NO_TAKE_AUTH_DELEGATE                       _CHIP_ERROR(121)
1170
1171 /**
1172  *  @def CHIP_ERROR_TAKE_RECONFIGURE_REQUIRED
1173  *
1174  *  @brief
1175  *    TAKE requires a reconfigure.
1176  *
1177  */
1178 #define CHIP_ERROR_TAKE_RECONFIGURE_REQUIRED                   _CHIP_ERROR(122)
1179
1180 /**
1181  *  @def CHIP_ERROR_TAKE_REAUTH_POSSIBLE
1182  *
1183  *  @brief
1184  *    TAKE can do a reauthentication.
1185  *
1186  */
1187 #define CHIP_ERROR_TAKE_REAUTH_POSSIBLE                        _CHIP_ERROR(123)
1188
1189 /**
1190  *  @def CHIP_ERROR_INVALID_TAKE_PARAMETER
1191  *
1192  *  @brief
1193  *    Received an invalid TAKE paramter.
1194  *
1195  */
1196 #define CHIP_ERROR_INVALID_TAKE_PARAMETER                      _CHIP_ERROR(124)
1197
1198 /**
1199  *  @def CHIP_ERROR_UNSUPPORTED_TAKE_CONFIGURATION
1200  *
1201  *  @brief
1202  *    This configuration is not supported by TAKE.
1203  *
1204  */
1205 #define CHIP_ERROR_UNSUPPORTED_TAKE_CONFIGURATION              _CHIP_ERROR(125)
1206
1207 /**
1208  *  @def CHIP_ERROR_TAKE_TOKEN_IDENTIFICATION_FAILED
1209  *
1210  *  @brief
1211  *    The TAKE Token Identification failed.
1212  *
1213  */
1214 #define CHIP_ERROR_TAKE_TOKEN_IDENTIFICATION_FAILED            _CHIP_ERROR(126)
1215
1216 /**
1217  *  @def CHIP_ERROR_KEY_NOT_FOUND_FROM_PEER
1218  *
1219  *  @brief
1220  *    The encryption key is not found error received from a peer node.
1221  *
1222  */
1223 #define CHIP_ERROR_KEY_NOT_FOUND_FROM_PEER                     _CHIP_ERROR(127)
1224
1225 /**
1226  *  @def CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER
1227  *
1228  *  @brief
1229  *    The wrong encryption type error received from a peer node.
1230  *
1231  */
1232 #define CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER             _CHIP_ERROR(128)
1233
1234 /**
1235  *  @def CHIP_ERROR_UNKNOWN_KEY_TYPE_FROM_PEER
1236  *
1237  *  @brief
1238  *    The unknown key type error received from a peer node.
1239  *
1240  */
1241 #define CHIP_ERROR_UNKNOWN_KEY_TYPE_FROM_PEER                  _CHIP_ERROR(129)
1242
1243 /**
1244  *  @def CHIP_ERROR_INVALID_USE_OF_SESSION_KEY_FROM_PEER
1245  *
1246  *  @brief
1247  *    The invalid use of session key error received from a peer node.
1248  *
1249  */
1250 #define CHIP_ERROR_INVALID_USE_OF_SESSION_KEY_FROM_PEER        _CHIP_ERROR(130)
1251
1252 /**
1253  *  @def CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE_FROM_PEER
1254  *
1255  *  @brief
1256  *    An unsupported encryption type error received from a peer node.
1257  *
1258  */
1259 #define CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE_FROM_PEER       _CHIP_ERROR(131)
1260
1261 /**
1262  *  @def CHIP_ERROR_INTERNAL_KEY_ERROR_FROM_PEER
1263  *
1264  *  @brief
1265  *    The internal key error received from a peer node.
1266  *
1267  */
1268 #define CHIP_ERROR_INTERNAL_KEY_ERROR_FROM_PEER                _CHIP_ERROR(132)
1269
1270 /**
1271  *  @def CHIP_ERROR_INVALID_KEY_ID
1272  *
1273  *  @brief
1274  *    A key id is invalid.
1275  *
1276  */
1277 #define CHIP_ERROR_INVALID_KEY_ID                              _CHIP_ERROR(133)
1278
1279 /**
1280  *  @def CHIP_ERROR_INVALID_TIME
1281  *
1282  *  @brief
1283  *    Time has invalid value.
1284  *
1285  */
1286 #define CHIP_ERROR_INVALID_TIME                                _CHIP_ERROR(134)
1287
1288 /**
1289  *  @def CHIP_ERROR_LOCKING_FAILURE
1290  *
1291  *  @brief
1292  *    Failure to acquire or release an OS provided mutex.
1293  *
1294  */
1295 #define CHIP_ERROR_LOCKING_FAILURE                             _CHIP_ERROR(135)
1296
1297 /**
1298  *  @def CHIP_ERROR_UNSUPPORTED_PASSCODE_CONFIG
1299  *
1300  *  @brief
1301  *    A passcode encryption configuration is unsupported.
1302  *
1303  */
1304 #define CHIP_ERROR_UNSUPPORTED_PASSCODE_CONFIG                 _CHIP_ERROR(136)
1305
1306 /**
1307  *  @def CHIP_ERROR_PASSCODE_AUTHENTICATION_FAILED
1308  *
1309  *  @brief
1310  *    The CHIP passcode authentication failed.
1311  *
1312  */
1313 #define CHIP_ERROR_PASSCODE_AUTHENTICATION_FAILED              _CHIP_ERROR(137)
1314
1315 /**
1316  *  @def CHIP_ERROR_PASSCODE_FINGERPRINT_FAILED
1317  *
1318  *  @brief
1319  *    The CHIP passcode fingerprint failed.
1320  *
1321  */
1322 #define CHIP_ERROR_PASSCODE_FINGERPRINT_FAILED                 _CHIP_ERROR(138)
1323
1324 /**
1325  *  @def CHIP_ERROR_SERIALIZATION_ELEMENT_NULL
1326  *
1327  *  @brief
1328  *      The element of the struct is null.
1329  *
1330  */
1331 #define CHIP_ERROR_SERIALIZATION_ELEMENT_NULL                  _CHIP_ERROR(139)
1332
1333 /**
1334  *  @def CHIP_ERROR_WRONG_CERT_SIGNATURE_ALGORITHM
1335  *
1336  *  @brief
1337  *    The certificate was not signed using the required signature algorithm.
1338  *
1339  */
1340 #define CHIP_ERROR_WRONG_CERT_SIGNATURE_ALGORITHM              _CHIP_ERROR(140)
1341
1342 /**
1343  *  @def CHIP_ERROR_WRONG_CHIP_SIGNATURE_ALGORITHM
1344  *
1345  *  @brief
1346  *    The CHIP signature was not signed using the required signature algorithm.
1347  *
1348  */
1349 #define CHIP_ERROR_WRONG_CHIP_SIGNATURE_ALGORITHM             _CHIP_ERROR(141)
1350
1351 /**
1352  *  @def CHIP_ERROR_SCHEMA_MISMATCH
1353  *
1354  *  @brief
1355  *    A mismatch in schema was encountered.
1356  *
1357  */
1358 #define CHIP_ERROR_SCHEMA_MISMATCH                            _CHIP_ERROR(142)
1359
1360 /**
1361  *  @def CHIP_ERROR_INVALID_INTEGER_VALUE
1362  *
1363  *  @brief
1364  *    An integer does not have the kind of value we expect.
1365  *
1366  */
1367 #define CHIP_ERROR_INVALID_INTEGER_VALUE                       _CHIP_ERROR(143)
1368
1369 /**
1370  *  @def CHIP_ERROR_CASE_RECONFIG_REQUIRED
1371  *
1372  *  @brief
1373  *    CASE is required to reconfigure.
1374  *
1375  */
1376 #define CHIP_ERROR_CASE_RECONFIG_REQUIRED                      _CHIP_ERROR(144)
1377
1378 /**
1379  *  @def CHIP_ERROR_TOO_MANY_CASE_RECONFIGURATIONS
1380  *
1381  *  @brief
1382  *    Too many CASE reconfigurations were received.
1383  *
1384  */
1385 #define CHIP_ERROR_TOO_MANY_CASE_RECONFIGURATIONS              _CHIP_ERROR(145)
1386
1387 /**
1388  *  @def CHIP_ERROR_BAD_REQUEST
1389  *
1390  *  @brief
1391  *    The request cannot be processed or fulfilled
1392  *
1393  */
1394 #define CHIP_ERROR_BAD_REQUEST                                 _CHIP_ERROR(146)
1395
1396 /**
1397  *  @def CHIP_ERROR_INVALID_MESSAGE_FLAG
1398  *
1399  *  @brief
1400  *    One or more message flags have invalid value.
1401  *
1402  */
1403 #define CHIP_ERROR_INVALID_MESSAGE_FLAG                        _CHIP_ERROR(147)
1404
1405 /**
1406  *  @def CHIP_ERROR_KEY_EXPORT_RECONFIGURE_REQUIRED
1407  *
1408  *  @brief
1409  *    Key export protocol required to reconfigure.
1410  *
1411  */
1412 #define CHIP_ERROR_KEY_EXPORT_RECONFIGURE_REQUIRED             _CHIP_ERROR(148)
1413
1414 /**
1415  *  @def CHIP_ERROR_INVALID_KEY_EXPORT_CONFIGURATION
1416  *
1417  *  @brief
1418  *    A key export protocol configuration is invalid.
1419  *
1420  */
1421 #define CHIP_ERROR_INVALID_KEY_EXPORT_CONFIGURATION            _CHIP_ERROR(149)
1422
1423 /**
1424  *  @def CHIP_ERROR_NO_COMMON_KEY_EXPORT_CONFIGURATIONS
1425  *
1426  *  @brief
1427  *    No key export protocol configuration is in common.
1428  *
1429  */
1430 #define CHIP_ERROR_NO_COMMON_KEY_EXPORT_CONFIGURATIONS         _CHIP_ERROR(150)
1431
1432 /**
1433  *  @def CHIP_ERROR_NO_KEY_EXPORT_DELEGATE
1434  *
1435  *  @brief
1436  *    No key export delegate is set.
1437  *
1438  */
1439 #define CHIP_ERROR_NO_KEY_EXPORT_DELEGATE                      _CHIP_ERROR(151)
1440
1441 /**
1442  *  @def CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_REQUEST
1443  *
1444  *  @brief
1445  *    Unauthorized key export request.
1446  *
1447  */
1448 #define CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_REQUEST             _CHIP_ERROR(152)
1449
1450 /**
1451  *  @def CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_RESPONSE
1452  *
1453  *  @brief
1454  *    Unauthorized key export response.
1455  *
1456  */
1457 #define CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_RESPONSE            _CHIP_ERROR(153)
1458
1459 /**
1460  *  @def CHIP_ERROR_EXPORTED_KEY_AUTHENTICATION_FAILED
1461  *
1462  *  @brief
1463  *    The CHIP exported encrypted key authentication failed.
1464  *
1465  */
1466 #define CHIP_ERROR_EXPORTED_KEY_AUTHENTICATION_FAILED          _CHIP_ERROR(154)
1467
1468 /**
1469  *  @def CHIP_ERROR_TOO_MANY_SHARED_SESSION_END_NODES
1470  *
1471  *  @brief
1472  *    The number of shared secure sessions end nodes exceeds
1473  *    the maximum limit.
1474  *
1475  */
1476 #define CHIP_ERROR_TOO_MANY_SHARED_SESSION_END_NODES           _CHIP_ERROR(155)
1477
1478 /**
1479  * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_ELEMENT
1480  *
1481  * @brief
1482  *   The Attribute DataElement is malformed: it either does not contain
1483  *   the required elements
1484  */
1485 #define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_ELEMENT         _CHIP_ERROR(156)
1486
1487 /**
1488  * @def CHIP_ERROR_WRONG_CERT_TYPE
1489  *
1490  * @brief
1491  *   The presented certificate was of the wrong type.
1492  */
1493 #define CHIP_ERROR_WRONG_CERT_TYPE                             _CHIP_ERROR(157)
1494
1495 /**
1496  * @def CHIP_ERROR_DEFAULT_EVENT_HANDLER_NOT_CALLED
1497  *
1498  * @brief
1499  *   The application's event handler failed to call the default event handler function
1500  *   when presented with an unknown event.
1501  */
1502 #define CHIP_ERROR_DEFAULT_EVENT_HANDLER_NOT_CALLED            _CHIP_ERROR(158)
1503
1504 /**
1505  *  @def CHIP_ERROR_PERSISTED_STORAGE_FAILED
1506  *
1507  *  @brief
1508  *    Persisted storage memory read/write failure.
1509  *
1510  */
1511 #define CHIP_ERROR_PERSISTED_STORAGE_FAILED                    _CHIP_ERROR(159)
1512
1513 /**
1514  *  @def CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND
1515  *
1516  *  @brief
1517  *    The specific value is not found in the persisted storage.
1518  *
1519  */
1520 #define CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND           _CHIP_ERROR(160)
1521
1522 /**
1523  *  @def CHIP_ERROR_PROFILE_STRING_CONTEXT_ALREADY_REGISTERED
1524  *
1525  *  @brief
1526  *    The specified profile string support context is already registered.
1527  *
1528  */
1529 #define CHIP_ERROR_PROFILE_STRING_CONTEXT_ALREADY_REGISTERED   _CHIP_ERROR(161)
1530
1531 /**
1532  *  @def CHIP_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED
1533  *
1534  *  @brief
1535  *    The specified profile string support context is not registered.
1536  *
1537  */
1538 #define CHIP_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED       _CHIP_ERROR(162)
1539
1540 /**
1541  *  @def CHIP_ERROR_INCOMPATIBLE_SCHEMA_VERSION
1542  *
1543  *  @brief
1544  *    Encountered a mismatch in compatibility w.r.t to IDL schema version
1545  */
1546 #define CHIP_ERROR_INCOMPATIBLE_SCHEMA_VERSION                 _CHIP_ERROR(163)
1547
1548 /**
1549  *  @def CHIP_ERROR_MISMATCH_UPDATE_REQUIRED_VERSION
1550  *
1551  *  @brief
1552  *    Encountered a mismatch between update required version and current version
1553  */
1554 #define CHIP_ERROR_MISMATCH_UPDATE_REQUIRED_VERSION            _CHIP_ERROR(164)
1555
1556
1557 /**
1558  *  @def CHIP_ERROR_ACCESS_DENIED
1559  *
1560  *  @brief
1561  *    The CHIP message is not granted access for further processing.
1562  */
1563 #define CHIP_ERROR_ACCESS_DENIED                               _CHIP_ERROR(165)
1564
1565 /**
1566  *  @def CHIP_ERROR_UNKNOWN_RESOURCE_ID
1567  *
1568  *  @brief
1569  *    Unknown resource ID
1570  *
1571  */
1572 #define CHIP_ERROR_UNKNOWN_RESOURCE_ID                         _CHIP_ERROR(166)
1573
1574 /**
1575  * @def CHIP_ERROR_VERSION_MISMATCH
1576  *
1577  * @brief
1578  *   The conditional update of a trait instance path has failed
1579  *   because the local changes are based on an obsolete version of the
1580  *   data.
1581  */
1582 #define CHIP_ERROR_VERSION_MISMATCH                            _CHIP_ERROR(167)
1583
1584 /**
1585  *  @def CHIP_ERROR_UNSUPPORTED_THREAD_NETWORK_CREATE
1586  *
1587  *  @brief
1588  *    Device doesn't support standalone Thread network creation.
1589  *    On some legacy devices new Thread network can only be created
1590  *    together with CHIP Fabric using CrateFabric() message.
1591  *
1592  */
1593 #define CHIP_ERROR_UNSUPPORTED_THREAD_NETWORK_CREATE           _CHIP_ERROR(168)
1594
1595 /**
1596  *  @def CHIP_ERROR_INCONSISTENT_CONDITIONALITY
1597  *
1598  *  @brief
1599  *    A TraitPath was declared updated with a conditionality that
1600  *    does not match that of other TraitPaths already updated in the
1601  *    same Trait Instance.
1602  *
1603  */
1604 #define CHIP_ERROR_INCONSISTENT_CONDITIONALITY                 _CHIP_ERROR(169)
1605
1606 /**
1607  *  @def CHIP_ERROR_LOCAL_DATA_INCONSISTENT
1608  *
1609  *  @brief
1610  *    The local data does not match any known version of the
1611  *    Trait Instance and cannot support the operation requested.
1612  *
1613  */
1614 #define CHIP_ERROR_LOCAL_DATA_INCONSISTENT                     _CHIP_ERROR(170)
1615
1616 /**
1617  * @def CHIP_EVENT_ID_FOUND
1618  *
1619  * @brief
1620  *   Event ID matching the criteria was found
1621  */
1622 #define CHIP_EVENT_ID_FOUND                                    _CHIP_ERROR(171)
1623
1624 /**
1625  * @def CHIP_ERROR_INTERNAL
1626  *
1627  * @brief
1628  *   Internal error
1629  */
1630 #define CHIP_ERROR_INTERNAL                                    _CHIP_ERROR(172)
1631
1632 /**
1633  * @def CHIP_ERROR_OPEN_FAILED
1634  *
1635  * @brief
1636  *   Open file failed
1637  */
1638 #define CHIP_ERROR_OPEN_FAILED                                 _CHIP_ERROR(173)
1639
1640 /**
1641  * @def CHIP_ERROR_READ_FAILED
1642  *
1643  * @brief
1644  *   Read from file failed
1645  */
1646 #define CHIP_ERROR_READ_FAILED                                 _CHIP_ERROR(174)
1647
1648 /**
1649  * @def CHIP_ERROR_WRITE_FAILED
1650  *
1651  * @brief
1652  *   Write to file failed
1653  */
1654 #define CHIP_ERROR_WRITE_FAILED                                _CHIP_ERROR(175)
1655
1656 /**
1657  * @def CHIP_ERROR_DECODE_FAILED
1658  *
1659  * @brief
1660  *   Decoding failed
1661  */
1662 #define CHIP_ERROR_DECODE_FAILED                               _CHIP_ERROR(176)
1663
1664
1665 /**
1666  *  @def CHIP_ERROR_SESSION_KEY_SUSPENDED
1667  *
1668  *  @brief
1669  *    Use of the identified session key is suspended.
1670  *
1671  */
1672 #define CHIP_ERROR_SESSION_KEY_SUSPENDED                       _CHIP_ERROR(177)
1673
1674 /**
1675  *  @def CHIP_ERROR_UNSUPPORTED_WIRELESS_REGULATORY_DOMAIN
1676  *
1677  *  @brief
1678  *    The specified wireless regulatory domain is unsupported.
1679  *
1680  */
1681 #define CHIP_ERROR_UNSUPPORTED_WIRELESS_REGULATORY_DOMAIN      _CHIP_ERROR(178)
1682
1683 /**
1684  *  @def CHIP_ERROR_UNSUPPORTED_WIRELESS_OPERATING_LOCATION
1685  *
1686  *  @brief
1687  *    The specified wireless operating location is unsupported.
1688  *
1689  */
1690 #define CHIP_ERROR_UNSUPPORTED_WIRELESS_OPERATING_LOCATION     _CHIP_ERROR(179)
1691
1692 /**
1693  *  @def CHIP_ERROR_MDNS_COLLISSION
1694  *
1695  *  @brief
1696  *    The registered service name has collision on the LAN.
1697  *
1698  */
1699 #define CHIP_ERROR_MDNS_COLLISSION _CHIP_ERROR(180)
1700
1701 /**
1702  * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH
1703  *
1704  * @brief
1705  *   The Attribute path is malformed: it either does not contain
1706  *   the required path
1707  */
1708 #define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH                      _CHIP_ERROR(181)
1709
1710 /**
1711  * @def CHIP_ERROR_IM_MALFORMED_EVENT_PATH
1712  *
1713  * @brief
1714  *   The Attribute Path is malformed: it either does not contain
1715  *   the required elements
1716  */
1717 #define CHIP_ERROR_IM_MALFORMED_EVENT_PATH                         _CHIP_ERROR(182)
1718
1719 /**
1720  * @def CHIP_ERROR_IM_MALFORMED_COMMAND_PATH
1721  *
1722  * @brief
1723  *   The Attribute DataElement is malformed: it either does not contain
1724  *   the required elements
1725  */
1726 #define CHIP_ERROR_IM_MALFORMED_COMMAND_PATH                     _CHIP_ERROR(183)
1727
1728 /**
1729  * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_STATUS_ELEMENT
1730  *
1731  * @brief
1732  *   The Attribute DataElement is malformed: it either does not contain
1733  *   the required elements
1734  */
1735 #define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_STATUS_ELEMENT                      _CHIP_ERROR(184)
1736
1737 /**
1738  * @def CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT
1739  *
1740  * @brief
1741  *   The Attribute DataElement is malformed: it either does not contain
1742  *   the required elements
1743  */
1744 #define CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT                      _CHIP_ERROR(185)
1745
1746 /**
1747  * @def CHIP_ERROR_IM_MALFORMED_EVENT_DATA_ELEMENT
1748  *
1749  * @brief
1750  *   The Event DataElement is malformed: it either does not contain
1751  *   the required elements
1752  */
1753 #define CHIP_ERROR_IM_MALFORMED_EVENT_DATA_ELEMENT                       _CHIP_ERROR(186)
1754
1755 /**
1756  * @def CHIP_ERROR_IM_MALFORMED_STATUS_CODE
1757  *
1758  * @brief
1759  *   The Attribute DataElement is malformed: it either does not contain
1760  *   the required elements
1761  */
1762 #define CHIP_ERROR_IM_MALFORMED_STATUS_CODE                      _CHIP_ERROR(187)
1763
1764 /**
1765  * @def CHIP_ERROR_PEER_NODE_NOT_FOUND
1766  *
1767  * @brief
1768  *   Unable to find the peer node
1769  */
1770 #define CHIP_ERROR_PEER_NODE_NOT_FOUND                           _CHIP_ERROR(188)
1771
1772 /**
1773  *  @}
1774  */
1775
1776 // !!!!! IMPORTANT !!!!!  If you add new CHIP errors, please update the translation
1777 // of error codes to strings in CHIPError.cpp, and add them to unittest
1778 // in test-apps/TestErrorStr.cpp
1779
1780 // clang-format on
1781
1782 namespace chip {
1783
1784 extern void RegisterCHIPLayerErrorFormatter();
1785 extern bool FormatCHIPError(char * buf, uint16_t bufSize, int32_t err);
1786
1787 } // namespace chip