using System.Collections.Generic; using MECF.Framework.Common.Equipment; using MECF.Framework.RT.ModuleLibrary.EfemModules; using MECF.Framework.RT.ModuleLibrary.SystemModules; using MECF.Framework.RT.ModuleLibrary.TMModules; using EfemDualSchedulerLib.Schedulers; namespace EfemDualSchedulerLib.Schedulers { public class SchedulerModuleFactory { protected SchedulerTM _tmRobot; protected SchedulerEFEM _efem; protected SchedulerLoadPort _lp1 = new SchedulerLoadPort(ModuleName.LP1); protected SchedulerLoadPort _lp2 = new SchedulerLoadPort(ModuleName.LP2); protected SchedulerLoadPort _lp3 = new SchedulerLoadPort(ModuleName.LP3); protected SchedulerAligner _aligner = new SchedulerAligner(ModuleName.Aligner); //protected SchedulerLoadPort _lp4 = new SchedulerLoadPort(ModuleName.LP4); protected SchedulerLoadLock _loadlockA = new SchedulerLoadLock(ModuleName.LLA); protected SchedulerLoadLock _loadlockB = new SchedulerLoadLock(ModuleName.LLB); protected SchedulerPM _pm1 = new SchedulerPM(ModuleName.PMA); protected SchedulerPM _pm2 = new SchedulerPM(ModuleName.PMB); //protected SchedulerPM _pm3 = new SchedulerPM(ModuleName.PMC); //protected List _lstPms = new List(); //protected List _lstLps = new List(); //protected List _lstLoadLocks = new List(); public SchedulerModuleFactory() { _tmRobot = new SchedulerTM(EquipmentManager.Modules[ModuleName.TM] as TMModuleBase); _efem = new SchedulerEFEM(EquipmentManager.Modules[ModuleName.EFEM] as EfemModuleBase); _loadlockA = new SchedulerLoadLock(ModuleName.LLA); _loadlockB = new SchedulerLoadLock(ModuleName.LLB); _lp1 = new SchedulerLoadPort(ModuleName.LP1); _lp2 = new SchedulerLoadPort(ModuleName.LP2); _lp3 = new SchedulerLoadPort(ModuleName.LP3); _pm1 = new SchedulerPM(ModuleName.PMA); _pm2 = new SchedulerPM(ModuleName.PMB); _aligner = new SchedulerAligner(ModuleName.Aligner); //_pm3 = new SchedulerPM(ModuleName.PMC); //_lstLps.AddRange(new[] { _lp1, _lp2, _lp3 }); //_lstLoadLocks.AddRange(new[] { _lla, _llb }); //if (EquipmentManager.Modules[ModuleName.PMA].IsInstalled) // _lstPms.Add(_pm1); //if (EquipmentManager.Modules[ModuleName.PMB].IsInstalled) // _lstPms.Add(_pm2); //if (EquipmentManager.Modules[ModuleName.PMC].IsInstalled) // _lstPms.Add(_pm3); } protected SchedulerModule GetModule(string name) { switch (ModuleHelper.Converter(name)) { case ModuleName.LP1: return _lp1; case ModuleName.LP2: return _lp2; case ModuleName.LP3: return _lp3; //case ModuleName.LP4: // return _lp4; case ModuleName.LLA: return _loadlockA; case ModuleName.LLB: return _loadlockB; case ModuleName.Aligner: return _aligner; case ModuleName.EfemRobot: case ModuleName.EFEM: return _efem; case ModuleName.TMRobot: case ModuleName.TM: return _tmRobot; case ModuleName.PMA: return _pm1; case ModuleName.PMB: return _pm2; //case ModuleName.PMC: // return _pm3; } return null; } } }