SchedulerLoadLock.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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.IsInclude && (_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. public override int TimeToReady
  43. {
  44. get { return _entity.TimeToReady; }
  45. }
  46. private LLEntity _entity = null;
  47. public SchedulerLoadLock(ModuleName module) : base(module.ToString())
  48. {
  49. _entity = Singleton<RouteManager>.Instance.GetLL(module);
  50. }
  51. private bool CheckTaskDone()
  52. {
  53. return true;
  54. }
  55. public List<int> GetOrderedOutSlot()
  56. {
  57. return WaferArriveTicks.OrderBy(item => item.Value).ToDictionary(k => k.Key, v => v.Value).Keys.ToList();
  58. }
  59. }
  60. }