Ejemplo n.º 1
0
 //对位的光电状态
 private void RfPosMsgSend(FerryPosSet set, DevFerry ferry)
 {
     if (!PubTask.Rf.SendFerryLightPos(set.MEID, ferry.UpSite, ferry.DownSite, ferry.UpLight, ferry.DownLight) &&
         mTimer.IsOver(TimerTag.RfFerrySiteUpdateSendOffline, ferry.DeviceID, 60))
     {
         StopRfPosSet(set.MEID);
     }
 }
Ejemplo n.º 2
0
 public void StartFerryPosSetting(uint id, ushort code)
 {
     StopFerryPosSetting();
     if (!_FerryPosSetList.Exists(c => c.FerryId == id && !c.IsRF))
     {
         FerryPosSet set = new FerryPosSet();
         set.FerryId  = id;
         set.IsRF     = false;
         set.QueryPos = code;
         _FerryPosSetList.Add(set);
     }
     _IsSetting = true;
 }
Ejemplo n.º 3
0
        private void RfPosSiteMsgSend(FerryPosSet set, uint devid, DevFerrySite site)
        {
            if (site.TrackCode != 0  //&& site.TrackPos != 0
                )
            {
                PubMaster.Track.UpdateFerryPos(devid, site.TrackCode, site.TrackPos);
                //PubTask.Rf.SendFerryPos(devid, set.IP);

                if (!PubTask.Rf.SendSucc2Rf(set.MEID, FunTag.UpdateFerryPos, "ok") &&
                    mTimer.IsOver(TimerTag.RfFerrySiteUpdateSendOffline, devid, 60, 10))
                {
                    StopRfPosSet(set.MEID);
                }
            }
            PubTask.Rf.SendFerrySitePos(set.MEID, devid, site);
        }
Ejemplo n.º 4
0
        public void StartRfPosSet(string meid, uint ferryid)
        {
            FerryPosSet set = _FerryPosSetList.Find(c => meid.Equals(c.MEID));

            if (set == null)
            {
                set         = new FerryPosSet();
                set.FerryId = ferryid;
                set.IsRF    = true;
                set.MEID    = meid;
                _FerryPosSetList.Add(set);
            }
            else
            {
                set.FerryId = ferryid;
            }
            _IsSetting = true;
        }