using Aitex.Core.RT.DataCenter; using Aitex.Core.RT.IOCore; using Aitex.Core.RT.Log; using Aitex.Core.Util; using MECF.Framework.Common.Equipment; using MECF.Framework.Simulator.Core.Driver; using System; using System.Collections.Generic; using CyberX8_Simulator.Devices; using System.Threading; using CyberX8_Core; using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.PMs; using System.Diagnostics.Eventing.Reader; namespace CyberX8_Simulator.Instances { public class SimulatorSystem : Singleton { private PeriodicJob _thread; private Random _rd = new Random(); private RD_TRIG _trigATM = new RD_TRIG(); private RD_TRIG _trigVAC = new RD_TRIG(); private R_TRIG _trigLLExtend = new R_TRIG(); private R_TRIG _trigLLRetract = new R_TRIG(); private static int count = 0; private readonly float ATM_THRESHOLD = 750000; private readonly float ATM_PRESSURE = 760000; private readonly float ATM_LoadLock_PRESSURE = 760000; private readonly uint VAC_SW_PRESSURE = 9500; private readonly uint PROCESS_GAUGE = 10000; private Dictionary _MockDevices = new Dictionary(); private Dictionary jetChambers = new Dictionary(); public SimulatorSystem() { } ~SimulatorSystem() { _thread?.Stop(); } public void Initialize() { Singleton.Instance.Initialize(false); _thread = new PeriodicJob(500, OnMonitor, nameof(SimulatorSystem), true); } private bool OnMonitor() { try { } catch (Exception e) { LOG.WriteExeption(e); } return true; } public void Terminate() { _thread.Stop(); } public void SetCoolantOutletTemp(string module, int Temp) { } } }