/// <summary> /// 清除绑定 /// </summary> public void ClearBanding() { if (_bandingDev != null) { if (_bandingDev.SiteMark != SiteMark || !_bandingDev.IsAlive) { _bandingDev = null; } } }
/// <summary> /// 添加新绑定 /// </summary> public void CheckInDate(IDev dev) { if (!DevIsInBangding(dev)) { foreach (var item in WaitDic.Values) { item.CheckBangding(dev); } } }
/// <summary> /// 判断设备是否处于待命地标上 /// </summary> /// <param name="dev"></param> /// <returns></returns> public bool IsDevOnWaitSite(IDev dev) { foreach (var item in WaitDic.Values) { if (item.SiteMark == dev.SiteMark) { return(true); } } return(false); }
/// <summary> /// 判断设备是否处于绑定中 /// </summary> /// <param name="dev"></param> /// <returns></returns> public bool DevIsInBangding(IDev dev) { foreach (var item in WaitDic.Values) { if (item.BandingDev == dev) { return(true); } } return(false); }
/// <summary> /// AGV地标与待命点一致且AGV在线,则绑定 /// </summary> /// <param name="dev"></param> public void CheckBangding(IDev dev) { if (dev != null) { if (_bandingDev == null) { if (dev.SiteMark == SiteMark && dev.IsAlive) { _bandingDev = dev; } } } }