SchedulerModuleFactory.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 _aligner = new SchedulerAligner(ModuleName.Aligner);
  17. //protected SchedulerLoadPort _lp4 = new SchedulerLoadPort(ModuleName.LP4);
  18. protected SchedulerLoadLock _loadlockA = new SchedulerLoadLock(ModuleName.LLA);
  19. protected SchedulerLoadLock _loadlockB = new SchedulerLoadLock(ModuleName.LLB);
  20. protected SchedulerPM _pm1 = new SchedulerPM(ModuleName.PMA);
  21. protected SchedulerPM _pm2 = new SchedulerPM(ModuleName.PMB);
  22. //protected SchedulerPM _pm3 = new SchedulerPM(ModuleName.PMC);
  23. //protected List<SchedulerPM> _lstPms = new List<SchedulerPM>();
  24. //protected List<SchedulerLoadPort> _lstLps = new List<SchedulerLoadPort>();
  25. //protected List<SchedulerLoadLock> _lstLoadLocks = new List<SchedulerLoadLock>();
  26. public SchedulerModuleFactory()
  27. {
  28. _tmRobot = new SchedulerTM(EquipmentManager.Modules[ModuleName.TM] as TMModuleBase);
  29. _efem = new SchedulerEFEM(EquipmentManager.Modules[ModuleName.EFEM] as EfemModuleBase);
  30. _loadlockA = new SchedulerLoadLock(ModuleName.LLA);
  31. _loadlockB = new SchedulerLoadLock(ModuleName.LLB);
  32. _lp1 = new SchedulerLoadPort(ModuleName.LP1);
  33. _lp2 = new SchedulerLoadPort(ModuleName.LP2);
  34. _lp3 = new SchedulerLoadPort(ModuleName.LP3);
  35. _pm1 = new SchedulerPM(ModuleName.PMA);
  36. _pm2 = new SchedulerPM(ModuleName.PMB);
  37. _aligner = new SchedulerAligner(ModuleName.Aligner);
  38. //_pm3 = new SchedulerPM(ModuleName.PMC);
  39. //_lstLps.AddRange(new[] { _lp1, _lp2, _lp3 });
  40. //_lstLoadLocks.AddRange(new[] { _lla, _llb });
  41. //if (EquipmentManager.Modules[ModuleName.PMA].IsInstalled)
  42. // _lstPms.Add(_pm1);
  43. //if (EquipmentManager.Modules[ModuleName.PMB].IsInstalled)
  44. // _lstPms.Add(_pm2);
  45. //if (EquipmentManager.Modules[ModuleName.PMC].IsInstalled)
  46. // _lstPms.Add(_pm3);
  47. }
  48. protected SchedulerModule GetModule(string name)
  49. {
  50. switch (ModuleHelper.Converter(name))
  51. {
  52. case ModuleName.LP1:
  53. return _lp1;
  54. case ModuleName.LP2:
  55. return _lp2;
  56. case ModuleName.LP3:
  57. return _lp3;
  58. //case ModuleName.LP4:
  59. // return _lp4;
  60. case ModuleName.LLA:
  61. return _loadlockA;
  62. case ModuleName.LLB:
  63. return _loadlockB;
  64. case ModuleName.Aligner:
  65. return _aligner;
  66. case ModuleName.EfemRobot:
  67. case ModuleName.EFEM:
  68. return _efem;
  69. case ModuleName.TMRobot:
  70. case ModuleName.TM:
  71. return _tmRobot;
  72. case ModuleName.PMA:
  73. return _pm1;
  74. case ModuleName.PMB:
  75. return _pm2;
  76. //case ModuleName.PMC:
  77. // return _pm3;
  78. }
  79. return null;
  80. }
  81. }
  82. }