3 * Copyright (c) 2020 Project CHIP Authors
4 * Copyright (c) 2014-2017 Nest Labs, Inc.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 * This file defines default compile-time configuration constants
23 * for the CHIP ASN1 subsystem.
29 #include <core/CHIPConfig.h>
34 * @def ASN1_CONFIG_ERROR_TYPE
37 * This defines the data type used to represent errors for the ASN1
41 #ifndef ASN1_CONFIG_ERROR_TYPE
44 #define ASN1_CONFIG_ERROR_TYPE int32_t
45 #endif // ASN1_CONFIG_ERROR_TYPE
48 * @def ASN1_CONFIG_NO_ERROR
51 * This defines the ASN1 error code for no error or success.
54 #ifndef ASN1_CONFIG_NO_ERROR
55 #define ASN1_CONFIG_NO_ERROR 0
56 #endif // ASN1_CONFIG_NO_ERROR
59 * @def ASN1_CONFIG_ERROR_MIN
62 * This defines the base or minimum ASN1 error number range.
65 #ifndef ASN1_CONFIG_ERROR_MIN
66 #define ASN1_CONFIG_ERROR_MIN 5000
67 #endif // ASN1_CONFIG_ERROR_MIN
70 * @def ASN1_CONFIG_ERROR_MAX
73 * This defines the top or maximum ASN1 error number range.
76 #ifndef ASN1_CONFIG_ERROR_MAX
77 #define ASN1_CONFIG_ERROR_MAX 5999
78 #endif // ASN1_CONFIG_ERROR_MAX
81 * @def _ASN1_CONFIG_ERROR
84 * This defines a mapping function for ASN1 errors that allows
85 * mapping such errors into a platform- or system-specific range.
88 #ifndef _ASN1_CONFIG_ERROR
89 #define _ASN1_CONFIG_ERROR(e) (ASN1_ERROR_MIN + (e))
90 #endif // _ASN1_CONFIG_ERROR