Пример #1
0
        //thread function
        private void captureFunc2()
        {
            //DEFINATION
            //last one element
            CaptureOutQueueElement cFlush; //last element

            //queue capcity
            int numCapBufs;

            //caputure element
            CaptureOutQueueElement ce;

            //driver element
            DrvQueueElement de;

            //
            uint boardStatus;

            //daq return
            int errCode;


            //CHECK INPUTS
            //none.

            //INIT
            cFlush       = new CaptureOutQueueElement(false);
            cFlush.isEnd = true;

            //MAIN PROCESSING
            try
            {
                //check board is normal?
                errCode = DAQ.get(boardId, AttrbuteType.DAQ_ATTR_BOARD_STATUS_MACHINE, ref boardStatus, (uint)DAQ_TYPE.DAQ_UINT_TYPE);
                if (errCode != (int)DAQErr.Success)
                {
                    throw new Exception("daq err return");
                }
                if (boardStatus != (uint)DAQ_BOARD_STATUS_MACHINE.DAQ_BOARD_STATUS_MACHINE_IDLE)
                {
                    throw new Exception("daq not correct board status");
                }

                //wait init Rendezvous
                init.handclasp_meet();

                //thread function
                while ((quit = Gbl.GetQuit()) != true)
                {
                    //new ce read from tsq interface, if timeout, throw error

                    //check output queue is full? if not full,
                    //
                } //end while(...
            }     //end try
            catch (Exception e)
            {
                MessageShow.show("Error of " + index.ToString() + "# capture thread!", index.ToString() + "#capture thread!" + e.ToString());
            }//end catch
        }