RealtimeData.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. namespace DataVM;
  2. public partial class StatusDataCollection : ObservableObject
  3. {
  4. public StatusDataCollection()
  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. [ObservableProperty]
  23. private ObservableCollection<AlarmInfo> _Alarms = [];
  24. private void FakeData()
  25. {
  26. GasData = new ObservableDictionary<string, GasDataVM>
  27. {
  28. ["VG21"] = new() { Name = "VG21", Actual = 0, Set = 0, Unit = "Torr" },
  29. ["VG22"] = new() { Name = "VG22", Actual = 0, Set = 0, Unit = "Torr" },
  30. ["MFC1"] = new() { Name = "MFC1", Actual = 0, Set = 0, Unit = "SLM" },
  31. ["MFC2"] = new() { Name = "MFC2", Actual = 0, Set = 0, Unit = "SLM" },
  32. };
  33. JobData1 = new()
  34. {
  35. CJobStatus = "Executing",
  36. ID = "CJob1",
  37. JobStatus = "Charging",
  38. ScheduleEndTime = DateTime.Now.AddMinutes(12),
  39. };
  40. JobData2 = new()
  41. {
  42. ID = "CJob2",
  43. JobStatus = "Waiting",
  44. ScheduleEndTime = DateTime.Now.AddMinutes(32),
  45. };
  46. N2PurgeData = new()
  47. {
  48. N2PurgeStatus = "Undefined",
  49. O2DensityCtrlStatus = "Unknow",
  50. O2Position = "LA N2",
  51. O2Denstiy = 0,
  52. O2Limit = 0,
  53. N2Current = 0,
  54. N2Total = 0,
  55. };
  56. PressureData = new()
  57. {
  58. Actual = 12,
  59. Unit = "Torr",
  60. Mode = "APC Control",
  61. Command = "Idle",
  62. APC = 10
  63. };
  64. RecipeDisplay = new RecipeDisplayVM()
  65. {
  66. ProcessRecipe = "HCD-SiN COAT-N2",
  67. ProcessRemainTime = new TimeSpan(0, 1, 22),
  68. HoldTime = new TimeSpan(0, 0, 12),
  69. StepName = "92:P HEAT1",
  70. StepRemainTime = new TimeSpan(0, 0, 31),
  71. NextStep = "19:B ROT",
  72. RecipeStartTime = DateTime.Now.AddHours(-1),
  73. RecipeEndTime = DateTime.Now.AddHours(2),
  74. LoopCount = "1/3",
  75. SubRecipe = "--",
  76. ProcessProgress = 42
  77. };
  78. TempCollection = new ObservableDictionary<string, DataTemperatureVM>
  79. {
  80. ["U"] = new() { Name = "U", Temp = 0 },
  81. ["CU"] = new() { Name = "CU", Temp = 0 },
  82. ["C"] = new() { Name = "C", Temp = 0 },
  83. ["CL"] = new() { Name = "CL", Temp = 0 },
  84. ["L"] = new() { Name = "L", Temp = 0 },
  85. ["SL"] = new() { Name = "SL", Temp = 0 }
  86. };
  87. AlarmInfo alarm = new()
  88. {
  89. AlarmType = AlarmTypeEnum.Alert,
  90. Description = "This is a test Alert",
  91. Module = "PM1",
  92. Time = DateTime.Now,
  93. };
  94. this.Alarms.Add(alarm);
  95. AlarmInfo alarm2 = new()
  96. {
  97. AlarmType = AlarmTypeEnum.Alarm,
  98. Description = "This is a test Alarm",
  99. Module = "FIMS2",
  100. Time = DateTime.Now,
  101. };
  102. this.Alarms.Add(alarm2);
  103. }
  104. }