using athosRT.Devices.EFEM.Task; using athosRT.tool; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace athosRT.Devices.EFEM.ABS { public class InitBusyPolicy : CheckImp, IPolicy { public bool Check(string device, out string reason) { reason = string.Empty; if (device == "SignalTower") return true; IServerModule entity = this.GetEntity(device); if (entity is RobotServerModule) { if ((entity.Busy || entity.InUsed) && !entity.Error) { if (entity.Busy) LogObject.Warning("BusyPolicy " , device + " is Busy"); if (entity.InUsed) LogObject.Warning("BusyPolicy " , device + " is InUsed"); reason = "BUSY"; return false; } } else if (entity.Busy || entity.InUsed) { if (entity.Busy) LogObject.Warning("BusyPolicy " , device + " is Busy"); if (entity.InUsed) LogObject.Warning("BusyPolicy " , device + " is InUsed"); reason = "BUSY"; return false; } return true; } } }