static void Main(string[] args) { //Initialize application Initialize(); String rxData = ""; while (MainDataManager.MainAppRunning == true) { //Get data from pipe rxData = DataPipe.ReceiveData(); //Add data to Rx msg queue if (rxData != "") { DataPipe.UpdateMsgProcModuleMessages(rxData); } Thread.Sleep(1000); } while (MsgProcModule.GetInstance().AllTxMsgFlushed == false) { //Wait until all messages where send Thread.Sleep(1); } //Perform actions for termination Terminate(); }
public static void UpdateMsgProcModuleMessages(String data) { JavaScriptSerializer js = new JavaScriptSerializer(); object obj = js.Deserialize(data, typeof(JPlugContainer.JPlugMessage)); MsgProcModule.GetInstance().AddRxMsg(obj); }
public static MsgProcModule GetInstance() { if (MsgProcModule.instance == null) { MsgProcModule.instance = new MsgProcModule(); } return(MsgProcModule.instance); }
static void Terminate() { MsgProcModule.GetInstance().ThreadRunning = false; }
static void Initialize() { MainDataManager.MainAppRunning = true; PluginContainer.GetInstance().SearchForPlugins(); MsgProcModule.GetInstance().Start(); }