/**
 * Copyright (c) 2026 Huawei Technologies Co., Ltd.
 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
 * CANN Open Software License Agreement Version 2.0 (the "License").
 * Please refer to the License for details. You may not use this file except in compliance with the License.
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
 * See LICENSE in the root of the software repository for the full text of the License.
 */
#ifndef DRV_ERROR_CODE_H
#define DRV_ERROR_CODE_H

static const char g_drv_error_code[] =
    "{\n"
    "   \"error_info_list\": [\n"
    "       {\n"
    "           \"errClass\": \"Driver Errors\",\n"
    "           \"errTitle\": \"Invalid_Argument\",\n"
    "           \"ErrCode\": \"EL0016\",\n"
    "           \"ErrMessage\": \"%s failed. Value %s for parameter %s is invalid. Reason: %s.\",\n"
    "           \"Arglist\": \"func_name,para_value,para_name,reason\",\n"
    "           \"suggestion\": {\n"
    "               \"Possible Cause\": \"N/A\",\n"
    "               \"Solution\": \"Check the input parameter range of the function.\"\n"
    "           }\n"
    "       },\n"
    "       {\n"
    "           \"errClass\": \"Driver Errors\",\n"
    "           \"errTitle\": \"Invalid_Argument_Null_Pointer\",\n"
    "           \"ErrCode\": \"EL0017\",\n"
    "           \"ErrMessage\": \"%s failed because %s cannot be a null pointer.\",\n"
    "           \"Arglist\": \"func_name,para_name\",\n"
    "           \"suggestion\": {\n"
    "               \"Possible Cause\": \"N/A\",\n"
    "               \"Solution\": \"Check the input parameter range of the function.\"\n"
    "           }\n"
    "       },\n"
    "       {\n"
    "           \"errClass\": \"Driver Errors\",\n"
    "           \"errTitle\": \"Resource_Error_Insufficient_Host_Memory\",\n"
    "           \"ErrCode\": \"EL0018\",\n"
    "           \"ErrMessage\": \"Failed to allocate %s host memory requested by the %s module.\",\n"
    "           \"Arglist\": \"size,moduleName\",\n"
    "           \"suggestion\": {\n"
    "               \"Possible Cause\": \"Allocation failed due to insufficient host memory.\",\n"
    "               \"Solution\": \"Ensure that the required memory is available. Take measures such as stopping "
    "unnecessary processes to free memory.\"\n"
    "           }\n"
    "       },\n"
    "       {\n"
    "           \"errClass\": \"Driver Errors\",\n"
    "           \"errTitle\": \"Resource_Error_Insufficient_Device_Memory\",\n"
    "           \"ErrCode\": \"EL0019\",\n"
    "           \"ErrMessage\": \"Failed to allocate %s device memory requested by the %s module.\",\n"
    "           \"Arglist\": \"size,moduleName\",\n"
    "           \"suggestion\": {\n"
    "               \"Possible Cause\": \"Allocation failed due to insufficient device memory.\",\n"
    "               \"Solution\": \"Stop unnecessary processes and ensure that the required memory is available.\"\n"
    "           }\n"
    "       },\n"
    "       {\n"
    "           \"errClass\": \"Driver Errors\",\n"
    "           \"errTitle\": \"Resource_Busy\",\n"
    "           \"ErrCode\": \"EL0020\",\n"
    "           \"ErrMessage\": \"Device %s is occupied by multiple containers.\",\n"
    "           \"Arglist\": \"deviceid\",\n"
    "           \"suggestion\": {\n"
    "               \"Possible Cause\": \"N/A\",\n"
    "               \"Solution\": \"1.Check whether the device is shared by multiple containers."
    "                               2.If the device needs to be shared by multiple containers,"
    "                                 enable the single-device multi-container function by using npu-smi set -t "
    "device-share -i id -c chip_id -d value.\"\n"
    "           }\n"
    "       },\n"
    "       {\n"
    "           \"errClass\": \"Driver Errors\",\n"
    "           \"errTitle\": \"Not_Supported\",\n"
    "           \"ErrCode\": \"EL0021\",\n"
    "           \"ErrMessage\": \"The %s operation is not supported. Reason: %s.\",\n"
    "           \"Arglist\": \"func_name,reason\",\n"
    "           \"suggestion\": {\n"
    "               \"Possible Cause\": \"N/A\",\n"
    "               \"Solution\": \"N/A\"\n"
    "           }\n"
    "       },\n"
    "       {\n"
    "           \"errClass\": \"Driver Errors\",\n"
    "           \"errTitle\": \"Resource_Error_Insufficient_SQCQ\",\n"
    "           \"ErrCode\": \"EL0022\",\n"
    "           \"ErrMessage\": \"The number of SQ and CQ resources exceeds the upper limit. The maximum number of "
    "resources is %s.\",\n"
    "           \"Arglist\": \"max_value\",\n"
    "           \"suggestion\": {\n"
    "               \"Possible Cause\": \"N/A\",\n"
    "               \"Solution\": \"Check the allocation and release of SQ and CQ resources do not exceed the upper "
    "limit.\"\n"
    "            }\n"
    "       }\n"
    "   ]\n"
    "}\n";
#endif