Line data Source code
1 : /*
2 : *
3 : * Copyright (c) 2020-2022 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 :
29 : #pragma once
30 :
31 : #include <lib/core/CHIPConfig.h>
32 : #include <lib/support/TypeTraits.h>
33 :
34 : #include <inttypes.h>
35 : #include <limits>
36 : #include <type_traits>
37 :
38 : #if CHIP_CONFIG_ERROR_SOURCE && __cplusplus >= 202002L
39 : #include <source_location>
40 : #endif // CHIP_CONFIG_ERROR_SOURCE && __cplusplus >= 202002L
41 :
42 : namespace chip {
43 :
44 : /**
45 : * This class represents CHIP errors.
46 : *
47 : * At the top level, an error belongs to a Range and has an integral Value whose meaning depends on the Range.
48 : * One, Range::kSDK, is used for the CHIP SDK's own errors; others encapsulate error codes from external sources
49 : * (e.g. libraries, OS) into a CHIP_ERROR.
50 : *
51 : * CHIP SDK errors inside Range::kSDK consist of a component identifier given by SdkPart and an arbitrary small
52 : * integer Code.
53 : */
54 : class ChipError
55 : {
56 : public:
57 : /// Internal representation of an error.
58 : using StorageType = uint32_t;
59 :
60 : /// Type for encapsulated error values.
61 : using ValueType = StorageType;
62 :
63 : /// Integer `printf` format for errors. This is a C macro in order to allow for string literal concatenation.
64 : #define CHIP_ERROR_INTEGER_FORMAT PRIx32
65 :
66 : #if CHIP_CONFIG_ERROR_FORMAT_AS_STRING
67 :
68 : /// Type returned by Format().
69 : using FormatType = const char *;
70 : /// `printf` format for Format(). This is a C macro in order to allow for string literal concatenation.
71 : #define CHIP_ERROR_FORMAT "s"
72 :
73 : #else // CHIP_CONFIG_ERROR_FORMAT_AS_STRING
74 :
75 : /// Type returned by Format().
76 : using FormatType = StorageType;
77 : /// `printf` format for Format(). This is a C macro in order to allow for string literal concatenation.
78 : #define CHIP_ERROR_FORMAT CHIP_ERROR_INTEGER_FORMAT
79 :
80 : #endif // CHIP_CONFIG_ERROR_FORMAT_AS_STRING
81 :
82 : /**
83 : * Top-level error classification.
84 : *
85 : * Every error belongs to a Range and has an integral Value whose meaning depends on the Range.
86 : * All native CHIP SDK errors belong to the kSDK range. Other ranges are used to encapsulate error
87 : * codes from other subsystems (e.g. platform or library) used by the CHIP SDK.
88 : */
89 : enum class Range : uint8_t
90 : {
91 : kSDK = 0x0, ///< CHIP SDK errors.
92 : kOS = 0x1, ///< Encapsulated OS errors, other than POSIX errno.
93 : kPOSIX = 0x2, ///< Encapsulated POSIX errno values.
94 : kLwIP = 0x3, ///< Encapsulated LwIP errors.
95 : kOpenThread = 0x4, ///< Encapsulated OpenThread errors.
96 : kPlatform = 0x5, ///< Platform-defined encapsulation.
97 : kLastRange = kPlatform,
98 : };
99 :
100 : /**
101 : * Secondary classification of CHIP SDK errors (Range::kSDK).
102 : */
103 : enum class SdkPart : uint8_t
104 : {
105 : kCore = 0, ///< SDK core errors.
106 : kInet = 1, ///< Inet layer errors; see <inet/InetError.h>.
107 : kDevice = 2, ///< Device layer errors; see <platform/CHIPDeviceError.h>.
108 : kASN1 = 3, ///< ASN1 errors; see <asn1/ASN1Error.h>.
109 : kBLE = 4, ///< BLE layer errors; see <ble/BleError.h>.
110 : kIMGlobalStatus = 5, ///< Interaction Model global status code.
111 : kIMClusterStatus = 6, ///< Interaction Model cluster-specific status code.
112 : kApplication = 7, ///< Application-defined errors; see CHIP_APPLICATION_ERROR
113 : };
114 :
115 : ChipError() = default;
116 :
117 : // Helper for declaring constructors without too much repetition.
118 : #if CHIP_CONFIG_ERROR_SOURCE
119 : #if __cplusplus >= 202002L
120 : #define CHIP_INITIALIZE_ERROR_SOURCE(f, l, loc) , mFile((f)), mLine((l)), mSourceLocation((loc))
121 : #else
122 : #define CHIP_INITIALIZE_ERROR_SOURCE(f, l, loc) , mFile((f)), mLine((l))
123 : #endif // __cplusplus >= 202002L
124 : #else // CHIP_CONFIG_ERROR_SOURCE
125 : #define CHIP_INITIALIZE_ERROR_SOURCE(f, l, loc)
126 : #endif // CHIP_CONFIG_ERROR_SOURCE
127 :
128 : /**
129 : * Construct a CHIP_ERROR encapsulating @a value inside the Range @a range.
130 : *
131 : * @note
132 : * The result is valid only if CanEncapsulate() is true.
133 : */
134 0 : constexpr ChipError(Range range, ValueType value) : ChipError(range, value, /*file=*/nullptr, /*line=*/0) {}
135 : #if CHIP_CONFIG_ERROR_SOURCE && __cplusplus >= 202002L
136 : constexpr ChipError(Range range, ValueType value, const char * file, unsigned int line,
137 : std::source_location location = std::source_location::current()) :
138 : mError(MakeInteger(range, (value & MakeMask(0, kValueLength)))) CHIP_INITIALIZE_ERROR_SOURCE(file, line, location)
139 : {}
140 : #else
141 15167 : constexpr ChipError(Range range, ValueType value, const char * file, unsigned int line) :
142 15167 : mError(MakeInteger(range, (value & MakeMask(0, kValueLength)))) CHIP_INITIALIZE_ERROR_SOURCE(file, line, /*loc=*/nullptr)
143 15167 : {}
144 : #endif // CHIP_CONFIG_ERROR_SOURCE && __cplusplus >= 202002L
145 :
146 : /**
147 : * Construct a CHIP_ERROR for SdkPart @a part with @a code.
148 : *
149 : * @note
150 : * The macro version CHIP_SDK_ERROR checks that the numeric value is constant and well-formed.
151 : */
152 120 : constexpr ChipError(SdkPart part, uint8_t code) : ChipError(part, code, /*file=*/nullptr, /*line=*/0) {}
153 : #if CHIP_CONFIG_ERROR_SOURCE && __cplusplus >= 202002L
154 : constexpr ChipError(SdkPart part, uint8_t code, const char * file, unsigned int line,
155 : std::source_location location = std::source_location::current()) :
156 : mError(MakeInteger(part, code)) CHIP_INITIALIZE_ERROR_SOURCE(file, line, location)
157 : {}
158 : #else
159 138 : constexpr ChipError(SdkPart part, uint8_t code, const char * file, unsigned int line) :
160 138 : mError(MakeInteger(part, code)) CHIP_INITIALIZE_ERROR_SOURCE(file, line, /*loc=*/nullptr)
161 138 : {}
162 : #endif // CHIP_CONFIG_ERROR_SOURCE && __cplusplus >= 202002L
163 :
164 : /**
165 : * Construct a CHIP_ERROR constant for SdkPart @a part with @a code at the current source line.
166 : * This checks that the numeric value is constant and well-formed.
167 : * (In C++20 this could be replaced by a consteval constructor.)
168 : */
169 : #if CHIP_CONFIG_ERROR_SOURCE
170 : #define CHIP_SDK_ERROR(part, code) \
171 : (::chip::ChipError(::chip::ChipError::SdkErrorConstant<(part), (code)>::value, __FILE__, __LINE__))
172 : #else // CHIP_CONFIG_ERROR_SOURCE
173 : #define CHIP_SDK_ERROR(part, code) (::chip::ChipError(::chip::ChipError::SdkErrorConstant<(part), (code)>::value))
174 : #endif // CHIP_CONFIG_ERROR_SOURCE
175 :
176 : /**
177 : * Construct a CHIP_ERROR from the underlying storage type.
178 : *
179 : * @note
180 : * This is intended to be used only in foreign function interfaces.
181 : */
182 : explicit constexpr ChipError(StorageType error) : ChipError(error, /*file=*/nullptr, /*line=*/0) {}
183 : #if CHIP_CONFIG_ERROR_SOURCE && __cplusplus >= 202002L
184 : explicit constexpr ChipError(StorageType error, const char * file, unsigned int line,
185 : std::source_location location = std::source_location::current()) :
186 : mError(error) CHIP_INITIALIZE_ERROR_SOURCE(file, line, location)
187 : {}
188 : #else
189 170886880 : explicit constexpr ChipError(StorageType error, const char * file, unsigned int line) :
190 170886880 : mError(error) CHIP_INITIALIZE_ERROR_SOURCE(file, line, /*loc=*/nullptr)
191 170886880 : {}
192 : #endif // CHIP_CONFIG_ERROR_SOURCE && __cplusplus >= 202002L
193 :
194 : #undef CHIP_INITIALIZE_ERROR_SOURCE
195 :
196 : /**
197 : * Compare errors for equality.
198 : *
199 : * @note
200 : * This only compares the error code. Under the CHIP_CONFIG_ERROR_SOURCE configuration, errors compare equal
201 : * if they have the same error code, even if they have different source locations.
202 : */
203 2893903 : bool operator==(const ChipError & other) const { return mError == other.mError; }
204 22534181 : bool operator!=(const ChipError & other) const { return mError != other.mError; }
205 :
206 : /**
207 : * Return an integer code for the error.
208 : */
209 577 : constexpr StorageType AsInteger() const { return mError; }
210 :
211 : /*
212 : * IsSuccess() is intended to support macros that can take either a ChipError or an integer error code.
213 : * The latter follows the C convention that a non-zero integer indicates an error.
214 : *
215 : * @note
216 : * Normal code should use `status == CHIP_NO_ERROR` rather than `IsSuccess(status)`.
217 : */
218 102297138 : static constexpr bool IsSuccess(ChipError error) { return error.mError == 0; }
219 : static constexpr bool IsSuccess(StorageType error) { return error == 0; }
220 :
221 : /**
222 : * Format an @a error for printing.
223 : *
224 : * Normally, this is used with the `printf()`-style macro CHIP_ERROR_FORMAT.
225 : * For example,
226 : * @code
227 : * ChipLogError(subsystem, "A bad thing happened! %" CHIP_ERROR_FORMAT, status.Format());
228 : * @endcode
229 : */
230 : #if CHIP_CONFIG_ERROR_FORMAT_AS_STRING
231 286 : FormatType Format() const { return AsString(); }
232 : #else // CHIP_CONFIG_ERROR_FORMAT_AS_STRING
233 : FormatType Format() const { return mError; }
234 : #endif // CHIP_CONFIG_ERROR_FORMAT_AS_STRING
235 :
236 : /**
237 : * Format an @a error as a string for printing.
238 : *
239 : * @note
240 : * Normally, prefer to use Format()
241 : */
242 2720 : const char * AsString(bool withSourceLocation = true) const
243 : {
244 : extern const char * ErrorStr(ChipError, bool);
245 2720 : return ErrorStr(*this, withSourceLocation);
246 : }
247 :
248 : /**
249 : * Test whether @a error belongs to the Range @a range.
250 : */
251 57 : constexpr bool IsRange(Range range) const
252 : {
253 57 : return (mError & MakeMask(kRangeStart, kRangeLength)) == MakeField(kRangeStart, static_cast<StorageType>(range));
254 : }
255 :
256 : /**
257 : * Get the Range to which the @a error belongs.
258 : */
259 : constexpr Range GetRange() const { return static_cast<Range>(GetField(kRangeStart, kRangeLength, mError)); }
260 :
261 : /**
262 : * Get the encapsulated value of an @a error.
263 : */
264 12 : constexpr ValueType GetValue() const { return GetField(kValueStart, kValueLength, mError); }
265 :
266 : /**
267 : * Test whether type @a T can always be losslessly encapsulated in a CHIP_ERROR.
268 : */
269 : template <typename T>
270 : static constexpr bool CanEncapsulate()
271 : {
272 : return std::numeric_limits<typename std::make_unsigned_t<T>>::digits <= kValueLength;
273 : }
274 :
275 : /**
276 : * Test whether if @a value can be losslessly encapsulated in a CHIP_ERROR.
277 : */
278 : template <typename T>
279 : static constexpr bool CanEncapsulate(T value)
280 : {
281 : return CanEncapsulate<T>() || FitsInField(kValueLength, static_cast<ValueType>(value));
282 : }
283 :
284 : /**
285 : * Test whether @a error is an SDK error belonging to the SdkPart @a part.
286 : */
287 4265 : constexpr bool IsPart(SdkPart part) const
288 : {
289 4265 : return (mError & (MakeMask(kRangeStart, kRangeLength) | MakeMask(kSdkPartStart, kSdkPartLength))) ==
290 4265 : (MakeField(kRangeStart, static_cast<StorageType>(Range::kSDK)) |
291 4265 : MakeField(kSdkPartStart, static_cast<StorageType>(part)));
292 : }
293 :
294 : /**
295 : * Get the SDK code for an SDK error.
296 : */
297 75 : constexpr uint8_t GetSdkCode() const { return static_cast<uint8_t>(GetField(kSdkCodeStart, kSdkCodeLength, mError)); }
298 :
299 : /**
300 : * Test whether @a error is an SDK error representing an Interaction Model
301 : * status. If it is, it can be converted to/from an interaction model
302 : * StatusIB struct.
303 : */
304 189 : constexpr bool IsIMStatus() const
305 : {
306 : // Open question: should CHIP_NO_ERROR be treated as an IM status for
307 : // purposes of this test?
308 189 : return IsPart(SdkPart::kIMGlobalStatus) || IsPart(SdkPart::kIMClusterStatus);
309 : }
310 :
311 : #if CHIP_CONFIG_ERROR_SOURCE
312 :
313 : /**
314 : * Get the source file name of the point where the error occurred.
315 : *
316 : * @note
317 : * This will be `nullptr` if the error was not created with a file name.
318 : */
319 2838 : const char * GetFile() const { return mFile; }
320 :
321 : /**
322 : * Get the source line number of the point where the error occurred.
323 : *
324 : * @note
325 : * This will be 0 if the error was not created with a file name.
326 : */
327 3075 : unsigned int GetLine() const { return mLine; }
328 :
329 : #if __cplusplus >= 202002L
330 : /**
331 : * Get the source_location of the point where the error occurred.
332 : */
333 : const std::source_location & GetSourceLocation() { return mSourceLocation; }
334 : #endif // __cplusplus >= 202002L
335 : #endif // CHIP_CONFIG_ERROR_SOURCE
336 :
337 : private:
338 : /*
339 : * The representation of a CHIP_ERROR is structured so that SDK error code constants are small, in order to improve code
340 : * density on embedded builds. Arm 32, Xtensa, and RISC-V can all handle 11-bit values in a move-immediate instruction.
341 : * Further, SdkPart::kCore is 0 so that the most common errors fit in 8 bits for additional density on some processors.
342 : *
343 : * 31 28 24 20 16 12 8 4 0 Bit
344 : * | | | | | | | | |
345 : * | range | value |
346 : * | kSdk==0 | 0 |0| part| code | SDK error
347 : * | 01 - FF | encapsulated error code | Encapsulated error
348 : */
349 : static constexpr int kRangeStart = 24;
350 : static constexpr int kRangeLength = 8;
351 : static constexpr int kValueStart = 0;
352 : static constexpr int kValueLength = 24;
353 :
354 : static constexpr int kSdkPartStart = 8;
355 : static constexpr int kSdkPartLength = 3;
356 : static constexpr int kSdkCodeStart = 0;
357 : static constexpr int kSdkCodeLength = 8;
358 :
359 87 : static constexpr StorageType GetField(unsigned int start, unsigned int length, StorageType value)
360 : {
361 87 : return (value >> start) & ((1u << length) - 1);
362 : }
363 20392 : static constexpr StorageType MakeMask(unsigned int start, unsigned int length) { return ((1u << length) - 1) << start; }
364 39617 : static constexpr StorageType MakeField(unsigned int start, StorageType value) { return value << start; }
365 : static constexpr bool FitsInField(unsigned int length, StorageType value) { return value < (1u << length); }
366 :
367 15305 : static constexpr StorageType MakeInteger(Range range, StorageType value)
368 : {
369 15305 : return MakeField(kRangeStart, to_underlying(range)) | MakeField(kValueStart, value);
370 : }
371 138 : static constexpr StorageType MakeInteger(SdkPart part, uint8_t code)
372 : {
373 138 : return MakeInteger(Range::kSDK, MakeField(kSdkPartStart, to_underlying(part)) | MakeField(kSdkCodeStart, code));
374 : }
375 : template <unsigned int START, unsigned int LENGTH>
376 : struct MaskConstant
377 : {
378 : static constexpr StorageType value = ((1u << LENGTH) - 1) << START;
379 : };
380 :
381 : // Assert that Range and Value fields fit in StorageType and don't overlap.
382 : static_assert(kRangeStart + kRangeLength <= std::numeric_limits<StorageType>::digits, "Range does not fit in StorageType");
383 : static_assert(kValueStart + kValueLength <= std::numeric_limits<StorageType>::digits, "Value does not fit in StorageType");
384 : static_assert((MaskConstant<kRangeStart, kRangeLength>::value & MaskConstant<kValueStart, kValueLength>::value) == 0,
385 : "Range and Value overlap");
386 :
387 : // Assert that SDK Part and Code fields fit in SdkCode field and don't overlap.
388 : static_assert(kSdkPartStart + kSdkPartLength <= kValueLength, "SdkPart does not fit in Value");
389 : static_assert(kSdkCodeStart + kSdkCodeLength <= kValueLength, "SdkCode does not fit in Value");
390 : static_assert((MaskConstant<kSdkPartStart, kSdkPartLength>::value & MaskConstant<kSdkCodeStart, kSdkCodeLength>::value) == 0,
391 : "SdkPart and SdkCode overlap");
392 :
393 : // Assert that Value fits in ValueType.
394 : static_assert(kValueStart + kValueLength <= std::numeric_limits<ValueType>::digits, "Value does not fit in ValueType");
395 :
396 : StorageType mError;
397 :
398 : #if CHIP_CONFIG_ERROR_SOURCE
399 : const char * mFile;
400 : unsigned int mLine;
401 : #if __cplusplus >= 202002L
402 : std::source_location mSourceLocation;
403 : #endif // __cplusplus >= 202002L
404 : #endif // CHIP_CONFIG_ERROR_SOURCE
405 :
406 : public:
407 : /**
408 : * Helper for constructing error constants.
409 : *
410 : * This template ensures that the numeric value is constant and well-formed.
411 : */
412 : template <SdkPart PART, StorageType SCODE>
413 : struct SdkErrorConstant
414 : {
415 : static_assert(FitsInField(kSdkPartLength, to_underlying(PART)), "part is too large");
416 : static_assert(FitsInField(kSdkCodeLength, SCODE), "code is too large");
417 : static_assert(MakeInteger(PART, SCODE) != 0, "value is zero");
418 : static constexpr StorageType value = MakeInteger(PART, SCODE);
419 : };
420 : };
421 :
422 : } // namespace chip
423 :
424 : /**
425 : * The basic type for all CHIP errors.
426 : */
427 : using CHIP_ERROR = ::chip::ChipError;
428 :
429 : /**
430 : * Applications using the CHIP SDK can use this to define error codes in the CHIP_ERROR space for their own purposes.
431 : * This is suitable for a small fixed set of errors, similar to `CHIP_ERROR_…` constants. For embedding arbitrary or
432 : * larger values, use a custom Range offset from Range::kLastRange.
433 : */
434 : #define CHIP_APPLICATION_ERROR(e) CHIP_SDK_ERROR(::chip::ChipError::SdkPart::kApplication, (e))
435 :
436 : #define CHIP_CORE_ERROR(e) CHIP_SDK_ERROR(::chip::ChipError::SdkPart::kCore, (e))
437 :
438 : #define CHIP_IM_GLOBAL_STATUS(type) \
439 : CHIP_SDK_ERROR(::chip::ChipError::SdkPart::kIMGlobalStatus, \
440 : ::chip::to_underlying(::chip::Protocols::InteractionModel::Status::type))
441 :
442 : // Defines a runtime-value for a chip-error that contains a global IM Status.
443 : #if CHIP_CONFIG_ERROR_SOURCE
444 : #define CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(status_value) \
445 : ::chip::ChipError(::chip::ChipError::SdkPart::kIMGlobalStatus, ::chip::to_underlying(status_value), __FILE__, __LINE__)
446 : #else
447 : #define CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(status_value) \
448 : ::chip::ChipError(::chip::ChipError::SdkPart::kIMGlobalStatus, ::chip::to_underlying(status_value))
449 : #endif // CHIP_CONFIG_ERROR_SOURCE
450 :
451 : //
452 : // type must be a compile-time constant as mandated by CHIP_SDK_ERROR.
453 : //
454 : #define CHIP_IM_CLUSTER_STATUS(type) CHIP_SDK_ERROR(::chip::ChipError::SdkPart::kIMClusterStatus, type)
455 :
456 : // Defines a runtime-value for a chip-error that contains a cluster-specific error status.
457 : // Must not be used with cluster-specific success status codes.
458 : #if CHIP_CONFIG_ERROR_SOURCE
459 : #define CHIP_ERROR_IM_CLUSTER_STATUS_VALUE(status_value) \
460 : ::chip::ChipError(::chip::ChipError::SdkPart::kIMClusterStatus, status_value, __FILE__, __LINE__)
461 : #else
462 : #define CHIP_ERROR_IM_CLUSTER_STATUS_VALUE(status_value) \
463 : ::chip::ChipError(::chip::ChipError::SdkPart::kIMClusterStatus, status_value)
464 : #endif // CHIP_CONFIG_ERROR_SOURCE
465 :
466 : // clang-format off
467 :
468 : /**
469 : * @name Error Definitions
470 : *
471 : * @{
472 : */
473 :
474 : /**
475 : * @def CHIP_NO_ERROR
476 : *
477 : * @brief
478 : * This defines the CHIP error code for success or no error.
479 : *
480 : */
481 : #if CHIP_CONFIG_ERROR_SOURCE && CHIP_CONFIG_ERROR_SOURCE_NO_ERROR
482 : #define CHIP_NO_ERROR CHIP_ERROR(0, __FILE__, __LINE__)
483 : #else // CHIP_CONFIG_ERROR_SOURCE && CHIP_CONFIG_ERROR_SOURCE_NO_ERROR
484 : #define CHIP_NO_ERROR CHIP_ERROR(0)
485 : #endif // CHIP_CONFIG_ERROR_SOURCE && CHIP_CONFIG_ERROR_SOURCE_NO_ERROR
486 :
487 : /**
488 : * @def CHIP_ERROR_SENDING_BLOCKED
489 : *
490 : * @brief
491 : * A message exceeds the sent limit.
492 : *
493 : */
494 : #define CHIP_ERROR_SENDING_BLOCKED CHIP_CORE_ERROR(0x01)
495 :
496 : /**
497 : * @def CHIP_ERROR_CONNECTION_ABORTED
498 : *
499 : * @brief
500 : * A connection has been aborted.
501 : *
502 : */
503 : #define CHIP_ERROR_CONNECTION_ABORTED CHIP_CORE_ERROR(0x02)
504 :
505 : /**
506 : * @def CHIP_ERROR_INCORRECT_STATE
507 : *
508 : * @brief
509 : * An unexpected state was encountered.
510 : *
511 : */
512 : #define CHIP_ERROR_INCORRECT_STATE CHIP_CORE_ERROR(0x03)
513 :
514 : /**
515 : * @def CHIP_ERROR_MESSAGE_TOO_LONG
516 : *
517 : * @brief
518 : * A message is too long.
519 : *
520 : */
521 : #define CHIP_ERROR_MESSAGE_TOO_LONG CHIP_CORE_ERROR(0x04)
522 :
523 : /**
524 : * Recursion depth overflow
525 : */
526 : #define CHIP_ERROR_RECURSION_DEPTH_LIMIT CHIP_CORE_ERROR(0x05)
527 :
528 : /**
529 : * @def CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS
530 : *
531 : * @brief
532 : * The attempt to register an unsolicited message handler failed because the
533 : * unsolicited message handler pool is full.
534 : *
535 : */
536 : #define CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS CHIP_CORE_ERROR(0x06)
537 :
538 : /**
539 : * @def CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER
540 : *
541 : * @brief
542 : * The attempt to unregister an unsolicited message handler failed because
543 : * the target handler was not found in the unsolicited message handler pool.
544 : *
545 : */
546 : #define CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER CHIP_CORE_ERROR(0x07)
547 :
548 : /**
549 : * @def CHIP_ERROR_NO_CONNECTION_HANDLER
550 : *
551 : * @brief
552 : * No callback has been registered for handling a connection.
553 : *
554 : */
555 : #define CHIP_ERROR_NO_CONNECTION_HANDLER CHIP_CORE_ERROR(0x08)
556 :
557 : /**
558 : * @def CHIP_ERROR_TOO_MANY_PEER_NODES
559 : *
560 : * @brief
561 : * The number of peer nodes exceeds the maximum limit of a local node.
562 : *
563 : */
564 : #define CHIP_ERROR_TOO_MANY_PEER_NODES CHIP_CORE_ERROR(0x09)
565 :
566 : /**
567 : * @def CHIP_ERROR_SENTINEL
568 : *
569 : * @brief
570 : * For use locally to mark conditions such as value found or end of iteration.
571 : *
572 : */
573 : #define CHIP_ERROR_SENTINEL CHIP_CORE_ERROR(0x0a)
574 :
575 : /**
576 : * @def CHIP_ERROR_NO_MEMORY
577 : *
578 : * @brief
579 : * The attempt to allocate a buffer or object failed due to a lack of memory.
580 : *
581 : */
582 : #define CHIP_ERROR_NO_MEMORY CHIP_CORE_ERROR(0x0b)
583 :
584 : /**
585 : * @def CHIP_ERROR_NO_MESSAGE_HANDLER
586 : *
587 : * @brief
588 : * No callback has been registered for handling a message.
589 : *
590 : */
591 : #define CHIP_ERROR_NO_MESSAGE_HANDLER CHIP_CORE_ERROR(0x0c)
592 :
593 : /**
594 : * @def CHIP_ERROR_MESSAGE_INCOMPLETE
595 : *
596 : * @brief
597 : * A message is incomplete.
598 : *
599 : */
600 : #define CHIP_ERROR_MESSAGE_INCOMPLETE CHIP_CORE_ERROR(0x0d)
601 :
602 : /**
603 : * @def CHIP_ERROR_DATA_NOT_ALIGNED
604 : *
605 : * @brief
606 : * The data is not aligned.
607 : *
608 : */
609 : #define CHIP_ERROR_DATA_NOT_ALIGNED CHIP_CORE_ERROR(0x0e)
610 :
611 : /**
612 : * @def CHIP_ERROR_UNKNOWN_KEY_TYPE
613 : *
614 : * @brief
615 : * The encryption key type is unknown.
616 : *
617 : */
618 : #define CHIP_ERROR_UNKNOWN_KEY_TYPE CHIP_CORE_ERROR(0x0f)
619 :
620 : /**
621 : * @def CHIP_ERROR_KEY_NOT_FOUND
622 : *
623 : * @brief
624 : * The encryption key is not found.
625 : *
626 : */
627 : #define CHIP_ERROR_KEY_NOT_FOUND CHIP_CORE_ERROR(0x10)
628 :
629 : /**
630 : * @def CHIP_ERROR_WRONG_ENCRYPTION_TYPE
631 : *
632 : * @brief
633 : * The encryption type is incorrect for the specified key.
634 : *
635 : */
636 : #define CHIP_ERROR_WRONG_ENCRYPTION_TYPE CHIP_CORE_ERROR(0x11)
637 :
638 : /**
639 : * @def CHIP_ERROR_INVALID_UTF8
640 : *
641 : * @brief
642 : * Invalid UTF8 string (contains some characters that are invalid)
643 : *
644 : */
645 : #define CHIP_ERROR_INVALID_UTF8 CHIP_CORE_ERROR(0x12)
646 :
647 : /**
648 : * @def CHIP_ERROR_INTEGRITY_CHECK_FAILED
649 : *
650 : * @brief
651 : * The integrity check in the message does not match the expected integrity
652 : * check.
653 : *
654 : */
655 : #define CHIP_ERROR_INTEGRITY_CHECK_FAILED CHIP_CORE_ERROR(0x13)
656 :
657 : /**
658 : * @def CHIP_ERROR_INVALID_SIGNATURE
659 : *
660 : * @brief
661 : * Invalid signature.
662 : *
663 : */
664 : #define CHIP_ERROR_INVALID_SIGNATURE CHIP_CORE_ERROR(0x14)
665 :
666 : /**
667 : * @def CHIP_ERROR_INVALID_TLV_CHAR_STRING
668 : *
669 : * @brief
670 : * Invalid TLV character string (e.g. null terminator)
671 : *
672 : */
673 : #define CHIP_ERROR_INVALID_TLV_CHAR_STRING CHIP_CORE_ERROR(0x15)
674 :
675 : /**
676 : * @def CHIP_ERROR_LIT_SUBSCRIBE_INACTIVE_TIMEOUT
677 : *
678 : * @brief
679 : * Subscription timeout caused by LIT ICD device inactive mode
680 : *
681 : */
682 : #define CHIP_ERROR_LIT_SUBSCRIBE_INACTIVE_TIMEOUT CHIP_CORE_ERROR(0x16)
683 :
684 : /**
685 : * @def CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE
686 : *
687 : * @brief
688 : * A signature type is unsupported.
689 : *
690 : */
691 : #define CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE CHIP_CORE_ERROR(0x17)
692 :
693 : /**
694 : * @def CHIP_ERROR_INVALID_MESSAGE_LENGTH
695 : *
696 : * @brief
697 : * A message length is invalid.
698 : *
699 : */
700 : #define CHIP_ERROR_INVALID_MESSAGE_LENGTH CHIP_CORE_ERROR(0x18)
701 :
702 : /**
703 : * @def CHIP_ERROR_BUFFER_TOO_SMALL
704 : *
705 : * @brief
706 : * A buffer is too small.
707 : *
708 : */
709 : #define CHIP_ERROR_BUFFER_TOO_SMALL CHIP_CORE_ERROR(0x19)
710 :
711 : /**
712 : * @def CHIP_ERROR_DUPLICATE_KEY_ID
713 : *
714 : * @brief
715 : * A key id is duplicate.
716 : *
717 : */
718 : #define CHIP_ERROR_DUPLICATE_KEY_ID CHIP_CORE_ERROR(0x1a)
719 :
720 : /**
721 : * @def CHIP_ERROR_WRONG_KEY_TYPE
722 : *
723 : * @brief
724 : * A key type does not match the expected key type.
725 : *
726 : */
727 : #define CHIP_ERROR_WRONG_KEY_TYPE CHIP_CORE_ERROR(0x1b)
728 :
729 : /**
730 : * @def CHIP_ERROR_UNINITIALIZED
731 : *
732 : * @brief
733 : * A requested object is uninitialized.
734 : *
735 : */
736 : #define CHIP_ERROR_UNINITIALIZED CHIP_CORE_ERROR(0x1c)
737 :
738 : /**
739 : * @def CHIP_ERROR_INVALID_IPK
740 : *
741 : * @brief
742 : * The IPK is invalid
743 : *
744 : */
745 : #define CHIP_ERROR_INVALID_IPK CHIP_CORE_ERROR(0x1d)
746 :
747 : /**
748 : * @def CHIP_ERROR_INVALID_STRING_LENGTH
749 : *
750 : * @brief
751 : * A string length is invalid.
752 : *
753 : */
754 : #define CHIP_ERROR_INVALID_STRING_LENGTH CHIP_CORE_ERROR(0x1e)
755 :
756 : /**
757 : * @def CHIP_ERROR_INVALID_LIST_LENGTH
758 : *
759 : * @brief
760 : * A list length is invalid.
761 : *
762 : */
763 : #define CHIP_ERROR_INVALID_LIST_LENGTH CHIP_CORE_ERROR(0x1f)
764 :
765 : /**
766 : * @def CHIP_ERROR_FAILED_DEVICE_ATTESTATION
767 : *
768 : * @brief
769 : * Device Attestation failed.
770 : *
771 : */
772 : #define CHIP_ERROR_FAILED_DEVICE_ATTESTATION CHIP_CORE_ERROR(0x20)
773 :
774 : /**
775 : * @def CHIP_END_OF_TLV
776 : *
777 : * @brief
778 : * The end of a TLV encoding,
779 : * or the end of a TLV container element has been reached.
780 : *
781 : */
782 : #define CHIP_ERROR_END_OF_TLV CHIP_CORE_ERROR(0x21)
783 : #define CHIP_END_OF_TLV CHIP_ERROR_END_OF_TLV
784 :
785 : /**
786 : * @def CHIP_ERROR_TLV_UNDERRUN
787 : *
788 : * @brief
789 : * The TLV encoding ended prematurely.
790 : *
791 : */
792 : #define CHIP_ERROR_TLV_UNDERRUN CHIP_CORE_ERROR(0x22)
793 :
794 : /**
795 : * @def CHIP_ERROR_INVALID_TLV_ELEMENT
796 : *
797 : * @brief
798 : * A TLV element is invalid.
799 : *
800 : */
801 : #define CHIP_ERROR_INVALID_TLV_ELEMENT CHIP_CORE_ERROR(0x23)
802 :
803 : /**
804 : * @def CHIP_ERROR_INVALID_TLV_TAG
805 : *
806 : * @brief
807 : * A TLV tag is invalid.
808 : *
809 : */
810 : #define CHIP_ERROR_INVALID_TLV_TAG CHIP_CORE_ERROR(0x24)
811 :
812 : /**
813 : * @def CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG
814 : *
815 : * @brief
816 : * An implicitly encoded TLV tag was encountered,
817 : * but an implicit profile id has not been defined.
818 : *
819 : */
820 : #define CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG CHIP_CORE_ERROR(0x25)
821 :
822 : /**
823 : * @def CHIP_ERROR_WRONG_TLV_TYPE
824 : *
825 : * @brief
826 : * A TLV type is wrong.
827 : *
828 : */
829 : #define CHIP_ERROR_WRONG_TLV_TYPE CHIP_CORE_ERROR(0x26)
830 :
831 : /**
832 : * @def CHIP_ERROR_TLV_CONTAINER_OPEN
833 : *
834 : * @brief
835 : * A TLV container is unexpectedly open.
836 : *
837 : */
838 : #define CHIP_ERROR_TLV_CONTAINER_OPEN CHIP_CORE_ERROR(0x27)
839 :
840 : /**
841 : * @def CHIP_ERROR_IN_USE
842 : *
843 : * @brief
844 : * A value is already used. Generally indicates an unavailable resource.
845 : * As opposed to CHIP_ERROR_BUSY, the use is not considered transient/temporary.
846 : *
847 : */
848 : #define CHIP_ERROR_IN_USE CHIP_CORE_ERROR(0x28)
849 :
850 : /**
851 : * @def CHIP_ERROR_HAD_FAILURES
852 : *
853 : * @brief
854 : * Report a multi-part operation as having had failures.
855 : * This is used as an aggregate of a single CHIP_ERROR when several underlying
856 : * calls may have failed and no single point of failure is reported.
857 : */
858 : #define CHIP_ERROR_HAD_FAILURES CHIP_CORE_ERROR(0x29)
859 :
860 : /**
861 : * @def CHIP_ERROR_INVALID_MESSAGE_TYPE
862 : *
863 : * @brief
864 : * A message type is invalid.
865 : *
866 : */
867 : #define CHIP_ERROR_INVALID_MESSAGE_TYPE CHIP_CORE_ERROR(0x2a)
868 :
869 : /**
870 : * @def CHIP_ERROR_UNEXPECTED_TLV_ELEMENT
871 : *
872 : * @brief
873 : * An unexpected TLV element was encountered.
874 : *
875 : */
876 : #define CHIP_ERROR_UNEXPECTED_TLV_ELEMENT CHIP_CORE_ERROR(0x2b)
877 :
878 : /**
879 : * @def CHIP_ERROR_ALREADY_INITIALIZED
880 : *
881 : * @brief
882 : * Mark that an object has already beein initialized and cannot be
883 : * initialized again
884 : *
885 : */
886 : #define CHIP_ERROR_ALREADY_INITIALIZED CHIP_CORE_ERROR(0x2c)
887 :
888 : /**
889 : * @def CHIP_ERROR_NOT_IMPLEMENTED
890 : *
891 : * @brief
892 : * A requested function or feature is not implemented.
893 : *
894 : */
895 : #define CHIP_ERROR_NOT_IMPLEMENTED CHIP_CORE_ERROR(0x2d)
896 :
897 : /**
898 : * @def CHIP_ERROR_INVALID_ADDRESS
899 : *
900 : * @brief
901 : * An address is invalid.
902 : *
903 : */
904 : #define CHIP_ERROR_INVALID_ADDRESS CHIP_CORE_ERROR(0x2e)
905 :
906 : /**
907 : * @def CHIP_ERROR_INVALID_ARGUMENT
908 : *
909 : * @brief
910 : * An argument is invalid.
911 : *
912 : */
913 : #define CHIP_ERROR_INVALID_ARGUMENT CHIP_CORE_ERROR(0x2f)
914 :
915 : /**
916 : * @def CHIP_ERROR_INVALID_PATH_LIST
917 : *
918 : * @brief
919 : * A TLV path list is invalid.
920 : *
921 : */
922 : #define CHIP_ERROR_INVALID_PATH_LIST CHIP_CORE_ERROR(0x30)
923 :
924 : /**
925 : * @def CHIP_ERROR_INVALID_DATA_LIST
926 : *
927 : * @brief
928 : * A TLV data list is invalid.
929 : *
930 : */
931 : #define CHIP_ERROR_INVALID_DATA_LIST CHIP_CORE_ERROR(0x31)
932 :
933 : /**
934 : * @def CHIP_ERROR_TIMEOUT
935 : *
936 : * @brief
937 : * A request timed out.
938 : *
939 : */
940 : #define CHIP_ERROR_TIMEOUT CHIP_CORE_ERROR(0x32)
941 :
942 : /**
943 : * @def CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR
944 : *
945 : * @brief
946 : * A device descriptor is invalid.
947 : *
948 : */
949 : #define CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR CHIP_CORE_ERROR(0x33)
950 :
951 : // AVAILABLE: 0x34
952 : // AVAILABLE: 0x35
953 : // AVAILABLE: 0x36
954 : // AVAILABLE: 0x37
955 :
956 : /**
957 : * @def CHIP_ERROR_INVALID_PASE_PARAMETER
958 : *
959 : * @brief
960 : * A PASE parameter is invalid.
961 : *
962 : */
963 : #define CHIP_ERROR_INVALID_PASE_PARAMETER CHIP_CORE_ERROR(0x38)
964 :
965 : // AVAILABLE: 0x39
966 : // AVAILABLE: 0x3a
967 :
968 : /**
969 : * @def CHIP_ERROR_INVALID_USE_OF_SESSION_KEY
970 : *
971 : * @brief
972 : * A use of session key is invalid.
973 : *
974 : */
975 : #define CHIP_ERROR_INVALID_USE_OF_SESSION_KEY CHIP_CORE_ERROR(0x3b)
976 :
977 : /**
978 : * @def CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY
979 : *
980 : * @brief
981 : * A connection is closed unexpectedly.
982 : *
983 : */
984 : #define CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY CHIP_CORE_ERROR(0x3c)
985 :
986 : /**
987 : * @def CHIP_ERROR_MISSING_TLV_ELEMENT
988 : *
989 : * @brief
990 : * A TLV element is missing.
991 : *
992 : */
993 : #define CHIP_ERROR_MISSING_TLV_ELEMENT CHIP_CORE_ERROR(0x3d)
994 :
995 : /**
996 : * @def CHIP_ERROR_RANDOM_DATA_UNAVAILABLE
997 : *
998 : * @brief
999 : * Secure random data is not available.
1000 : *
1001 : */
1002 : #define CHIP_ERROR_RANDOM_DATA_UNAVAILABLE CHIP_CORE_ERROR(0x3e)
1003 :
1004 : // AVAILABLE: 0x3f
1005 : // AVAILABLE: 0x40
1006 :
1007 : /**
1008 : * @def CHIP_ERROR_HOST_PORT_LIST_EMPTY
1009 : *
1010 : * @brief
1011 : * A host/port list is empty.
1012 : *
1013 : */
1014 : #define CHIP_ERROR_HOST_PORT_LIST_EMPTY CHIP_CORE_ERROR(0x41)
1015 :
1016 : // AVAILABLE: 0x42
1017 : // AVAILABLE: 0x43
1018 : // AVAILABLE: 0x44
1019 :
1020 : /**
1021 : * @def CHIP_ERROR_FORCED_RESET
1022 : *
1023 : * @brief
1024 : * A service manager is forced to reset.
1025 : *
1026 : */
1027 : #define CHIP_ERROR_FORCED_RESET CHIP_CORE_ERROR(0x45)
1028 :
1029 : /**
1030 : * @def CHIP_ERROR_NO_ENDPOINT
1031 : *
1032 : * @brief
1033 : * No endpoint is available.
1034 : *
1035 : */
1036 : #define CHIP_ERROR_NO_ENDPOINT CHIP_CORE_ERROR(0x46)
1037 :
1038 : /**
1039 : * @def CHIP_ERROR_INVALID_DESTINATION_NODE_ID
1040 : *
1041 : * @brief
1042 : * A destination node id is invalid.
1043 : *
1044 : */
1045 : #define CHIP_ERROR_INVALID_DESTINATION_NODE_ID CHIP_CORE_ERROR(0x47)
1046 :
1047 : /**
1048 : * @def CHIP_ERROR_NOT_CONNECTED
1049 : *
1050 : * @brief
1051 : * The operation cannot be performed because the underlying object is not
1052 : * connected.
1053 : *
1054 : */
1055 : #define CHIP_ERROR_NOT_CONNECTED CHIP_CORE_ERROR(0x48)
1056 :
1057 : // AVAILABLE: 0x49
1058 :
1059 : /**
1060 : * @def CHIP_ERROR_CA_CERT_NOT_FOUND
1061 : *
1062 : * @brief
1063 : * CA certificate is not found.
1064 : *
1065 : */
1066 : #define CHIP_ERROR_CA_CERT_NOT_FOUND CHIP_CORE_ERROR(0x4a)
1067 :
1068 : /**
1069 : * @def CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED
1070 : *
1071 : * @brief
1072 : * A certificate path length exceeds the constraint.
1073 : *
1074 : */
1075 : #define CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED CHIP_CORE_ERROR(0x4b)
1076 :
1077 : /**
1078 : * @def CHIP_ERROR_CERT_PATH_TOO_LONG
1079 : *
1080 : * @brief
1081 : * A certificate path is too long.
1082 : *
1083 : */
1084 : #define CHIP_ERROR_CERT_PATH_TOO_LONG CHIP_CORE_ERROR(0x4c)
1085 :
1086 : /**
1087 : * @def CHIP_ERROR_CERT_USAGE_NOT_ALLOWED
1088 : *
1089 : * @brief
1090 : * A requested certificate usage is not allowed.
1091 : *
1092 : */
1093 : #define CHIP_ERROR_CERT_USAGE_NOT_ALLOWED CHIP_CORE_ERROR(0x4d)
1094 :
1095 : /**
1096 : * @def CHIP_ERROR_CERT_EXPIRED
1097 : *
1098 : * @brief
1099 : * A certificate expired.
1100 : *
1101 : */
1102 : #define CHIP_ERROR_CERT_EXPIRED CHIP_CORE_ERROR(0x4e)
1103 :
1104 : /**
1105 : * @def CHIP_ERROR_CERT_NOT_VALID_YET
1106 : *
1107 : * @brief
1108 : * A certificate is not valid yet.
1109 : *
1110 : */
1111 : #define CHIP_ERROR_CERT_NOT_VALID_YET CHIP_CORE_ERROR(0x4f)
1112 :
1113 : /**
1114 : * @def CHIP_ERROR_UNSUPPORTED_CERT_FORMAT
1115 : *
1116 : * @brief
1117 : * A certificate format is unsupported.
1118 : *
1119 : */
1120 : #define CHIP_ERROR_UNSUPPORTED_CERT_FORMAT CHIP_CORE_ERROR(0x50)
1121 :
1122 : /**
1123 : * @def CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE
1124 : *
1125 : * @brief
1126 : * An elliptic curve is unsupported.
1127 : *
1128 : */
1129 : #define CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE CHIP_CORE_ERROR(0x51)
1130 :
1131 : // AVAILABLE: 0x52
1132 :
1133 : /**
1134 : * @def CHIP_ERROR_CERT_NOT_FOUND
1135 : *
1136 : * @brief
1137 : * A certificate is not found.
1138 : *
1139 : */
1140 : #define CHIP_ERROR_CERT_NOT_FOUND CHIP_CORE_ERROR(0x53)
1141 :
1142 : /**
1143 : * @def CHIP_ERROR_INVALID_CASE_PARAMETER
1144 : *
1145 : * @brief
1146 : * A CASE parameter is invalid.
1147 : *
1148 : */
1149 : #define CHIP_ERROR_INVALID_CASE_PARAMETER CHIP_CORE_ERROR(0x54)
1150 :
1151 : // AVAILABLE: 0x55
1152 :
1153 : /**
1154 : * @def CHIP_ERROR_CERT_LOAD_FAILED
1155 : *
1156 : * @brief
1157 : * A certificate load failed.
1158 : *
1159 : */
1160 : #define CHIP_ERROR_CERT_LOAD_FAILED CHIP_CORE_ERROR(0x56)
1161 :
1162 : /**
1163 : * @def CHIP_ERROR_CERT_NOT_TRUSTED
1164 : *
1165 : * @brief
1166 : * A certificate is not trusted.
1167 : *
1168 : */
1169 : #define CHIP_ERROR_CERT_NOT_TRUSTED CHIP_CORE_ERROR(0x57)
1170 :
1171 : // AVAILABLE: 0x58
1172 :
1173 : /**
1174 : * @def CHIP_ERROR_WRONG_CERT_DN
1175 : *
1176 : * @brief
1177 : * A certificate subject/issuer distinguished name is wrong.
1178 : *
1179 : */
1180 : #define CHIP_ERROR_WRONG_CERT_DN CHIP_CORE_ERROR(0x59)
1181 :
1182 : // AVAILABLE: 0x5a
1183 : // AVAILABLE: 0x5b
1184 :
1185 : /**
1186 : * @def CHIP_ERROR_WRONG_NODE_ID
1187 : *
1188 : * @brief
1189 : * A node id is wrong.
1190 : *
1191 : */
1192 : #define CHIP_ERROR_WRONG_NODE_ID CHIP_CORE_ERROR(0x5c)
1193 :
1194 : // AVAILABLE: 0x5d
1195 : // AVAILABLE: 0x5e
1196 : // AVAILABLE: 0x5f
1197 : // AVAILABLE: 0x60
1198 : // AVAILABLE: 0x61
1199 : // AVAILABLE: 0x62
1200 : // AVAILABLE: 0x63
1201 :
1202 : /**
1203 : * @def CHIP_ERROR_RETRANS_TABLE_FULL
1204 : *
1205 : * @brief
1206 : * A retransmission table is already full.
1207 : *
1208 : */
1209 : #define CHIP_ERROR_RETRANS_TABLE_FULL CHIP_CORE_ERROR(0x64)
1210 :
1211 : // AVAILABLE: 0x65
1212 : // AVAILABLE: 0x66
1213 : // AVAILABLE: 0x67
1214 :
1215 : /**
1216 : * @def CHIP_ERROR_TRANSACTION_CANCELED
1217 : *
1218 : * @brief
1219 : * A transaction is cancelled.
1220 : *
1221 : */
1222 : #define CHIP_ERROR_TRANSACTION_CANCELED CHIP_CORE_ERROR(0x68)
1223 :
1224 : // AVAILABLE: 0x69
1225 : // AVAILABLE: 0x6a
1226 :
1227 : /**
1228 : * @def CHIP_ERROR_INVALID_SUBSCRIPTION
1229 : *
1230 : * @brief
1231 : * A message was received as part of a subscription exchange that has a mis-matching subscription id.
1232 : *
1233 : */
1234 : #define CHIP_ERROR_INVALID_SUBSCRIPTION CHIP_CORE_ERROR(0x6b)
1235 :
1236 : /**
1237 : * @def CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
1238 : *
1239 : * @brief
1240 : * A CHIP feature is unsupported.
1241 : *
1242 : */
1243 : #define CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE CHIP_CORE_ERROR(0x6c)
1244 :
1245 : /**
1246 : * @def CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR
1247 : *
1248 : * @brief
1249 : * An unsolicited message with the originator bit clear.
1250 : *
1251 : */
1252 : #define CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR CHIP_CORE_ERROR(0x70)
1253 :
1254 : /**
1255 : * @def CHIP_ERROR_INVALID_FABRIC_INDEX
1256 : *
1257 : * @brief
1258 : * A fabric index is invalid.
1259 : *
1260 : */
1261 : #define CHIP_ERROR_INVALID_FABRIC_INDEX CHIP_CORE_ERROR(0x71)
1262 :
1263 : /**
1264 : * @def CHIP_ERROR_TOO_MANY_CONNECTIONS
1265 : *
1266 : * @brief
1267 : * The attempt to allocate a connection object failed because too many
1268 : * connections exist.
1269 : *
1270 : */
1271 : #define CHIP_ERROR_TOO_MANY_CONNECTIONS CHIP_CORE_ERROR(0x72)
1272 :
1273 : /**
1274 : * @def CHIP_ERROR_SHUT_DOWN
1275 : *
1276 : * @brief
1277 : * The operation cancelled because a shut down was initiated
1278 : */
1279 : #define CHIP_ERROR_SHUT_DOWN CHIP_CORE_ERROR(0x73)
1280 :
1281 : /**
1282 : * @def CHIP_ERROR_CANCELLED
1283 : *
1284 : * @brief
1285 : * The operation has been cancelled, generally by calling a cancel/abort request.
1286 : */
1287 : #define CHIP_ERROR_CANCELLED CHIP_CORE_ERROR(0x74)
1288 :
1289 : // AVAILABLE: 0x75
1290 :
1291 : /**
1292 : * @def CHIP_ERROR_TLV_TAG_NOT_FOUND
1293 : *
1294 : * @brief
1295 : * A specified TLV tag was not found.
1296 : *
1297 : */
1298 : #define CHIP_ERROR_TLV_TAG_NOT_FOUND CHIP_CORE_ERROR(0x76)
1299 :
1300 : /**
1301 : * @def CHIP_ERROR_MISSING_SECURE_SESSION
1302 : *
1303 : * @brief
1304 : *
1305 : * A secure session is needed to do work, but is missing/is not present.
1306 : */
1307 : #define CHIP_ERROR_MISSING_SECURE_SESSION CHIP_CORE_ERROR(0x77)
1308 :
1309 : /**
1310 : * @def CHIP_ERROR_INVALID_ADMIN_SUBJECT
1311 : *
1312 : * @brief
1313 : * The CaseAdminSubject field is not valid in AddNOC command.
1314 : *
1315 : */
1316 : #define CHIP_ERROR_INVALID_ADMIN_SUBJECT CHIP_CORE_ERROR(0x78)
1317 :
1318 : /**
1319 : * @def CHIP_ERROR_INSUFFICIENT_PRIVILEGE
1320 : *
1321 : * @brief
1322 : * Required privilege was insufficient during an operation.
1323 : *
1324 : */
1325 : #define CHIP_ERROR_INSUFFICIENT_PRIVILEGE CHIP_CORE_ERROR(0x79)
1326 :
1327 : // AVAILABLE: 0x7a
1328 : // AVAILABLE: 0x7b
1329 : // AVAILABLE: 0x7c
1330 :
1331 : /**
1332 : * @def CHIP_ERROR_MESSAGE_COUNTER_EXHAUSTED
1333 : *
1334 : * @brief
1335 : * The message counter of the session is exhausted, the session should be closed.
1336 : */
1337 : #define CHIP_ERROR_MESSAGE_COUNTER_EXHAUSTED CHIP_CORE_ERROR(0x7d)
1338 :
1339 : /**
1340 : * @def CHIP_ERROR_FABRIC_EXISTS
1341 : *
1342 : * @brief
1343 : * The fabric with the given fabric id and root public key already exists.
1344 : *
1345 : */
1346 : #define CHIP_ERROR_FABRIC_EXISTS CHIP_CORE_ERROR(0x7e)
1347 :
1348 : /**
1349 : * @def CHIP_ERROR_ENDPOINT_EXISTS
1350 : *
1351 : * @brief
1352 : * The endpoint with the given endpoint id already exists.
1353 : *
1354 : */
1355 : #define CHIP_ERROR_ENDPOINT_EXISTS CHIP_CORE_ERROR(0x7f)
1356 :
1357 : /**
1358 : * @def CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER
1359 : *
1360 : * @brief
1361 : * The wrong encryption type error received from a peer node.
1362 : *
1363 : */
1364 : #define CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER CHIP_CORE_ERROR(0x80)
1365 :
1366 : // AVAILABLE: 0x81
1367 : // AVAILABLE: 0x82
1368 : // AVAILABLE: 0x83
1369 : // AVAILABLE: 0x84
1370 :
1371 : /**
1372 : * @def CHIP_ERROR_INVALID_KEY_ID
1373 : *
1374 : * @brief
1375 : * A key id is invalid.
1376 : *
1377 : */
1378 : #define CHIP_ERROR_INVALID_KEY_ID CHIP_CORE_ERROR(0x85)
1379 :
1380 : /**
1381 : * @def CHIP_ERROR_INVALID_TIME
1382 : *
1383 : * @brief
1384 : * Time has invalid value.
1385 : *
1386 : */
1387 : #define CHIP_ERROR_INVALID_TIME CHIP_CORE_ERROR(0x86)
1388 :
1389 : // AVAILABLE: 0x87
1390 : // AVAILABLE: 0x88
1391 : // AVAILABLE: 0x89
1392 : // AVAILABLE: 0x8a
1393 : // AVAILABLE: 0x8b
1394 : // AVAILABLE: 0x8c
1395 : // AVAILABLE: 0x8d
1396 :
1397 : /**
1398 : * @def CHIP_ERROR_SCHEMA_MISMATCH
1399 : *
1400 : * @brief
1401 : * A mismatch in schema was encountered.
1402 : *
1403 : */
1404 : #define CHIP_ERROR_SCHEMA_MISMATCH CHIP_CORE_ERROR(0x8e)
1405 :
1406 : /**
1407 : * @def CHIP_ERROR_INVALID_INTEGER_VALUE
1408 : *
1409 : * @brief
1410 : * An integer does not have the kind of value we expect.
1411 : *
1412 : */
1413 : #define CHIP_ERROR_INVALID_INTEGER_VALUE CHIP_CORE_ERROR(0x8f)
1414 :
1415 : // AVAILABLE: 0x90
1416 : // AVAILABLE: 0x91
1417 :
1418 : /**
1419 : * @def CHIP_ERROR_BAD_REQUEST
1420 : *
1421 : * @brief
1422 : * The request cannot be processed or fulfilled
1423 : *
1424 : */
1425 : #define CHIP_ERROR_BAD_REQUEST CHIP_CORE_ERROR(0x92)
1426 :
1427 : // AVAILABLE: 0x93
1428 : // AVAILABLE: 0x94
1429 : // AVAILABLE: 0x95
1430 : // AVAILABLE: 0x96
1431 : // AVAILABLE: 0x97
1432 : // AVAILABLE: 0x98
1433 : // AVAILABLE: 0x99
1434 : // AVAILABLE: 0x9a
1435 : // AVAILABLE: 0x9b
1436 : // AVAILABLE: 0x9c
1437 :
1438 : /**
1439 : * @def CHIP_ERROR_WRONG_CERT_TYPE
1440 : *
1441 : * @brief
1442 : * The presented certificate was of the wrong type.
1443 : */
1444 : #define CHIP_ERROR_WRONG_CERT_TYPE CHIP_CORE_ERROR(0x9d)
1445 :
1446 : // AVAILABLE: 0x9e
1447 :
1448 : /**
1449 : * @def CHIP_ERROR_PERSISTED_STORAGE_FAILED
1450 : *
1451 : * @brief
1452 : * Persisted storage memory read/write failure.
1453 : *
1454 : */
1455 : #define CHIP_ERROR_PERSISTED_STORAGE_FAILED CHIP_CORE_ERROR(0x9f)
1456 :
1457 : /**
1458 : * @def CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND
1459 : *
1460 : * @brief
1461 : * The specific value is not found in the persisted storage.
1462 : *
1463 : */
1464 : #define CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND CHIP_CORE_ERROR(0xa0)
1465 :
1466 : /**
1467 : * @def CHIP_ERROR_IM_FABRIC_DELETED
1468 : *
1469 : * @brief
1470 : * The fabric is deleted, and the corresponding IM resources are released
1471 : */
1472 : #define CHIP_ERROR_IM_FABRIC_DELETED CHIP_CORE_ERROR(0xa1)
1473 :
1474 : // AVAILABLE: 0xa2
1475 : // AVAILABLE: 0xa3
1476 :
1477 : /**
1478 : * @def CHIP_ERROR_IN_PROGRESS
1479 : *
1480 : * @brief
1481 : * The operation is still in progress
1482 : */
1483 : #define CHIP_ERROR_IN_PROGRESS CHIP_CORE_ERROR(0xa4)
1484 :
1485 : /**
1486 : * @def CHIP_ERROR_ACCESS_DENIED
1487 : *
1488 : * @brief
1489 : * The CHIP message is not granted access for further processing.
1490 : */
1491 : #define CHIP_ERROR_ACCESS_DENIED CHIP_CORE_ERROR(0xa5)
1492 :
1493 : /**
1494 : * @def CHIP_ERROR_UNKNOWN_RESOURCE_ID
1495 : *
1496 : * @brief
1497 : * Unknown resource ID
1498 : *
1499 : */
1500 : #define CHIP_ERROR_UNKNOWN_RESOURCE_ID CHIP_CORE_ERROR(0xa6)
1501 :
1502 : /**
1503 : * @def CHIP_ERROR_VERSION_MISMATCH
1504 : *
1505 : * @brief
1506 : * The conditional update of a trait instance path has failed
1507 : * because the local changes are based on an obsolete version of the
1508 : * data.
1509 : */
1510 : #define CHIP_ERROR_VERSION_MISMATCH CHIP_CORE_ERROR(0xa7)
1511 :
1512 : /**
1513 : * @def CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL
1514 : *
1515 : * @brief
1516 : * The CHIP message is not granted access for further processing due to Access Restriction List.
1517 : */
1518 : #define CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL CHIP_CORE_ERROR(0xa8)
1519 :
1520 : // AVAILABLE: 0xa9
1521 : // AVAILABLE: 0xaa
1522 :
1523 : /**
1524 : * @def CHIP_EVENT_ID_FOUND
1525 : *
1526 : * @brief
1527 : * Event ID matching the criteria was found
1528 : */
1529 : #define CHIP_ERROR_EVENT_ID_FOUND CHIP_CORE_ERROR(0xab)
1530 : #define CHIP_EVENT_ID_FOUND CHIP_ERROR_EVENT_ID_FOUND
1531 :
1532 : /**
1533 : * @def CHIP_ERROR_INTERNAL
1534 : *
1535 : * @brief
1536 : * Internal error
1537 : */
1538 : #define CHIP_ERROR_INTERNAL CHIP_CORE_ERROR(0xac)
1539 :
1540 : /**
1541 : * @def CHIP_ERROR_OPEN_FAILED
1542 : *
1543 : * @brief
1544 : * Open file failed
1545 : */
1546 : #define CHIP_ERROR_OPEN_FAILED CHIP_CORE_ERROR(0xad)
1547 :
1548 : /**
1549 : * @def CHIP_ERROR_READ_FAILED
1550 : *
1551 : * @brief
1552 : * Read from file failed
1553 : */
1554 : #define CHIP_ERROR_READ_FAILED CHIP_CORE_ERROR(0xae)
1555 :
1556 : /**
1557 : * @def CHIP_ERROR_WRITE_FAILED
1558 : *
1559 : * @brief
1560 : * Write to file failed
1561 : */
1562 : #define CHIP_ERROR_WRITE_FAILED CHIP_CORE_ERROR(0xaf)
1563 :
1564 : /**
1565 : * @def CHIP_ERROR_DECODE_FAILED
1566 : *
1567 : * @brief
1568 : * Decoding failed
1569 : */
1570 : #define CHIP_ERROR_DECODE_FAILED CHIP_CORE_ERROR(0xb0)
1571 :
1572 : // AVAILABLE: 0xb1
1573 : // AVAILABLE: 0xb2
1574 :
1575 : /**
1576 : * @def CHIP_ERROR_DNS_SD_UNAUTHORIZED
1577 : *
1578 : * @brief
1579 : * The application is not authorized to do DNS_SD lookups.
1580 : *
1581 : */
1582 : #define CHIP_ERROR_DNS_SD_UNAUTHORIZED CHIP_CORE_ERROR(0xb3)
1583 :
1584 : /**
1585 : * @def CHIP_ERROR_MDNS_COLLISION
1586 : *
1587 : * @brief
1588 : * The registered service name has collision on the LAN.
1589 : *
1590 : */
1591 : #define CHIP_ERROR_MDNS_COLLISION CHIP_CORE_ERROR(0xb4)
1592 :
1593 : /**
1594 : * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB
1595 : *
1596 : * @brief
1597 : * The Attribute path IB is malformed: it does not contain
1598 : * the required path
1599 : */
1600 : #define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB CHIP_CORE_ERROR(0xb5)
1601 :
1602 : /**
1603 : * @def CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB
1604 : *
1605 : * @brief
1606 : * The Event Path IB is malformed: it does not contain
1607 : * the required elements
1608 : */
1609 : #define CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB CHIP_CORE_ERROR(0xb6)
1610 :
1611 : // AVAILABLE: 0xb7
1612 : // AVAILABLE: 0xb8
1613 :
1614 : /**
1615 : * @def CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_IB
1616 : *
1617 : * @brief
1618 : * The Command Data IB is malformed: it does not contain
1619 : * the required elements
1620 : */
1621 : #define CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_IB CHIP_CORE_ERROR(0xb9)
1622 :
1623 : /**
1624 : * @def CHIP_ERROR_IM_MALFORMED_EVENT_DATA_IB
1625 : *
1626 : * @brief
1627 : * The Event Data IB is malformed: it does not contain
1628 : * the required elements
1629 : */
1630 : #define CHIP_ERROR_IM_MALFORMED_EVENT_DATA_IB CHIP_CORE_ERROR(0xba)
1631 :
1632 : /**
1633 : * @def CHIP_ERROR_MAXIMUM_PATHS_PER_INVOKE_EXCEEDED
1634 : *
1635 : * @brief
1636 : * Caller is trying to add more invoke command paths
1637 : * than what the remote node reports supporting.
1638 : */
1639 : #define CHIP_ERROR_MAXIMUM_PATHS_PER_INVOKE_EXCEEDED CHIP_CORE_ERROR(0xbb)
1640 :
1641 : /**
1642 : * @def CHIP_ERROR_PEER_NODE_NOT_FOUND
1643 : *
1644 : * @brief
1645 : * Unable to find the peer node
1646 : */
1647 : #define CHIP_ERROR_PEER_NODE_NOT_FOUND CHIP_CORE_ERROR(0xbc)
1648 :
1649 : /**
1650 : * @def CHIP_ERROR_HSM
1651 : *
1652 : * @brief
1653 : * Error in Hardware security module. Used for software fallback option.
1654 : */
1655 : #define CHIP_ERROR_HSM CHIP_CORE_ERROR(0xbd)
1656 :
1657 : // AVAILABLE: 0xbe
1658 :
1659 : /**
1660 : * @def CHIP_ERROR_REAL_TIME_NOT_SYNCED
1661 : *
1662 : * @brief
1663 : * The system's real time clock is not synchronized to an accurate time source.
1664 : */
1665 : #define CHIP_ERROR_REAL_TIME_NOT_SYNCED CHIP_CORE_ERROR(0xbf)
1666 :
1667 : /**
1668 : * @def CHIP_ERROR_UNEXPECTED_EVENT
1669 : *
1670 : * @brief
1671 : * An unexpected event was encountered.
1672 : */
1673 : #define CHIP_ERROR_UNEXPECTED_EVENT CHIP_CORE_ERROR(0xc0)
1674 :
1675 : /**
1676 : * @def CHIP_ERROR_ENDPOINT_POOL_FULL
1677 : *
1678 : * @brief
1679 : * No endpoint pool entry is available.
1680 : *
1681 : */
1682 : #define CHIP_ERROR_ENDPOINT_POOL_FULL CHIP_CORE_ERROR(0xc1)
1683 :
1684 : /**
1685 : * @def CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG
1686 : *
1687 : * @brief
1688 : * More inbound message data is pending than available buffer space available to copy it.
1689 : *
1690 : */
1691 : #define CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG CHIP_CORE_ERROR(0xc2)
1692 :
1693 : /**
1694 : * @def CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG
1695 : *
1696 : * @brief
1697 : * More outbound message data is pending than available buffer space available to copy it.
1698 : *
1699 : */
1700 : #define CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG CHIP_CORE_ERROR(0xc3)
1701 :
1702 : /**
1703 : * @def CHIP_ERROR_DUPLICATE_MESSAGE_RECEIVED
1704 : *
1705 : * @brief
1706 : * The received message is a duplicate of a previously received message.
1707 : */
1708 : #define CHIP_ERROR_DUPLICATE_MESSAGE_RECEIVED CHIP_CORE_ERROR(0xc4)
1709 :
1710 : /**
1711 : * @def CHIP_ERROR_INVALID_PUBLIC_KEY
1712 : *
1713 : * @brief
1714 : * The received public key doesn't match locally generated key.
1715 : */
1716 : #define CHIP_ERROR_INVALID_PUBLIC_KEY CHIP_CORE_ERROR(0xc5)
1717 :
1718 : /**
1719 : * @def CHIP_ERROR_FABRIC_MISMATCH_ON_ICA
1720 : *
1721 : * @brief
1722 : * The fabric ID in ICA certificate doesn't match the one in NOC.
1723 : */
1724 : #define CHIP_ERROR_FABRIC_MISMATCH_ON_ICA CHIP_CORE_ERROR(0xc6)
1725 :
1726 : // AVAILABLE: 0xc7
1727 : // AVAILABLE: 0xc8
1728 :
1729 : /**
1730 : * @def CHIP_ERROR_NO_SHARED_TRUSTED_ROOT
1731 : *
1732 : * @brief
1733 : * The CASE session could not be established as peer's credentials do not have
1734 : * a common root of trust.
1735 : */
1736 : #define CHIP_ERROR_NO_SHARED_TRUSTED_ROOT CHIP_CORE_ERROR(0xc9)
1737 :
1738 : /*
1739 : * @def CHIP_ERROR_IM_STATUS_CODE_RECEIVED
1740 : *
1741 : * @brief
1742 : * Indicates an IM status code was received. Usually accompanied with
1743 : * the actual IM status code.
1744 : */
1745 : #define CHIP_ERROR_IM_STATUS_CODE_RECEIVED CHIP_CORE_ERROR(0xca)
1746 :
1747 : // AVAILABLE 0xcb
1748 : // AVAILABLE 0xcc
1749 : // AVAILABLE 0xcd
1750 : // AVAILABLE 0xce
1751 : // AVAILABLE 0xcf
1752 : // AVAILABLE 0xd0
1753 : // AVAILABLE 0xd1
1754 : // AVAILABLE 0xd2
1755 : // AVAILABLE 0xd3
1756 : // AVAILABLE 0xd4
1757 : // AVAILABLE 0xd5
1758 : // AVAILABLE 0xd6
1759 :
1760 : /**
1761 : * @def CHIP_ERROR_IM_MALFORMED_DATA_VERSION_FILTER_IB
1762 : *
1763 : * @brief
1764 : * The Data Version Filter IB is malformed: it does not contain
1765 : * the required elements
1766 : */
1767 : #define CHIP_ERROR_IM_MALFORMED_DATA_VERSION_FILTER_IB CHIP_CORE_ERROR(0xd7)
1768 :
1769 : /**
1770 : * @def CHIP_ERROR_NOT_FOUND
1771 : *
1772 : * @brief
1773 : * The item referenced in the function call was not found
1774 : */
1775 : #define CHIP_ERROR_NOT_FOUND CHIP_CORE_ERROR(0xd8)
1776 :
1777 : // AVAILABLE: 0xd9
1778 :
1779 : /**
1780 : * @def CHIP_ERROR_INVALID_FILE_IDENTIFIER
1781 : *
1782 : * @brief
1783 : * The file identifier, encoded in the first few bytes of a processed file,
1784 : * has unexpected value.
1785 : */
1786 : #define CHIP_ERROR_INVALID_FILE_IDENTIFIER CHIP_CORE_ERROR(0xda)
1787 :
1788 : /**
1789 : * @def CHIP_ERROR_BUSY
1790 : *
1791 : * @brief
1792 : * The Resource is busy and cannot process the request. Trying again might work.
1793 : */
1794 : #define CHIP_ERROR_BUSY CHIP_CORE_ERROR(0xdb)
1795 :
1796 : /**
1797 : * @def CHIP_ERROR_MAX_RETRY_EXCEEDED
1798 : *
1799 : * @brief
1800 : * The maximum retry limit has been exceeded.
1801 : */
1802 : #define CHIP_ERROR_MAX_RETRY_EXCEEDED CHIP_CORE_ERROR(0xdc)
1803 :
1804 : /**
1805 : * @def CHIP_ERROR_PROVIDER_LIST_EXHAUSTED
1806 : *
1807 : * @brief
1808 : * The provider list has been exhausted.
1809 : */
1810 : #define CHIP_ERROR_PROVIDER_LIST_EXHAUSTED CHIP_CORE_ERROR(0xdd)
1811 :
1812 : // AVAILABLE: 0xde
1813 :
1814 : /**
1815 : * @def CHIP_ERROR_INVALID_SCHEME_PREFIX
1816 : *
1817 : * @brief
1818 : * The scheme field contains an invalid prefix
1819 : */
1820 : #define CHIP_ERROR_INVALID_SCHEME_PREFIX CHIP_CORE_ERROR(0xdf)
1821 :
1822 : /**
1823 : * @def CHIP_ERROR_MISSING_URI_SEPARATOR
1824 : *
1825 : * @brief
1826 : * The URI separator is missing
1827 : */
1828 : #define CHIP_ERROR_MISSING_URI_SEPARATOR CHIP_CORE_ERROR(0xe0)
1829 :
1830 : /**
1831 : * @def CHIP_ERROR_HANDLER_NOT_SET
1832 : *
1833 : * @brief
1834 : * Callback function or callable object is not set
1835 : */
1836 : #define CHIP_ERROR_HANDLER_NOT_SET CHIP_CORE_ERROR(0xe1)
1837 :
1838 : // WHEN ADDING A NEW ERROR CODE: Look for "AVAILABLE" comments above and fill in gaps.
1839 :
1840 : // clang-format on
1841 :
1842 : // !!!!! IMPORTANT !!!!! If you add new CHIP errors, please update the translation
1843 : // of error codes to strings in CHIPError.cpp, and add them to kTestElements[]
1844 : // in core/tests/TestCHIPErrorStr.cpp
1845 :
1846 : namespace chip {
1847 :
1848 : extern void RegisterCHIPLayerErrorFormatter();
1849 : extern void DeregisterCHIPLayerErrorFormatter();
1850 : extern bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err);
1851 :
1852 : } // namespace chip
|