Пример #1
0
        /**Initial the capture threads and dispens threads according to the thread environment.*/
        private void initPrimaryThreads()
        {
            for (int i = 0; i < sessionNum; i++)
            {
                CaptureThreadEnv tmpCaptureThreadEnv = new CaptureThreadEnv();
                setCaptureThreadEnv(tmpCaptureThreadEnv, i);
                CaptureThread captureThread = new CaptureThread(tmpCaptureThreadEnv);
                captureThreadList.Add(captureThread);


                ParseThreadEnv tmpParseThreadEnv = new ParseThreadEnv();
                setParseThreadEnv(tmpParseThreadEnv, i);
                ParseThread parseThread = new ParseThread(tmpParseThreadEnv);
                parseThreadList.Add(parseThread);
            }

            MergeThreadEnv tmpMergeThreadEvn = new MergeThreadEnv();

            setMergeThreadEnv(tmpMergeThreadEvn);
            mergeThread = new MergeThread(tmpMergeThreadEvn);

            AscanUIThreadEnv tmpAscanUIThreadEnv = new AscanUIThreadEnv();

            setAscanUIThreadEnv(tmpAscanUIThreadEnv);
            AscanUIThread = new AscanUIThread(tmpAscanUIThreadEnv);

            MeasureUIThreadEnv tmpMeasureUIThreadEnv = new MeasureUIThreadEnv();

            setMeasureUIThreadEnv(tmpMeasureUIThreadEnv);
            measureUIThread = new MeasureUIThread(tmpMeasureUIThreadEnv);
        }
Пример #2
0
        /**
         * Set the enviroment of the measure UI thread.
         * @param thrdEnv the UI thread environment to be set
         * @return thrdEnv a UI thread environment whose paraments are set
         */
        private void setMeasureUIThreadEnv(MeasureUIThreadEnv threadEnv)
        {
            threadEnv.init   = threadHandClaspInit;
            threadEnv.clean  = threadHandClaspCleanup;
            threadEnv.status = ThreadCondition.created;

            threadEnv.measureQueue = queueManager.measurementQueue;
        }
Пример #3
0
        public MeasureUIThread(MeasureUIThreadEnv tmpEnv)
        {
            init         = tmpEnv.init;
            clean        = tmpEnv.clean;
            status       = tmpEnv.status;
            measureQueue = tmpEnv.measureQueue;

            measureQueueElement = new MeasureQueueElement();

            thread = new Thread(MeasureUIFunc);
            thread.IsBackground = true;

            //timer.Elapsed += new System.Timers.ElapsedEventHandler(UpdateAUT);
            timer.AutoReset = true;
        }