SchedulerModuleFactory.cs 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. using System.Collections.Generic;
  2. using MECF.Framework.Common.Equipment;
  3. using MECF.Framework.RT.ModuleLibrary.EfemModules;
  4. using MECF.Framework.RT.ModuleLibrary.SystemModules;
  5. using MECF.Framework.RT.ModuleLibrary.TMModules;
  6. using EfemDualSchedulerLib.Schedulers;
  7. namespace EfemDualSchedulerLib.Schedulers
  8. {
  9. public class SchedulerModuleFactory
  10. {
  11. protected SchedulerTM _tmRobot;
  12. protected SchedulerEFEM _efem;
  13. protected SchedulerLoadPort _lp1 = new SchedulerLoadPort(ModuleName.LP1);
  14. protected SchedulerLoadPort _lp2 = new SchedulerLoadPort(ModuleName.LP2);
  15. protected SchedulerLoadPort _lp3 = new SchedulerLoadPort(ModuleName.LP3);
  16. protected SchedulerAligner _aligner1 = new SchedulerAligner(ModuleName.Aligner1);
  17. protected SchedulerAligner _aligner2 = new SchedulerAligner(ModuleName.Aligner2);
  18. protected SchedulerAligner _cooling1 = new SchedulerAligner(ModuleName.Cooling1);
  19. protected SchedulerAligner _cooling2 = new SchedulerAligner(ModuleName.Cooling2);
  20. //protected SchedulerLoadPort _lp4 = new SchedulerLoadPort(ModuleName.LP4);
  21. protected SchedulerLoadLock _loadlockA = new SchedulerLoadLock(ModuleName.LLA);
  22. protected SchedulerLoadLock _loadlockB = new SchedulerLoadLock(ModuleName.LLB);
  23. protected SchedulerPM _pm1 = new SchedulerPM(ModuleName.PMA);
  24. protected SchedulerPM _pm2 = new SchedulerPM(ModuleName.PMB);
  25. //protected SchedulerPM _pm3 = new SchedulerPM(ModuleName.PMC);
  26. //protected List<SchedulerPM> _lstPms = new List<SchedulerPM>();
  27. //protected List<SchedulerLoadPort> _lstLps = new List<SchedulerLoadPort>();
  28. //protected List<SchedulerLoadLock> _lstLoadLocks = new List<SchedulerLoadLock>();
  29. public SchedulerModuleFactory()
  30. {
  31. _tmRobot = new SchedulerTM(EquipmentManager.Modules[ModuleName.TM] as TMModuleBase);
  32. _efem = new SchedulerEFEM(EquipmentManager.Modules[ModuleName.EFEM] as EfemModuleBase);
  33. _loadlockA = new SchedulerLoadLock(ModuleName.LLA);
  34. _loadlockB = new SchedulerLoadLock(ModuleName.LLB);
  35. _lp1 = new SchedulerLoadPort(ModuleName.LP1);
  36. _lp2 = new SchedulerLoadPort(ModuleName.LP2);
  37. _lp3 = new SchedulerLoadPort(ModuleName.LP3);
  38. _pm1 = new SchedulerPM(ModuleName.PMA);
  39. _pm2 = new SchedulerPM(ModuleName.PMB);
  40. _aligner1 = new SchedulerAligner(ModuleName.Aligner1);
  41. _aligner2 = new SchedulerAligner(ModuleName.Aligner2);
  42. _cooling1 = new SchedulerAligner(ModuleName.Cooling1);
  43. _cooling2 = new SchedulerAligner(ModuleName.Cooling2);
  44. //_pm3 = new SchedulerPM(ModuleName.PMC);
  45. //_lstLps.AddRange(new[] { _lp1, _lp2, _lp3 });
  46. //_lstLoadLocks.AddRange(new[] { _lla, _llb });
  47. //if (EquipmentManager.Modules[ModuleName.PMA].IsInstalled)
  48. // _lstPms.Add(_pm1);
  49. //if (EquipmentManager.Modules[ModuleName.PMB].IsInstalled)
  50. // _lstPms.Add(_pm2);
  51. //if (EquipmentManager.Modules[ModuleName.PMC].IsInstalled)
  52. // _lstPms.Add(_pm3);
  53. }
  54. protected SchedulerModule GetModule(string name)
  55. {
  56. switch (ModuleHelper.Converter(name))
  57. {
  58. case ModuleName.LP1:
  59. return _lp1;
  60. case ModuleName.LP2:
  61. return _lp2;
  62. case ModuleName.LP3:
  63. return _lp3;
  64. //case ModuleName.LP4:
  65. // return _lp4;
  66. case ModuleName.LLA:
  67. return _loadlockA;
  68. case ModuleName.LLB:
  69. return _loadlockB;
  70. case ModuleName.Aligner1:
  71. return _aligner1;
  72. case ModuleName.Aligner2:
  73. return _aligner2;
  74. case ModuleName.Cooling1:
  75. return _cooling1;
  76. case ModuleName.Cooling2:
  77. return _cooling2;
  78. case ModuleName.EfemRobot:
  79. case ModuleName.EFEM:
  80. return _efem;
  81. case ModuleName.TMRobot:
  82. case ModuleName.TM:
  83. return _tmRobot;
  84. case ModuleName.PMA:
  85. return _pm1;
  86. case ModuleName.PMB:
  87. return _pm2;
  88. //case ModuleName.PMC:
  89. // return _pm3;
  90. }
  91. return null;
  92. }
  93. protected SchedulerModule GetModule(ModuleName name)
  94. {
  95. switch (name)
  96. {
  97. case ModuleName.LP1:
  98. return _lp1;
  99. case ModuleName.LP2:
  100. return _lp2;
  101. case ModuleName.LP3:
  102. return _lp3;
  103. //case ModuleName.LP4:
  104. // return _lp4;
  105. case ModuleName.LLA:
  106. return _loadlockA;
  107. case ModuleName.LLB:
  108. return _loadlockB;
  109. case ModuleName.Aligner1:
  110. return _aligner1;
  111. case ModuleName.Aligner2:
  112. return _aligner2;
  113. case ModuleName.Cooling1:
  114. return _cooling1;
  115. case ModuleName.Cooling2:
  116. return _cooling2;
  117. case ModuleName.EfemRobot:
  118. case ModuleName.EFEM:
  119. return _efem;
  120. case ModuleName.TMRobot:
  121. case ModuleName.TM:
  122. return _tmRobot;
  123. case ModuleName.PMA:
  124. return _pm1;
  125. case ModuleName.PMB:
  126. return _pm2;
  127. //case ModuleName.PMC:
  128. // return _pm3;
  129. }
  130. return null;
  131. }
  132. }
  133. }