using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FLY.Thick.Base.Common
{
    public struct ERRNO
    {
        public byte Type;
        public byte Code;
        public string Descrption;
    }
    public static class ERRNOs
    {
        static ERRNOs() 
        {
            BASE_ERRNO_NORMAL = new ERRNO() { Type = 0, Code = 0, Descrption = "正常" };
            BASE_ERRNO_RINGTEST = new ERRNO() { Type = 0, Code = 1, Descrption = "报警测试" };
            BASE_ERRNO_AD_MIN = new ERRNO() { Type = 0, Code = 2, Descrption = "AD值太小" };
            BASE_ERRNO_AD_MAX = new ERRNO() { Type = 0, Code = 3, Descrption = "AD值太大" };
            BASE_ERRNO_EMERGENCY = new ERRNO() { Type = 0, Code = 4, Descrption = "急停" };
            BASE_ERRNO_LIMIT = new ERRNO() { Type = 0, Code = 5, Descrption = "限位" };
            BASE_ERRNO_FLYAD7DISCONNECTED = new ERRNO() { Type = 0, Code = 6, Descrption = "枫莱尔控制器连接断开" };
            BASE_ERRNO_LICENSE_TIP = new ERRNO() { Type = 0, Code = 7, Descrption = "授权将要过期" };
            BASE_ERRNO_LICENSE = new ERRNO() { Type = 0, Code = 8, Descrption = "授权限制" };
            BASE_ERRNO_FILE_ERR_RESTORE = new ERRNO() { Type = 0, Code = 9, Descrption = "数据文件异常，恢复不成功" };
            BASE_ERRNO_FILE_RESTORE = new ERRNO() { Type = 0, Code = 10, Descrption = "数据文件异常，恢复成功" };

            SCAN_ERRNO_OVERRUN  = new ERRNO() { Type = 1, Code = 1, Descrption = "扫描报警" };
            SEGMENT_ERRNO_OVERRUN  = new ERRNO() { Type = 2, Code = 1, Descrption = "段长报警" };
        }
        #region 基础报警类型
        /// <summary>
        /// 正常
        /// </summary>
        public static ERRNO BASE_ERRNO_NORMAL;
        /// <summary>
        /// 报警测试
        /// </summary>
        public static ERRNO BASE_ERRNO_RINGTEST;

        /// <summary>
        /// AD值太小
        /// </summary>
        public static ERRNO BASE_ERRNO_AD_MIN;

        /// <summary>
        /// AD值太大
        /// </summary>
        public static ERRNO BASE_ERRNO_AD_MAX;

        /// <summary>
        /// 急停
        /// </summary>
        public static ERRNO BASE_ERRNO_EMERGENCY;

        /// <summary>
        /// 限位
        /// </summary>
        public static ERRNO BASE_ERRNO_LIMIT;

        /// <summary>
        /// 枫莱尔控制器连接断开
        /// </summary>
        public static ERRNO BASE_ERRNO_FLYAD7DISCONNECTED;

        /// <summary>
        /// 授权限制,提醒
        /// </summary>
        public static ERRNO BASE_ERRNO_LICENSE_TIP;

        /// <summary>
        /// 授权限制
        /// </summary>
        public static ERRNO BASE_ERRNO_LICENSE;

        /// <summary>
        /// 数据文件加载出错
        /// </summary>
        public static ERRNO BASE_ERRNO_FILE_ERR_RESTORE;

        /// <summary>
        /// 数据文件加载出错
        /// </summary>
        public static ERRNO BASE_ERRNO_FILE_RESTORE;
        #endregion



        /// <summary>
        /// 扫描超限
        /// </summary>
        public static ERRNO SCAN_ERRNO_OVERRUN;

        /// <summary>
        /// 段长报警
        /// </summary>
        public static ERRNO SEGMENT_ERRNO_OVERRUN;

        
    }

}
