Ejemplo n.º 1
0
        public JsonResult AdjustPoint(int point, EnmScType type, double adjust)
        {
            try {
                if (type != EnmScType.Aoc)
                {
                    throw new Exception("信号类型错误");
                }

                _orderService.SetOrder(new Order {
                    NodeId   = point,
                    NodeType = type,
                    OpType   = EnmSetValue.ReadWrite,
                    OpValue  = adjust
                });

                return(Json(new AjaxResultModel {
                    success = true, code = 200, message = "参数设置成功"
                }));
            } catch (Exception exc) {
                return(Json(new AjaxResultModel {
                    success = false, code = 400, message = exc.Message
                }));
            }
        }
Ejemplo n.º 2
0
        public static string GetScTypeDisplay(EnmScType type)
        {
            switch (type)
            {
            case EnmScType.None:
                return("未知");

            case EnmScType.LSC:
                return("监控中心");

            case EnmScType.Area:
                return("区域");

            case EnmScType.Station:
                return("局站");

            case EnmScType.Device:
                return("设备");

            case EnmScType.Aic:
                return("遥测");

            case EnmScType.Aoc:
                return("遥调");

            case EnmScType.Dic:
                return("遥信");

            case EnmScType.Doc:
                return("遥控");

            case EnmScType.Sic:
                return("字符输入量");

            case EnmScType.Soc:
                return("字符输出量");

            case EnmScType.Pic:
                return("图片输入量");

            case EnmScType.Poc:
                return("图片输出量");

            case EnmScType.Vic:
                return("视频输入量");

            case EnmScType.Voc:
                return("视频输出量");

            case EnmScType.ADic:
                return("音频输入量");

            case EnmScType.ADoc:
                return("音频输出量");

            case EnmScType.Str:
                return("字符");

            case EnmScType.Img:
                return("图片");

            case EnmScType.FS:
                return("前置机");

            case EnmScType.Bus:
                return("总线控制器");

            case EnmScType.Driver:
                return("总线控制器");

            default:
                return("未定义");
            }
        }