Ejemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            gUSBampWrapper.Filter[] Y = gUSBampWrapper.GetFilterSpec();                   //
            gUSBampWrapper.Filter[] V = gUSBampWrapper.GetNotchSpec();                    // To see the values of the different filters
            pictureBox1.BackColor = Color.FromArgb(100, 100, 100);                        //
            pictureBox2.BackColor = Color.FromArgb(100, 100, 100);                        //
            pictureBox3.BackColor = Color.FromArgb(100, 100, 100);                        // Set the colors for the lights

            CommonTaskDelegate DAQ_ThreadInstance = new CommonTaskDelegate(DAQ_TaskLoop); // Start the different Threads

            DAQ_hThread = new Thread(new ThreadStart(DAQ_ThreadInstance));
            DAQ_TaskInit();
            DAQ_hThread.Start();

            CommonTaskDelegate FFT_ThreadInstance = new CommonTaskDelegate(FFT_TaskLoop);

            FFT_hThread = new Thread(new ThreadStart(FFT_ThreadInstance));
            FFT_TaskInit();
            FFT_hThread.Start();

            CommonTaskDelegate Filter_ThreadInstance = new CommonTaskDelegate(Filter_TaskLoop);

            Filter_hThread = new Thread(new ThreadStart(Filter_ThreadInstance));
            Filter_TaskInit();
            Filter_hThread.Start();

            CommonTaskDelegate WP_ThreadInstance = new CommonTaskDelegate(WP_TaskLoop);

            WP_hThread = new Thread(new ThreadStart(WP_ThreadInstance));
            WP_TaskInit();
            WP_hThread.Start();
        }
Ejemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            CommonTaskDelegate DAQ_ThreadInstance = new CommonTaskDelegate(DAQ_TaskLoop);

            DAQ_hThread = new Thread(new ThreadStart(DAQ_ThreadInstance));
            DAQ_TaskInit();
            DAQ_hThread.Start();

            CommonTaskDelegate Filter_ThreadInstance = new CommonTaskDelegate(Filter_TaskLoop);

            Filter_hThread = new Thread(new ThreadStart(Filter_ThreadInstance));
            Filter_TaskInit();
            Filter_hThread.Start();
        }
Ejemplo n.º 3
0
        public void WP_TaskLoop()
        {
            CommonTaskDelegate LocalTaskInstance;

            while (true)
            {
                if (WP_isRunning) // Start, Stop
                {
                    WP_TaskFunction();

                    LocalTaskInstance = new CommonTaskDelegate(WP_DisplayFunction);
                    BeginInvoke(LocalTaskInstance);
                }

                Thread.Sleep(WP_hThread_PERIOD);
            }
        }
Ejemplo n.º 4
0
        public void Filter_TaskLoop()
        {
            CommonTaskDelegate LocalTaskInstance;

            while (true)
            {
                //this is the data processing thread; data received from the devices will be written out to a file here
                if (Filter_isRunning) // Start, Stop
                {
                    Filter_TaskFunction();

                    LocalTaskInstance = new CommonTaskDelegate(Filter_DisplayFunction);
                    BeginInvoke(LocalTaskInstance);
                }
                Thread.Sleep(Filter_hThread_PERIOD);
            }
        }