示例#1
0
 public DataSluLamp5(Wlst.client.SluCtrlDataMeasureReply.DataSluCtrlLamp info, int sluId, int ctrlId, int state)
     : base(info, state)
 {
     SluId          = sluId;
     CtrlId         = ctrlId;
     this.CtrlPhyId = NewDataViewModel.GetPhyIdByRtuId(sluId, ctrlId);
 }
示例#2
0
        public DataSluAssis6(Wlst.client.SluCtrlDataMeasureReply.AssistCtrlData.LightData data, int sluId, int ctrlId, double leakageCurrent)
            : base(data)
        {
            SluId = sluId;

            this.CtrlId = ctrlId;

            LeakageCurrent    = leakageCurrent.ToString("f2");
            this.CtrlPhyId    = NewDataViewModel.GetPhyIdByRtuId(sluId, ctrlId);
            this.CtrlLampCode = NewDataViewModel.GetLampCode(sluId, ctrlId);
            this.BarCode      = NewDataViewModel.GetBarCode(sluId, ctrlId).PadLeft(13, '0');
        }
示例#3
0
 public DataSluUnknow2(Wlst.client.SluCtrlDataMeasureReply.UnknowCtrl info, int sluId)
     : base(info)
 {
     SluId          = sluId;
     this.CtrlPhyId = NewDataViewModel.GetPhyIdByRtuId(sluId, info.CtrlId);
 }
示例#4
0
        public DataSluPhy4(Wlst.client.SluCtrlDataMeasureReply.CtrlPhyinfo tmp, int sluId, int ctrlId)
        {
            // SetSluNameId(sluId);
            this.CtrlId    = ctrlId;
            this.CtrlPhyId = NewDataViewModel.GetPhyIdByRtuId(sluId, ctrlId);
            SluId          = sluId;

            SignalStrength    = tmp.SignalStrength;
            Phase             = tmp.Phase == 1 ? "A相" : tmp.Phase == 2 ? "B相" : tmp.Phase == 3 ? "C相" : "未知";
            UsefulCommunicate = tmp.UsefulCommunicate;
            AllCommunicate    = tmp.AllCommunicate;
            CtrlLoop          = tmp.CtrlLoop;
            PowerSaving       = tmp.PowerSaving == 0
                             ? "无控制"
                             : tmp.PowerSaving == 1
                                   ? "只有开关灯"
                                   : tmp.PowerSaving == 2
                                         ? "调档节能"
                                         : tmp.PowerSaving == 3
                                               ? "调光节能"
                                               : tmp.PowerSaving == 4 ? "RS485" : "调光";
            HasLeakage     = tmp.HasLeakage ? "有" : "无";
            HasTemperature = tmp.HasTemperature ? "有" : "无";
            HasTimer       = tmp.HasTimer ? "有" : "无";
            //Model = tmp.Model == 1 ? "wj2090j" : "未知";
            //lvf 2018年4月8日11:23:36  添加控制器型号解析
            switch (tmp.Model)
            {
            case 0:
                Model = "未知";
                break;

            case 1:
                Model = "WJ2090J";
                break;

            case 2:
                Model = "WJ2090K";
                break;

            case 3:
                Model = "WJ2090C";
                break;

            case 4:
                Model = "WJ2090D";
                break;

            case 5:
                Model = "WJ2090L";
                break;

            case 6:
                Model = "WJ2090M";
                break;

            case 7:
                Model = "WJ4090";
                break;

            default:
                Model = "";
                break;
            }

            Routing = tmp.Routing;
        }