FaManager.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. using System.Collections.Generic;
  2. using Aitex.Common.Util;
  3. using Aitex.Core.RT.DataCenter;
  4. using Aitex.Core.RT.Event;
  5. using Aitex.Core.RT.Log;
  6. using Aitex.Core.RT.OperationCenter;
  7. using Aitex.Core.Util;
  8. using MECF.Framework.Common.Equipment;
  9. using Virgo_DCommon;
  10. namespace Virgo_DRT.HostWrapper
  11. {
  12. class FaManager : FaHost, IHostCallback
  13. {
  14. private const string PROCESS_START_INQUIRY = "PROCESS_START_INQUIRY";
  15. public void Initialize()
  16. {
  17. base.Initialize(this, PathManager.GetCfgDir()+ "ClusterGemModel.xml");
  18. OP.Subscribe("FACommand", InvokeFaCommand );
  19. DATA.Subscribe(ModuleNameString.System, DataName.Fa_CommunicationStatus, () => FaCommunicationState);
  20. DATA.Subscribe(ModuleNameString.System, DataName.Fa_ControlStatus, () => FaControlState);
  21. DATA.Subscribe(ModuleNameString.System, DataName.Fa_ControlSubStatus, () => FaControlSubState);
  22. DATA.Subscribe(ModuleNameString.System, DataName.Fa_SpoolingState, () => SpoolingState);
  23. DATA.Subscribe(ModuleNameString.System, DataName.Fa_SpoolingActual, () => SpoolingActual);
  24. DATA.Subscribe(ModuleNameString.System, DataName.Fa_SpoolingTotal, () => SpoolingTotal);
  25. DATA.Subscribe(ModuleNameString.System, DataName.Fa_SpoolingFullTime, () => SpoolingFullTime);
  26. DATA.Subscribe(ModuleNameString.System, DataName.Fa_SpoolingStartTime, () => SpoolingStartTime);
  27. DATA.Subscribe(ModuleNameString.System, DataName.Fa_IsSpoolingEnable, () => IsSpoolingEnable);
  28. EV.Subscribe(new EventItem(PROCESS_START_INQUIRY));
  29. }
  30. private bool InvokeFaCommand(string arg1, object[] arg2)
  31. {
  32. Invoke(arg2[0].ToString(), null);
  33. return true;
  34. }
  35. public string GetSvidValue(string svName)
  36. {
  37. object data = DATA.Poll(svName);
  38. if (data != null)
  39. {
  40. return data.ToString();
  41. }
  42. return "";
  43. }
  44. public List<string> GetListSvidValue(string svName)
  45. {
  46. List<string> result = new List<string>();
  47. foreach (var VARIABLE in result)
  48. {
  49. }
  50. return result;
  51. }
  52. bool IHostCallback.Start(out string reason)
  53. {
  54. reason = "";
  55. return true;
  56. }
  57. public bool Pause(out string reason)
  58. {
  59. reason = "";
  60. return true;
  61. }
  62. public bool Resume(out string reason)
  63. {
  64. reason = "";
  65. return true;
  66. }
  67. public bool Abort(out string reason)
  68. {
  69. reason = "";
  70. return true;
  71. }
  72. public bool LotComplete(out string reason)
  73. {
  74. reason = "";
  75. return true;
  76. }
  77. public bool Unclamp(out string reason)
  78. {
  79. reason = "";
  80. return true;
  81. }
  82. public bool ReadID(out string reason)
  83. {
  84. reason = "";
  85. return true;
  86. }
  87. public bool Unload(out string reason)
  88. {
  89. reason = "";
  90. return true;
  91. }
  92. public bool ScanSlot(string portId, out string reason)
  93. {
  94. reason = "";
  95. //int index = 0;
  96. //ModuleName[] modules = Singleton<DeviceManager6LP>.Instance.GetAllLoadPortName() ;
  97. //if (!int.TryParse(portId, out index) || index> modules.Length || index<1)
  98. //{
  99. // LOG.Write("Port id from host is not valid, " + portId);
  100. // return false;
  101. //}
  102. //OP.DoOperation("MapWafer", modules[index-1].ToString());
  103. //reason = "";
  104. return true;
  105. }
  106. public bool PPSelect(string recipeId, out string reason)
  107. {
  108. //JobManager.Instance.SelectRecipe(recipeId);
  109. reason = "";
  110. return true;
  111. }
  112. //public bool StartTransfer(HostRecipe recipe, out string reason)
  113. //{
  114. // EV.Notify(PROCESS_START_INQUIRY);
  115. // OP.DoOperation("StartRecipe", "HostRecipe", recipe);
  116. // reason = "";
  117. // return true;
  118. //}
  119. }
  120. }