using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Aitex.Core.RT.Fsm; using Aitex.Core.Util; using Aitex.Core.RT.SCCore; using Aitex.Sorter.Common; using MECF.Framework.Common.Equipment; using MECF.Framework.Common.Schedulers; using MECF.Framework.Common.SubstrateTrackings; using Venus_RT.Scheduler; namespace Venus_RT.Modules.Schedulers { public class SchedulerLoadLock : SchedulerModule { public override bool IsAvailable { get { return _entity.IsIdle && _entity.IsInclude && (_entity.IsOnline || !Singleton.Instance.IsAutoMode) && CheckTaskDone(); } } public override bool IsOnline { get { return _entity.IsOnline; } } public override bool IsError { get { return _entity.IsError; } } public override bool IsIdle { get { return _entity.IsIdle; } } public override bool IsVac { get { return _entity.IsVac; } } public override bool IsAtm { get { return _entity.IsATM; } } public override bool IsInclude { get { return _entity.IsInclude; } } public override int TimeToReady { get { return (IsOnline && IsInclude) ? _entity.TimeToReady : int.MaxValue / 2; ; } } private LLEntity _entity = null; public SchedulerLoadLock(ModuleName module) : base(module.ToString()) { _entity = Singleton.Instance.GetLL(module); } private bool CheckTaskDone() { return true; } public List GetOrderedOutSlot() { return WaferArriveTicks.OrderBy(item => item.Value).ToDictionary(k => k.Key, v => v.Value).Keys.ToList(); } public bool PreVent() { return _entity.Invoke(LLEntity.MSG.Vent.ToString()) == (int)LLEntity.MSG.Vent; } public bool PrePump() { return _entity.Invoke(LLEntity.MSG.Pump.ToString()) == (int)LLEntity.MSG.Pump; } } }