public static ChannelInterfaceViewModel GetA(string code)
        {
            var temp = new ChannelInterfaceViewModel();

            temp.Code       = code;
            temp.Name       = "电流";
            temp.OutputType = (int)OutputEnum.A;
            return(temp);
        }
Exemplo n.º 2
0
        public void Init()
        {
            if (ChannelType == (int)ChannelTypeEnum.FZ)
            {
                //通讯接口
                ChannelInterfaceList.Add(ChannelInterfaceViewModel.GetV("1"));
                ChannelInterfaceList.Add(ChannelInterfaceViewModel.GetA("2"));
                //ChannelInterfaceList.Add(ChannelInterfaceViewModel.GetV("2"));
                //ChannelInterfaceList.Add(ChannelInterfaceViewModel.GetA("2"));

                //监控参数
                MontiorParamList.Add(new MonitorParamViewModel {
                    Code = "1", InputMode = (int)InputModeEnum.Selector, Name = "负载模式", Val = "", ValType = (int)OutputEnum.N
                });
                MontiorParamList.Add(new MonitorParamViewModel {
                    Code = "2", InputMode = (int)InputModeEnum.Input, Name = "负载值(A/V)", Val = "0.000", ValType = (int)OutputEnum.N
                });
                MontiorParamList.Add(new MonitorParamViewModel {
                    Code = "3", InputMode = (int)InputModeEnum.Input, Name = "启动电压(V)", Val = "0.000", ValType = (int)OutputEnum.V
                });
                MontiorParamList.Add(new MonitorParamViewModel {
                    Code = "4", InputMode = (int)InputModeEnum.Input, Name = "电压上限(V)", Val = "0.000", ValType = (int)OutputEnum.V
                });
                MontiorParamList.Add(new MonitorParamViewModel {
                    Code = "5", InputMode = (int)InputModeEnum.Input, Name = "电压下限(V)", Val = "0.000", ValType = (int)OutputEnum.V
                });
                MontiorParamList.Add(new MonitorParamViewModel {
                    Code = "6", InputMode = (int)InputModeEnum.Input, Name = "电流上限(A)", Val = "0.000", ValType = (int)OutputEnum.A
                });
                MontiorParamList.Add(new MonitorParamViewModel {
                    Code = "7", InputMode = (int)InputModeEnum.Input, Name = "电流下限(A)", Val = "0.000", ValType = (int)OutputEnum.A
                });
            }
            if (ChannelType == (int)ChannelTypeEnum.JT)
            {
            }
            if (ChannelType == (int)ChannelTypeEnum.Temperature)
            {
                MontiorParamList.Add(new MonitorParamViewModel {
                    Code = "1", Name = "温度上限", Val = ""
                });
                MontiorParamList.Add(new MonitorParamViewModel {
                    Code = "2", Name = "温度下限", Val = ""
                });
            }
        }