JetEfemDeviceManager.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using Aitex.Core.RT.Device;
  2. using Aitex.Core.RT.SCCore;
  3. using Aitex.Core.Util;
  4. using JetEfemLib.Aligners;
  5. using JetEfemLib.Efems;
  6. using JetEfemLib.LPs;
  7. using JetEfemLib.SignalTowers;
  8. using static JetEfemLib.Efems.EfemModule;
  9. namespace JetEfemLib
  10. {
  11. public class JetEfemDeviceManager : Singleton<JetEfemDeviceManager>
  12. {
  13. private DeviceController _controller;
  14. private DeviceManagerBase _device;
  15. public JetEfemDeviceManager()
  16. {
  17. _controller = new DeviceController();
  18. _device = new DeviceManagerBase(true);
  19. }
  20. public void Initialize()
  21. {
  22. if (SC.GetValue<int>("EFEM.EfemType") == (int)EfemType.FutureEfem2P)
  23. {
  24. _device.AddCustomModuleDevice(new FutureEfem());
  25. _device.AddCustomDevice(new FutureEfemLoadPort("LP1", "LP1", "System.EFEM"));
  26. _device.AddCustomDevice(new FutureEfemLoadPort("LP2", "LP2", "System.EFEM"));
  27. _device.AddCustomDevice(new FutureEfemLoadPort("LP3", "LP3", "System.EFEM"));
  28. _device.AddCustomModuleDevice(new JetEfemRobot("EfemRobot", "EfemRobot", "System.EFEM"));
  29. }
  30. else if (SC.GetValue<int>("EFEM.EfemType") == (int)EfemType.JetEfem)
  31. {
  32. _device.AddCustomModuleDevice(new JetEfem());
  33. _device.AddCustomDevice(new JetEfemLoadPort("LP1", "LP1", "System.EFEM"));
  34. _device.AddCustomDevice(new JetEfemLoadPort("LP2", "LP2", "System.EFEM"));
  35. _device.AddCustomDevice(new JetEfemLoadPort("LP3", "LP3", "System.EFEM"));
  36. _device.AddCustomModuleDevice(new JetEfemRobot("EfemRobot", "EfemRobot", "System.EFEM"));
  37. }
  38. else if (SC.GetValue<int>("EFEM.EfemType") == (int)EfemType.FutureEfem3P)
  39. {
  40. _device.AddCustomModuleDevice(new FutureEfem3P());
  41. _device.AddCustomDevice(new FutureEfemLoadPort3P("LP1", "LP1", "System.EFEM"));
  42. _device.AddCustomDevice(new FutureEfemLoadPort3P("LP2", "LP2", "System.EFEM"));
  43. _device.AddCustomDevice(new FutureEfemLoadPort3P("LP3", "LP3", "System.EFEM"));
  44. _device.AddCustomModuleDevice(new JetEfemRobot("EfemRobot", "EfemRobot", "System.EFEM"));
  45. }
  46. _device.AddCustomDevice(new FutureBuffer("LLA", "LLA", "System.EFEM"));
  47. _device.AddCustomDevice(new FutureBuffer("LLB", "LLB", "System.EFEM"));
  48. _device.AddCustomModuleDevice(new JetEfemSignalTower("System", "SignalTower", "System.EFEM"));
  49. _device.AddCustomModuleDevice(new FutureAligner("Aligner1", "Aligner1", "System.EFEM"));
  50. _device.AddCustomModuleDevice(new FutureAligner("Aligner2", "Aligner2", "System.EFEM"));
  51. _device.AddCustomModuleDevice(new FutureAligner("Cooling1", "Cooling1", "System.EFEM"));
  52. _device.AddCustomModuleDevice(new FutureAligner("Cooling2", "Cooling2", "System.EFEM"));
  53. _controller.Start(_device);
  54. }
  55. public void Reset()
  56. {
  57. _controller.Reset();
  58. }
  59. public void Terminate()
  60. {
  61. _controller.Terminate();
  62. }
  63. }
  64. }