Пример #1
0
        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();
        }
Пример #2
0
        public static void UpdateMsgProcModuleMessages(String data)
        {
            JavaScriptSerializer js = new JavaScriptSerializer();
            object obj = js.Deserialize(data, typeof(JPlugContainer.JPlugMessage));

            MsgProcModule.GetInstance().AddRxMsg(obj);
        }
Пример #3
0
 public static MsgProcModule GetInstance()
 {
     if (MsgProcModule.instance == null)
     {
         MsgProcModule.instance = new MsgProcModule();
     }
     return(MsgProcModule.instance);
 }
Пример #4
0
 static void Terminate()
 {
     MsgProcModule.GetInstance().ThreadRunning = false;
 }
Пример #5
0
 static void Initialize()
 {
     MainDataManager.MainAppRunning = true;
     PluginContainer.GetInstance().SearchForPlugins();
     MsgProcModule.GetInstance().Start();
 }