using System; using System.Collections.Generic; using System.IO; using Aitex.Common.Util; using Aitex.Core.Account; using Aitex.Core.RT.ConfigCenter; using Aitex.Core.RT.DataCenter; using Aitex.Core.RT.DataCollection; using Aitex.Core.RT.DBCore; using Aitex.Core.RT.Device; using Aitex.Core.RT.Device.Unit; using Aitex.Core.RT.Event; using Aitex.Core.RT.Key; using Aitex.Core.RT.Log; using Aitex.Core.RT.OperationCenter; using Aitex.Core.RT.RecipeCenter; using Aitex.Core.Util; using Aitex.Core.WCF; using MECF.Framework.Common.Account; using MECF.Framework.Common.Equipment; using MECF.Framework.Common.IOCore; using MECF.Framework.Common.SCCore; using MECF.Framework.Common.SubstrateTrackings; using MECF.Framework.RT.Core.Applications; using MECF.Framework.RT.Core.Backend; using MECF.Framework.RT.Core.IoProviders; using SorterRT.Modules; using Virgo_DCommon; using Virgo_DRT.Backends; using Virgo_DRT.Modules; namespace Virgo_DRT.Instances { class ToolLoader : IRtLoader { public void Initialize() { Singleton.Instance.Initialize(); Singleton.Instance.Initialize(); Singleton.Instance.Initialize( System.Configuration.ConfigurationManager.ConnectionStrings["PostgreSQL"].ConnectionString , RtInstance.DatabaseName , PathManager.GetCfgDir() + "DBModel.sql"); Singleton.Instance.Initialize(PathManager.GetCfgDir() + "EventDefine.xml"); Singleton.Instance.Initialize(); Singleton.Instance.Initialize(); RecipeFileManager.Instance.Initialize(null); Singleton.Instance.Initialize(PathManager.GetCfgDir() + "System.sccfg"); IoProviderManager.Instance.Initialize(PathManager.GetCfgDir() + "IoProviderConfig.xml"); IoManager.Instance.Initialize(PathManager.GetCfgDir() + "Interlock.Virgo_D.xml"); WaferManager.Instance.Initialize(); AccountExManager.Instance.Initialize(true); // Device manager Singleton.Instance.Initialize(); Singleton.Instance.Initialize(); DataCollectionManager.Instance.Initialize(RtInstance.DatabaseName); KeyManager.Instance.Initialize(DEVICE.GetDevice($"PMA.{Virgo_DDevice.PlcDateTime}")); RtSystemManager.Instance.AddCustomBackend("SC", new BackendSCConfigView()); RtSystemManager.Instance.AddCustomBackend("IO", new IOView()); RtSystemManager.Instance.AddCustomBackend("FSM", new FSMView()); RtSystemManager.Instance.AddCustomBackend("License", new LicenseView()); Singleton.Instance.Initialize(); LOG.Info("Virgo_DRT succeed to Launch"); } public void Terminate() { Singleton.Instance.Terminate(); Singleton.Instance.Terminate(); IoProviderManager.Instance.Terminate(); Singleton.Instance.Terminate(); DataCollectionManager.Instance.Terminate(); Singleton.Instance.Terminate(); Singleton.Instance.Terminate(); Singleton.Instance.Terminate(); Singleton.Instance.Terminate(); } } }