JetMainframeDeviceManager.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using Aitex.Common.Util;
  2. using Aitex.Core.RT.Device;
  3. using Aitex.Core.Util;
  4. using MECF.Framework.Common.Equipment;
  5. using MECF.Framework.Common.IOCore;
  6. using MECF.Framework.RT.Core.IoProviders;
  7. using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.FFUs.AAF;
  8. using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.JEL;
  9. using MECF.Framework.RT.ModuleLibrary.PMModules;
  10. namespace JetMainframe
  11. {
  12. public class JetMainframeDeviceManager : Singleton<JetMainframeDeviceManager>
  13. {
  14. private DeviceController _controller;
  15. private DeviceManagerBase _device;
  16. public JetMainframeDeviceManager()
  17. {
  18. _controller = new DeviceController();
  19. _device = new DeviceManagerBase(true);
  20. }
  21. public void Initialize()
  22. {
  23. string ioProviderPathFile = PathManager.GetCfgDir() + "JetMainframe//IoProviderConfig.xml";
  24. IoProviderManager.Instance.Initialize(ioProviderPathFile, "System", "io");
  25. IoManager.Instance.Initialize(PathManager.GetCfgDir() + "JetMainframe//interlockMainFrame.xml");
  26. _device.Initialize(PathManager.GetCfgDir() + "JetMainframe//DeviceModelMainframe.xml", "JetMainframe", ModuleName.System,
  27. "System");
  28. _device.AddCustomDevice(new JelRobot("TM", "TMRobot", "TM"));
  29. _device.AddCustomDevice(new FfuAAF("TM", "FFU", "TM"));
  30. _controller.Start(_device);
  31. }
  32. public void Reset()
  33. {
  34. _controller.Reset();
  35. }
  36. public void Terminate()
  37. {
  38. _controller.Terminate();
  39. }
  40. }
  41. }