RealtimeData.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. namespace DataVM;
  2. public partial class RealtimeData : ObservableObject
  3. {
  4. public RealtimeData()
  5. {
  6. this.FakeData();
  7. }
  8. [ObservableProperty]
  9. private ObservableDictionary<string, GasDataVM>? _GasData;
  10. [ObservableProperty]
  11. private JobDataVM? _JobData1;
  12. [ObservableProperty]
  13. private JobDataVM? _JobData2;
  14. [ObservableProperty]
  15. private N2PurgeDataVM? _N2PurgeData;
  16. [ObservableProperty]
  17. private PressureDataVM? _PressureData;
  18. [ObservableProperty]
  19. private RecipeDisplayVM? _RecipeDisplay;
  20. [ObservableProperty]
  21. private ObservableDictionary<string, DataTemperatureVM>? _TempCollection;
  22. private void FakeData()
  23. {
  24. GasData = new ObservableDictionary<string, GasDataVM>
  25. {
  26. ["VG21"] = new() { Name = "VG21", Actual = 0, Set = 0, Unit = "Torr" },
  27. ["VG22"] = new() { Name = "VG22", Actual = 0, Set = 0, Unit = "Torr" },
  28. ["MFC1"] = new() { Name = "MFC1", Actual = 0, Set = 0, Unit = "SLM" },
  29. ["MFC2"] = new() { Name = "MFC2", Actual = 0, Set = 0, Unit = "SLM" },
  30. };
  31. JobData1 = new()
  32. {
  33. CJobStatus = "Executing",
  34. ID = "CJob1",
  35. JobStatus = "Charging",
  36. ScheduleEndTime = DateTime.Now.AddMinutes(12),
  37. };
  38. JobData2 = new()
  39. {
  40. ID = "CJob2",
  41. JobStatus = "Waiting",
  42. ScheduleEndTime = DateTime.Now.AddMinutes(32),
  43. };
  44. N2PurgeData = new()
  45. {
  46. N2PurgeStatus = "Undefined",
  47. O2DensityCtrlStatus = "Unknow",
  48. O2Position = "LA N2",
  49. O2Denstiy = 0,
  50. O2Limit = 0,
  51. N2Current = 0,
  52. N2Total = 0,
  53. };
  54. PressureData = new()
  55. {
  56. Actual = 12,
  57. Unit = "Torr",
  58. Mode = "APC Control",
  59. Command = "Idle",
  60. APC = 10
  61. };
  62. RecipeDisplay = new RecipeDisplayVM()
  63. {
  64. ProcessRecipe = "HCD-SiN COAT-N2",
  65. ProcessRemainTime = new TimeSpan(0, 1, 22),
  66. HoldTime = new TimeSpan(0, 0, 12),
  67. StepName = "92:P HEAT1",
  68. StepRemainTime = new TimeSpan(0, 0, 31),
  69. NextStep = "19:B ROT",
  70. RecipeStartTime = DateTime.Now.AddHours(-1),
  71. RecipeEndTime = DateTime.Now.AddHours(2),
  72. LoopCount = "1/3",
  73. SubRecipe = "--",
  74. ProcessProgress = 42
  75. };
  76. TempCollection = new ObservableDictionary<string, DataTemperatureVM>
  77. {
  78. ["U"] = new() { Name = "U", Temp = 0 },
  79. ["CU"] = new() { Name = "CU", Temp = 0 },
  80. ["C"] = new() { Name = "C", Temp = 0 },
  81. ["CL"] = new() { Name = "CL", Temp = 0 },
  82. ["L"] = new() { Name = "L", Temp = 0 },
  83. ["SL"] = new() { Name = "SL", Temp = 0 }
  84. };
  85. }
  86. }
  87. public partial class GasDataVM : ObservableObject
  88. {
  89. [ObservableProperty]
  90. private string? _Name;
  91. [ObservableProperty]
  92. private float _Actual;
  93. [ObservableProperty]
  94. private float _Set;
  95. [ObservableProperty]
  96. private string? _Unit;
  97. }
  98. public partial class JobDataVM : ObservableObject
  99. {
  100. [ObservableProperty]
  101. private string? _CJobStatus;
  102. [ObservableProperty]
  103. private string? _ID;
  104. [ObservableProperty]
  105. private string? _JobStatus;
  106. [ObservableProperty]
  107. private DateTime _ScheduleEndTime;
  108. }
  109. public partial class N2PurgeDataVM : ObservableObject
  110. {
  111. [ObservableProperty]
  112. private string? _N2PurgeStatus;
  113. [ObservableProperty]
  114. private string? _O2DensityCtrlStatus;
  115. [ObservableProperty]
  116. private string? _O2Position;
  117. [ObservableProperty]
  118. private float _O2Denstiy;
  119. [ObservableProperty]
  120. private float _O2Limit;
  121. [ObservableProperty]
  122. private float _N2Current;
  123. [ObservableProperty]
  124. private float _N2Total;
  125. }
  126. public partial class PressureDataVM : ObservableObject
  127. {
  128. [ObservableProperty]
  129. private float _Actual;
  130. [ObservableProperty]
  131. private string? _Unit;
  132. [ObservableProperty]
  133. private string? _Mode;
  134. [ObservableProperty]
  135. private string? _Command;
  136. [ObservableProperty]
  137. private float _APC;
  138. }
  139. public partial class RecipeDisplayVM : ObservableObject
  140. {
  141. [ObservableProperty]
  142. private string? _ProcessRecipe;
  143. [ObservableProperty]
  144. private TimeSpan? _ProcessRemainTime;
  145. [ObservableProperty]
  146. private TimeSpan? _HoldTime;
  147. [ObservableProperty]
  148. private string? _StepName;
  149. [ObservableProperty]
  150. private TimeSpan? _StepRemainTime;
  151. [ObservableProperty]
  152. private string? _NextStep;
  153. [ObservableProperty]
  154. private DateTime? _RecipeStartTime;
  155. [ObservableProperty]
  156. private DateTime? _RecipeEndTime;
  157. [ObservableProperty]
  158. private string? _LoopCount;
  159. [ObservableProperty]
  160. private string? _SubRecipe;
  161. [ObservableProperty]
  162. private float? _ProcessProgress;
  163. }
  164. public partial class DataTemperatureVM : ObservableObject
  165. {
  166. [ObservableProperty]
  167. private string? _Name;
  168. [ObservableProperty]
  169. private float _Temp;
  170. }