WaferInfo.cs 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Linq;
  5. using System.Runtime.Serialization;
  6. using System.Text;
  7. using MECF.Framework.Common.CommonData;
  8. using MECF.Framework.Common.Jobs;
  9. namespace Aitex.Core.Common
  10. {
  11. public enum WaferSize
  12. {
  13. WS0, //undefine, initialize status
  14. WS3,
  15. WS4,
  16. WS6,
  17. WS8,
  18. WS12,
  19. }
  20. public enum WaferStatus
  21. {
  22. Empty = 0,
  23. Normal = 1,
  24. Crossed = 3,
  25. Double = 7,
  26. Unknown = 8,
  27. Dummy = 4
  28. }
  29. public enum EnumWaferProcessStatus
  30. {
  31. Idle = 0,
  32. InProcess,
  33. Completed,
  34. Failed,
  35. Wait,
  36. }
  37. public enum EnumWaferProcessResult
  38. {
  39. Unprocessed = 0,
  40. Warning,
  41. Alarm,
  42. Aborted,
  43. }
  44. [Obsolete("Do not use this enum, using EnumWaferProcessStatus instead")]
  45. public enum ProcessStatus
  46. {
  47. Idle = 0,
  48. Wait = 1,
  49. Busy = 2,
  50. Completed = 3,
  51. Failed = 4,
  52. }
  53. [Serializable]
  54. [DataContract]
  55. public class WaferInfo : NotifiableItem
  56. {
  57. public bool IsEmpty
  58. {
  59. get { return Status == WaferStatus.Empty; }
  60. }
  61. private string waferID;
  62. [DataMember]
  63. public string WaferID
  64. {
  65. get
  66. {
  67. return waferID;
  68. }
  69. set
  70. {
  71. waferID = value;
  72. InvokePropertyChanged("WaferID");
  73. }
  74. }
  75. private string _waferOrigin;
  76. [DataMember]
  77. public string WaferOrigin
  78. {
  79. get
  80. {
  81. return _waferOrigin;
  82. }
  83. set
  84. {
  85. _waferOrigin = value;
  86. InvokePropertyChanged("WaferOrigin");
  87. }
  88. }
  89. private string laserMarker;
  90. [DataMember]
  91. public string LaserMarker
  92. {
  93. get
  94. {
  95. return laserMarker;
  96. }
  97. set
  98. {
  99. laserMarker = value;
  100. InvokePropertyChanged("LaserMarker");
  101. }
  102. }
  103. private string t7Code;
  104. [DataMember]
  105. public string T7Code
  106. {
  107. get
  108. {
  109. return t7Code;
  110. }
  111. set
  112. {
  113. t7Code = value;
  114. InvokePropertyChanged("T7Code");
  115. }
  116. }
  117. [DataMember]
  118. public string LotId { get; set; }
  119. [DataMember]
  120. public string TransFlag { get; set; }
  121. private WaferStatus status;
  122. [DataMember]
  123. public WaferStatus Status
  124. {
  125. get
  126. {
  127. return status;
  128. }
  129. set
  130. {
  131. status = value;
  132. InvokePropertyChanged("Status");
  133. }
  134. }
  135. [DataMember]
  136. public int Station
  137. {
  138. get;
  139. set;
  140. }
  141. [DataMember]
  142. public int Slot
  143. {
  144. get;
  145. set;
  146. }
  147. [DataMember]
  148. public int OriginStation
  149. {
  150. get;
  151. set;
  152. }
  153. [DataMember]
  154. public int OriginSlot
  155. {
  156. get;
  157. set;
  158. }
  159. [DataMember]
  160. public string OriginCarrierID
  161. {
  162. get;
  163. set;
  164. }
  165. [DataMember]
  166. public int SourceStation
  167. {
  168. get;
  169. set;
  170. }
  171. [DataMember]
  172. public int SourceSlot
  173. {
  174. get;
  175. set;
  176. }
  177. [DataMember]
  178. public int DestinationStation
  179. {
  180. get;
  181. set;
  182. }
  183. [DataMember]
  184. public int DestinationSlot
  185. {
  186. get;
  187. set;
  188. }
  189. [DataMember]
  190. public int Notch
  191. {
  192. get;
  193. set;
  194. }
  195. [DataMember]
  196. public WaferSize Size
  197. {
  198. get;
  199. set;
  200. }
  201. private EnumWaferProcessStatus processState;
  202. [DataMember]
  203. public EnumWaferProcessStatus ProcessState
  204. {
  205. get
  206. {
  207. return processState;
  208. }
  209. set
  210. {
  211. processState = value;
  212. InvokePropertyChanged("ProcessStatus");
  213. }
  214. }
  215. private bool isSource;
  216. [DataMember]
  217. public bool IsSource
  218. {
  219. get
  220. {
  221. return isSource;
  222. }
  223. set
  224. {
  225. isSource = value;
  226. InvokePropertyChanged("IsSource");
  227. }
  228. }
  229. private bool isDestination;
  230. [DataMember]
  231. public bool IsDestination
  232. {
  233. get
  234. {
  235. return isDestination;
  236. }
  237. set
  238. {
  239. isDestination = value;
  240. InvokePropertyChanged("IsDestination");
  241. }
  242. }
  243. [DataMember]
  244. public Guid InnerId { get; set; }
  245. [DataMember]
  246. public ProcessJobInfo ProcessJob { get; set; }
  247. [DataMember]
  248. public int NextSequenceStep { get; set; }
  249. public WaferInfo()
  250. {
  251. InnerId = Guid.Empty;
  252. }
  253. public WaferInfo(string waferID, WaferStatus status = WaferStatus.Empty) : this()
  254. {
  255. this.WaferID = waferID;
  256. this.Status = status;
  257. }
  258. public void Update(WaferInfo source)
  259. {
  260. InnerId = source.InnerId;
  261. WaferID = source.waferID;
  262. WaferOrigin = source.WaferOrigin;
  263. LaserMarker = source.LaserMarker;
  264. T7Code = source.T7Code;
  265. Status = source.Status;
  266. ProcessState = source.ProcessState;
  267. IsSource = source.IsSource;
  268. IsDestination = source.IsDestination;
  269. Station = source.Station;
  270. Slot = source.Slot;
  271. OriginStation = source.OriginStation;
  272. OriginSlot = source.OriginSlot;
  273. if(source.OriginCarrierID!=null) OriginCarrierID = source.OriginCarrierID;
  274. SourceStation = source.SourceStation;
  275. SourceSlot = source.SourceSlot;
  276. DestinationStation = source.DestinationStation;
  277. DestinationSlot = source.DestinationSlot;
  278. Notch = source.Notch;
  279. Size = source.Size;
  280. TransFlag = source.TransFlag;
  281. LotId = source.LotId;
  282. ProcessJob = source.ProcessJob;
  283. NextSequenceStep = source.NextSequenceStep;
  284. }
  285. public void SetEmpty()
  286. {
  287. this.InnerId = Guid.Empty;
  288. this.WaferID = string.Empty;
  289. this.WaferOrigin = string.Empty;
  290. this.LaserMarker = string.Empty;
  291. this.T7Code = string.Empty;
  292. this.Status = (int)WaferStatus.Empty;
  293. this.ProcessState = EnumWaferProcessStatus.Idle;
  294. this.IsSource = false;
  295. this.IsDestination = false;
  296. this.Station = 0;
  297. this.Slot = 0;
  298. this.OriginStation = 0;
  299. this.OriginSlot = 0;
  300. this.SourceStation = 0;
  301. this.SourceSlot = 0;
  302. this.DestinationStation = 0;
  303. this.DestinationSlot = 0;
  304. this.Notch = 0;
  305. //this.Size = WaferSize.WS0; //wafersize 保留最后的一次的记录
  306. this.TransFlag = string.Empty;
  307. this.LotId = string.Empty;
  308. this.ProcessJob = null;
  309. this.NextSequenceStep = 0;
  310. }
  311. }
  312. }