1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef AIE_RETCODE_INNER_H 17 #define AIE_RETCODE_INNER_H 18 19 typedef enum { 20 // General error code 21 RETCODE_SUCCESS = 0, 22 RETCODE_FAILURE = -1, 23 // Common error code(1001~1099) 24 RETCODE_OUT_OF_MEMORY = 1001, 25 RETCODE_NULL_PARAM = 1002, 26 RETCODE_ALGORITHM_ID_INVALID = 1003, 27 RETCODE_MEMORY_COPY_FAILURE = 1004, 28 RETCODE_SERVER_NOT_INIT = 1005, 29 RETCODE_INVALID_PARAM = 1006, 30 31 // SA error code(1100~1199) 32 RETCODE_SA_SERVICE_EXCEPTION = 1100, 33 RETCODE_SA_CLIENT_EXCEPTION = 1101, 34 RETCODE_SA_ASYNC_HANDLER_NOT_FOUND = 1102, 35 36 // Server error code(1200~1299) 37 RETCODE_SO_LACK_SYMBOL = 1200, 38 RETCODE_PLUGIN_LOAD_FAILED = 1201, 39 RETCODE_OPEN_SO_FAILED = 1202, 40 RETCODE_NO_LISTENER_FOUND = 1203, 41 RETCODE_ENGINE_NOT_EXIST = 1204, 42 RETCODE_ENGINE_MANAGER_NOT_INIT = 1205, 43 RETCODE_NO_CLIENT_FOUND = 1206, 44 RETCODE_WRONG_INFER_MODE = 1207, 45 RETCODE_ASYNC_CB_STARTED = 1208, 46 47 // Client error code(1300~1399) 48 RETCODE_SYNC_MSG_TIMEOUT = 1300, 49 RETCODE_ASYNC_MSG_TIMEOUT = 1301, 50 51 // Thread error code(1400~1499) 52 RETCODE_START_THREAD_FAILED = 1400, 53 54 // Queue error code(1500~1599) 55 RETCODE_QUEUE_FULL = 1500, 56 RETCODE_QUEUE_EMPTY = 1501, 57 RETCODE_QUEUE_NODE_INVALID = 1502, 58 59 // Map error code(1600~1699) 60 RETCODE_EMPTY_MAP = 1600, 61 62 // Algorithm error code(1700~1799) 63 RETCODE_ALGORITHM_PROCESS_ERROR = 1700, 64 } AieInnerCode; 65 66 #endif // AIE_RETCODE_INNER_H 67