public void MTLMTSInfo(object sender, StanMsgHandlerArgs handler)
        {
            var bytes = handler.Message.Data;

            sc.ProtocolFormat.OHTMessage.MTL_MTS_INFO mtlmts_info = sc.BLL.LineBLL.Convert2Object_MTLMTSInfo(bytes);

            app.ObjCacheManager.putMTL_MTSCheckInfo(mtlmts_info);
        }
 public static void set(this sc.Data.VO.MaintainSpace mts, sc.ProtocolFormat.OHTMessage.MTL_MTS_INFO new_mtl_mts)
 {
     mts.Plc_Link_Stat   = new_mtl_mts.NetworkLink ? sc.App.SCAppConstants.LinkStatus.LinkOK : sc.App.SCAppConstants.LinkStatus.LinkFail;
     mts.Is_Eq_Alive     = new_mtl_mts.Alive;
     mts.MTxMode         = new_mtl_mts.Mode ? sc.ProtocolFormat.OHTMessage.MTxMode.Auto : sc.ProtocolFormat.OHTMessage.MTxMode.Manual;
     mts.Interlock       = new_mtl_mts.Interlock;
     mts.CurrentCarID    = new_mtl_mts.CarID;
     mts.SynchronizeTime = Convert.ToDateTime(new_mtl_mts.SynchronizeTime);
 }
 public static void set(this sc.Data.VO.MaintainLift mtl, sc.ProtocolFormat.OHTMessage.MTL_MTS_INFO new_mtl_mts)
 {
     mtl.Plc_Link_Stat = new_mtl_mts.NetworkLink ? sc.App.SCAppConstants.LinkStatus.LinkOK : sc.App.SCAppConstants.LinkStatus.LinkFail;
     mtl.Is_Eq_Alive   = new_mtl_mts.Alive;
     mtl.MTxMode       = new_mtl_mts.Mode ? sc.ProtocolFormat.OHTMessage.MTxMode.Auto : sc.ProtocolFormat.OHTMessage.MTxMode.Manual;
     mtl.Interlock     = new_mtl_mts.Interlock;
     mtl.CurrentCarID  = new_mtl_mts.CarID;
     mtl.MTLLocation   = new_mtl_mts.MTLLocation.Trim() == MTLLocation.Upper.ToString()? MTLLocation.Upper:
                         new_mtl_mts.MTLLocation.Trim() == MTLLocation.Bottorn.ToString()? MTLLocation.Bottorn:
                         MTLLocation.None;
     mtl.SynchronizeTime = Convert.ToDateTime(new_mtl_mts.SynchronizeTime);
 }
        public void putMTL_MTSCheckInfo(sc.ProtocolFormat.OHTMessage.MTL_MTS_INFO newMTLMTSInfo)
        {
            if (newMTLMTSInfo == null)
            {
                return;
            }
            AEQPT eqpt = Eqpts.Where(e => e.EQPT_ID == newMTLMTSInfo.StationID.Trim()).SingleOrDefault();

            if (eqpt is MaintainSpace)
            {
                MaintainSpace MTS = eqpt as MaintainSpace;
                MTS.Plc_Link_Stat            = newMTLMTSInfo.NetworkLink ? sc.App.SCAppConstants.LinkStatus.LinkOK : sc.App.SCAppConstants.LinkStatus.LinkFail;
                MTS.Is_Eq_Alive              = newMTLMTSInfo.Alive;
                MTS.MTxMode                  = newMTLMTSInfo.Mode ? sc.ProtocolFormat.OHTMessage.MTxMode.Auto : sc.ProtocolFormat.OHTMessage.MTxMode.Manual;
                MTS.Interlock                = newMTLMTSInfo.Interlock;
                MTS.CurrentCarID             = newMTLMTSInfo.CarID;
                MTS.CurrentPreCarOurDistance = Convert.ToUInt32(newMTLMTSInfo.Distance);
                MTS.SynchronizeTime          = Convert.ToDateTime(newMTLMTSInfo.SynchronizeTime);
                MTS.CarOutInterlock          = newMTLMTSInfo.CarOutInterlock;
                MTS.CarInMoving              = newMTLMTSInfo.CarInMoving;
            }
            else if (eqpt is MaintainLift)
            {
                MaintainLift MTL = eqpt as MaintainLift;
                MTL.Plc_Link_Stat            = newMTLMTSInfo.NetworkLink ? sc.App.SCAppConstants.LinkStatus.LinkOK : sc.App.SCAppConstants.LinkStatus.LinkFail;
                MTL.Is_Eq_Alive              = newMTLMTSInfo.Alive;
                MTL.MTxMode                  = newMTLMTSInfo.Mode ? sc.ProtocolFormat.OHTMessage.MTxMode.Auto : sc.ProtocolFormat.OHTMessage.MTxMode.Manual;
                MTL.Interlock                = newMTLMTSInfo.Interlock;
                MTL.CurrentCarID             = newMTLMTSInfo.CarID;
                MTL.MTLLocation              = newMTLMTSInfo.MTLLocation == MTLLocation.Bottorn.ToString() ? MTLLocation.Bottorn : newMTLMTSInfo.MTLLocation == MTLLocation.Upper.ToString() ? MTLLocation.Upper : MTLLocation.None;
                MTL.CurrentPreCarOurDistance = Convert.ToUInt32(newMTLMTSInfo.Distance);
                MTL.SynchronizeTime          = Convert.ToDateTime(newMTLMTSInfo.SynchronizeTime);
                MTL.CarOutInterlock          = newMTLMTSInfo.CarOutInterlock;
                MTL.CarInMoving              = newMTLMTSInfo.CarInMoving;
            }

            MTLMTSInfoUpdate?.Invoke(this, EventArgs.Empty);
        }