Beispiel #1
0
        public void SetData(Wlst.client.SluCtrlDataMeasureReply.DataSluCtrl tmp)
        {
            SampleTime   = new DateTime(tmp.DateCreate).ToString("yyyy-MM-dd HH:mm:ss");
            OrderId      = tmp.OrderId;
            DateTimeCtrl = new DateTime(tmp.DateTimeCtrl).ToString("yyyy-MM-dd HH:mm:ss");
            Temperature  = tmp.Temperature;

            Status = tmp.Status == 0
                         ? "正常"
                         : tmp.Status == 1
                               ? "电压越上限"
                               : tmp.Status == 2
                                     ? "电压越下限"
                                     : "通讯故障";

            if (tmp.Status == 3)
            {
                IsAdjust            = "--";
                IsWorkingArgsSet    = "--";
                IsNoAlarm           = "--";
                IsCtrlStop          = "--";
                IsEepromError       = "--";
                IsTemperatureSensor = "--";
                SampleTime          = "--";
            }
            else
            {
                IsAdjust            = tmp.IsAdjust ? "已校准" : "未校准";
                IsWorkingArgsSet    = tmp.IsWorkingArgsSet ? "已设置" : "未设置";
                IsNoAlarm           = tmp.IsNoAlarm ? "禁止" : "允许";
                IsCtrlStop          = tmp.IsCtrlStop ? "停运" : "正常";
                IsEepromError       = tmp.IsEepromError ? "故障" : "正常";
                IsTemperatureSensor = tmp.IsTemperatureSensor ? "故障" : "正常";
            }
        }
 public DataCtrlItem(Wlst.client.SluCtrlDataMeasureReply.DataSluCtrl tmp, int index)
 {
     Index        = index;
     SampleTime   = new DateTime(tmp.DateCreate).ToString("yyyy-MM-dd HH:mm:ss");
     OrderId      = tmp.OrderId;
     DateTimeCtrl = new DateTime(tmp.DateTimeCtrl).ToString("yyyy-MM-dd HH:mm:ss");
     Temperature  = tmp.Temperature;
     Status       = tmp.Status == 0
                 ? "正常"
                 : tmp.Status == 1
                       ? "电压越上限"
                       : tmp.Status == 2
                             ? "电压越下限"
                             : "通讯故障";
     IsAdjust            = tmp.IsAdjust ? "已校准" : "未校准";
     IsWorkingArgsSet    = tmp.IsWorkingArgsSet ? "已设置" : "未设置";
     IsNoAlarm           = tmp.IsNoAlarm ? "禁止" : "允许";
     IsCtrlStop          = tmp.IsCtrlStop ? "停运" : "正常";
     IsEepromError       = tmp.IsEepromError ? "故障" : "正常";
     IsTemperatureSensor = tmp.IsTemperatureSensor ? "故障" : "正常";
     if (Wlst.Sr.EquipmentInfoHolding.Services.EquipmentDataInfoHold.InfoItems.ContainsKey(tmp.SluId))
     {
         SluId = Sr.EquipmentInfoHolding.Services.EquipmentDataInfoHold.GetInfoById(tmp.SluId).RtuPhyId.ToString("D4");
     }
     ControlId   = Wj2090Module.Services.CommonSlu.GetPhyIdByCtrl(tmp.SluId, tmp.CtrlId);
     ControlName = Wj2090Module.Services.CommonSlu.GetNameByCtrl(tmp.SluId, tmp.CtrlId);
 }
Beispiel #3
0
 public DataCtrlItemInfo(Wlst.client.SluCtrlDataMeasureReply.DataSluCtrl tt, int index)
     : base(tt, index)
 {
 }