Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        /**
         * Set the enviroment of the Ascan UI thread.
         * @param thrdEnv the UI thread environment to be set
         * @return thrdEnv a UI thread environment whose paraments are set
         */
        private void setAscanUIThreadEnv(AscanUIThreadEnv threadEnv)
        {
            threadEnv.init   = threadHandClaspInit;
            threadEnv.clean  = threadHandClaspCleanup;
            threadEnv.status = ThreadCondition.created;

            threadEnv.ascanInList = queueManager.ascanList;
        }
Ejemplo n.º 3
0
        public AscanUIThread(AscanUIThreadEnv tmpEnv)
        {
            init        = tmpEnv.init;
            clean       = tmpEnv.clean;
            status      = tmpEnv.status;
            ascanInList = tmpEnv.ascanInList;

            ascanQueueElement = new AscanQueueElement();
            //timer = new System.Windows.Forms.Timer();
            //timer.Interval = ConstParameter.AscanTimerInterval;
            //timer.Tick += new EventHandler(AscanUIFunc);
            thread = new Thread(AscanUIFunc);
            thread.IsBackground = true;
        }