CarrierInfo.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. using OldWorldData.CommonData.DeviceData;
  2. using Aitex.Core.Util;
  3. using MECF.Framework.Common.Equipment;
  4. using System.ComponentModel;
  5. using System.Runtime.Serialization;
  6. namespace MECF.Framework.Common.SubstrateTrackings
  7. {
  8. public enum ProcessJobStateEnum
  9. {
  10. pjCREATED = -1,
  11. pjQUEUED = 0,
  12. pjSETTING_UP = 1,
  13. pjWAITING_FOR_START = 2,
  14. pjPROCESSING = 3,
  15. pjPROCESS_COMPLETED = 4,
  16. pjRESERVED5 = 5,
  17. pjPAUSING = 6,
  18. pjPAUSED = 7,
  19. pjSTOPPING = 8,
  20. pjABORTING = 9,
  21. pjSTOPPED = 10,
  22. pjABORTED = 11,
  23. pjPROCESSJOB_COMPLETED = 12,
  24. }
  25. public enum CarrierStatus
  26. {
  27. Empty = 0,
  28. Normal = 1,
  29. [Description("NOFOUP")]
  30. NOFOUP = 5,
  31. [Description("READY")]
  32. READY = 10,
  33. [Description("W.CHARG")]
  34. WCHARG = 20,
  35. [Description("ON.BOAT")]
  36. ONBOAT = 30,
  37. [Description("W.DCHRG")]
  38. WDCHRG = 40,
  39. [Description("PRC.END")]
  40. PRCEND = 50,
  41. [Description("SERRE_1")]
  42. SERRE1 = 60,
  43. [Description("SERRE_2")]
  44. SERRE2 = 70,
  45. [Description("SERRE_3")]
  46. SERRE3 = 80,
  47. [Description("MOVECST")]
  48. MOVECST = 90,
  49. [Description("TRAKCST")]
  50. TRAKCST = 100,
  51. [Description("MAPPING")]
  52. MAPPING = 110,
  53. }
  54. [Serializable]
  55. [DataContract]
  56. public class CarrierInfo
  57. {
  58. public bool IsEmpty
  59. {
  60. get { return Status == CarrierStatus.Empty; }
  61. }
  62. [DataMember]
  63. public CarrierStatus Status { get; set; }
  64. [DataMember]
  65. public Guid InnerId { get; set; }
  66. [DataMember]
  67. public string Name { get; set; }
  68. public object ProcessJob;
  69. [DataMember]
  70. public string CarrierId { get; set; }
  71. [DataMember]
  72. public int StockerIndex { get; set; }
  73. [DataMember]
  74. public string Rfid { get; set; }
  75. [DataMember]
  76. public string LotId { get; set; }
  77. [DataMember]
  78. public string ProductCategory { get; set; }
  79. [DataMember]
  80. public WaferInfo[] Wafers { get; set; }
  81. [DataMember]
  82. public SerializableDictionary<string, bool> ProcessStatus { get; set; }
  83. [DataMember]
  84. public SerializableDictionary<string, string> Attributes { get; set; }
  85. [DataMember]
  86. public bool IsStart { get; set; }
  87. [DataMember]
  88. public DateTime LoadTime { get; set; }
  89. [DataMember]
  90. public string JobSelectedRecipeName { get; set; }
  91. [DataMember]
  92. public int Priority { get; set; }
  93. [DataMember]
  94. public ModuleName InternalModuleName { get; set; } //For Internal carrier only
  95. [DataMember]
  96. public WaferSize CarrierWaferSize { get; set; }
  97. [DataMember]
  98. public bool IsProcessCompleted { get; set; }
  99. [DataMember]
  100. public bool IsVertical { get; set; }
  101. [DataMember]
  102. public bool HasWaferIn { get; set; }
  103. [DataMember]
  104. public int NextSequenceStep { get; set; }
  105. [DataMember]
  106. public string CarrierType { get; set; }
  107. [DataMember]
  108. public bool IsMapped { get; set; }
  109. [DataMember]
  110. public bool IsMapOK { get; set; }
  111. [DataMember]
  112. public int PortID { get; set; }
  113. public int WaferCount
  114. {
  115. get { return Wafers.Where(x => x != null && !x.IsEmpty).ToArray().Length; }
  116. }
  117. [DataMember]
  118. public string UICarrierType { get; set; } = "P1";
  119. [DataMember]
  120. public bool UICarrierTypeVisibility { get; set; } = true;
  121. [DataMember]
  122. public string UICarrierWaferCount { get; set; } = "(0)";
  123. [DataMember]
  124. public bool UICarrierWaferCountVisibility { get; set; } = true;
  125. [DataMember]
  126. public string UICarrierStatus { get { return UICarrierStatusEnum.ToString(); } set { } }
  127. [DataMember]
  128. public CarrierStatus UICarrierStatusEnum { get; set; }
  129. [DataMember]
  130. public bool UICarrierStatusVisibility { get; set; } = true;
  131. [DataMember]
  132. public string UICarrierColor { get; set; } = "#ccc";
  133. [DataMember]
  134. public bool UICarrierColorVisibility { get; set; } = true;
  135. [DataMember]
  136. public bool UIStockerExitFoup { get; set; } = false;
  137. [DataMember]
  138. public bool UIExitFoup { get; set; } = false;
  139. public object Job { get; set; }
  140. public T GetProcessJob<T>()
  141. {
  142. return (T)ProcessJob;
  143. }
  144. public bool IsProcessed(string module)
  145. {
  146. return ProcessStatus.ContainsKey(module) && ProcessStatus[module];
  147. }
  148. /// <summary>
  149. /// capacity表示foup的slot数量
  150. /// </summary>
  151. /// <param name="capacity"></param>
  152. public CarrierInfo(int capacity)
  153. {
  154. List<WaferInfo> waferList = new List<WaferInfo>();
  155. for (int i = 0; i < capacity; i++)
  156. {
  157. waferList.Add(new WaferInfo((i + 1).ToString()));
  158. }
  159. Wafers = [.. waferList];
  160. InnerId = Guid.Empty;
  161. Status = CarrierStatus.Empty;
  162. ProcessStatus = [];
  163. Attributes = [];
  164. }
  165. }
  166. }