CarrierInfo.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. using System;
  2. using System.Runtime.Serialization;
  3. using Aitex.Core.Common;
  4. using Aitex.Core.Util;
  5. using MECF.Framework.Common.CommonData;
  6. using MECF.Framework.Common.Equipment;
  7. namespace MECF.Framework.Common.SubstrateTrackings
  8. {
  9. public enum ProcessJobStateEnum
  10. {
  11. pjCREATED = -1,
  12. pjQUEUED = 0,
  13. pjSETTING_UP = 1,
  14. pjWAITING_FOR_START = 2,
  15. pjPROCESSING = 3,
  16. pjPROCESS_COMPLETED = 4,
  17. pjRESERVED5 = 5,
  18. pjPAUSING = 6,
  19. pjPAUSED = 7,
  20. pjSTOPPING = 8,
  21. pjABORTING = 9,
  22. pjSTOPPED = 10,
  23. pjABORTED = 11,
  24. pjPROCESSJOB_COMPLETED = 12,
  25. }
  26. public enum CarrierStatus
  27. {
  28. Empty = 0,
  29. Normal = 1,
  30. }
  31. [Serializable]
  32. [DataContract]
  33. public class CarrierInfo:NotifiableItem
  34. {
  35. public bool IsEmpty
  36. {
  37. get { return Status == CarrierStatus.Empty; }
  38. }
  39. private CarrierStatus status;
  40. [DataMember]
  41. public CarrierStatus Status
  42. {
  43. get
  44. {
  45. return status;
  46. }
  47. set
  48. {
  49. status = value;
  50. InvokePropertyChanged(nameof(Status));
  51. }
  52. }
  53. [DataMember]
  54. public Guid InnerId { get; set; }
  55. [DataMember]
  56. public string Name { get; set; }
  57. public object ProcessJob;
  58. [DataMember]
  59. public string CarrierId { get; set; }
  60. [DataMember]
  61. public string Rfid { get; set; }
  62. [DataMember]
  63. public string LotId { get; set; }
  64. [DataMember]
  65. public string ProductCategory { get; set; }
  66. [DataMember]
  67. public WaferInfo[] Wafers { get; set; }
  68. [DataMember]
  69. public SerializableDictionary<string, bool> ProcessStatus { get; set; }
  70. [DataMember]
  71. public SerializableDictionary<string, string> Attributes { get; set; }
  72. [DataMember]
  73. public bool IsStart { get; set; }
  74. [DataMember]
  75. public DateTime LoadTime { get; set; }
  76. [DataMember]
  77. public string JobSelectedRecipeName { get; set; }
  78. [DataMember]
  79. public int Priority { get; set; }
  80. [DataMember]
  81. public ModuleName InternalModuleName { get; set; } //For Internal carrier only
  82. [DataMember]
  83. public WaferSize CarrierWaferSize { get; set; }
  84. [DataMember]
  85. public bool IsProcessCompleted { get; set; }
  86. [DataMember]
  87. public bool IsVertical { get; set; }
  88. [DataMember]
  89. public bool HasWaferIn { get; set; }
  90. [DataMember]
  91. public int NextSequenceStep { get; set; }
  92. public object Job { get; set; }
  93. public T GetProcessJob<T>()
  94. {
  95. return (T)ProcessJob;
  96. }
  97. public bool IsProcessed(string module)
  98. {
  99. return ProcessStatus.ContainsKey(module) && ProcessStatus[module];
  100. }
  101. public void Clear()
  102. {
  103. this.Status = CarrierStatus.Empty;
  104. this.InnerId = Guid.Empty;
  105. this.ProcessJob = null;
  106. this.Name = "";
  107. this.IsStart = false;
  108. this.CarrierId = "";
  109. this.Rfid = "";
  110. this.JobSelectedRecipeName = "";
  111. this.LotId = "";
  112. this.ProductCategory = "";
  113. this.ProcessStatus = new SerializableDictionary<string, bool>();
  114. this.Attributes = new SerializableDictionary<string, string>();
  115. this.Priority = 0;
  116. this.HasWaferIn = false;
  117. this.IsProcessCompleted = false;
  118. this.IsVertical = false;
  119. this.NextSequenceStep = -1;
  120. this.Job = null;
  121. }
  122. public CarrierInfo(int capacity)
  123. {
  124. Wafers = new WaferInfo[capacity];
  125. InnerId = Guid.Empty;
  126. Status = CarrierStatus.Empty;
  127. ProcessStatus = new SerializableDictionary<string, bool>();
  128. Attributes = new SerializableDictionary<string, string>();
  129. }
  130. public void CopyInfo(CarrierInfo source)
  131. {
  132. this.CarrierId = source.CarrierId;
  133. this.InnerId = source.InnerId;
  134. this.Attributes = source.Attributes;
  135. this.CarrierId = source.CarrierId;
  136. this.Rfid = source.Rfid;
  137. this.IsStart = source.IsStart;
  138. this.JobSelectedRecipeName = source.JobSelectedRecipeName;
  139. this.LoadTime = source.LoadTime;
  140. this.LotId = source.LotId;
  141. this.Name = source.Name;
  142. this.ProcessStatus = source.ProcessStatus;
  143. this.Status = source.status;
  144. this.ProductCategory = source.ProductCategory;
  145. this.Wafers = source.Wafers;
  146. this.ProcessJob = source.ProcessJob;
  147. this.Priority = source.Priority;
  148. this.CarrierWaferSize = source.CarrierWaferSize;
  149. this.InternalModuleName = source.InternalModuleName;
  150. this.HasWaferIn = source.HasWaferIn;
  151. this.IsProcessCompleted = source.IsProcessCompleted;
  152. this.IsVertical = source.IsVertical;
  153. this.NextSequenceStep = source.NextSequenceStep;
  154. this.Job = source.Job;
  155. }
  156. }
  157. }