SchedulerLoadLock.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using System.Diagnostics;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Aitex.Core.RT.Fsm;
  7. using Aitex.Core.Util;
  8. using Aitex.Core.RT.SCCore;
  9. using Aitex.Sorter.Common;
  10. using MECF.Framework.Common.Equipment;
  11. using MECF.Framework.Common.Schedulers;
  12. using MECF.Framework.Common.SubstrateTrackings;
  13. using Venus_RT.Scheduler;
  14. namespace Venus_RT.Modules.Schedulers
  15. {
  16. public class SchedulerLoadLock : SchedulerModule
  17. {
  18. public override bool IsAvailable
  19. {
  20. get { return _entity.IsIdle && (_entity.IsOnline || !Singleton<RouteManager>.Instance.IsAutoMode) && CheckTaskDone(); }
  21. }
  22. public override bool IsOnline
  23. {
  24. get { return _entity.IsOnline; }
  25. }
  26. public override bool IsError
  27. {
  28. get { return _entity.IsError; }
  29. }
  30. public override bool IsIdle
  31. {
  32. get { return _entity.IsIdle; }
  33. }
  34. public override bool IsVac
  35. {
  36. get { return _entity.IsVac; }
  37. }
  38. public override bool IsAtm
  39. {
  40. get { return _entity.IsATM; }
  41. }
  42. private LLEntity _entity = null;
  43. public SchedulerLoadLock(ModuleName module) : base(module.ToString())
  44. {
  45. _entity = Singleton<RouteManager>.Instance.GetLL(module);
  46. }
  47. private bool CheckTaskDone()
  48. {
  49. return true;
  50. }
  51. public List<int> GetOrderedOutSlot()
  52. {
  53. return WaferArriveTicks.OrderBy(item => item.Value).ToDictionary(k => k.Key, v => v.Value).Keys.ToList();
  54. }
  55. }
  56. }