Exemplo n.º 1
0
        public Status Open()
        {
            while (pipeLog.Open() != Client.Status.Success)
            {
                Thread.Sleep(100);
            }
            collectLogThread = new Thread(new ThreadStart(CollectLog));
            collectLogThread.Start();


            while (pipeControl.Open() != Client.Status.Success)
            {
                Thread.Sleep(100);
            }

            byte[] read  = new byte[1];
            uint   count = 1;

            while (read[0] != 0xAC)
            {
                pipeControl.Read(read, ref count);
                Thread.Sleep(100);
            }

            return(Status.Success);
        }
Exemplo n.º 2
0
        private void CollectLog()
        {
            byte[] read  = new byte[1];
            uint   count = 1;

            while (pipeLog.Read(read, ref count) == Client.Status.Success)
            {
                logQueue.Enqueue(read[0]);
            }
        }