namespace Siger.ApiTools.Utilities
{
    public static class MachineStateHelper
    {
        /// <summary>
        /// 设备状态 描述（CNC）
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public static string GetMachineStatus(int code)
        {
            string desc = string.Empty;
            switch (code)
            {
                // 关机
                case 0:
                    desc = "设备关机";
                    break;
                case 1:
                    desc = "设备运行";
                    break;
                case 2:
                    desc = "设备调试";
                    break;
                case 3:
                    desc = "设备空闲";
                    break;
                case 4:
                    desc = "设备故障";
                    break;
                default:
                    desc = "未配置描述";
                    break;
            }
            return desc;
        }
    }
}
