示例#1
0
        void mea_ChannelDataEvent(CMcsUsbDacqNet dacq, int CbHandle, int numFrames)
        {
            //Debug.WriteLine("data available " + numFrames);

            if (numFrames >= Samplerate)
            {
                int[] data = mea.ChannelBlock_ReadFramesI32(0, Samplerate, out int frames_read);
                BeginInvoke(new DisplayDataAction(DisplayData), data);
            }
            else
            {
                int[] data = mea.ChannelBlock_ReadFramesI32(0, numFrames, out int frames_read);
            }
        }
示例#2
0
        void Port_1_ChannelDataEvent(CMcsUsbDacqNet dacq, int CbHandle, int numFrames)
        {
            FrameCount++;

            Console.WriteLine("data available " + numFrames);
            if (numFrames > Samplerate)
            {
                numFrames = Samplerate;
            }
            data = Port_1.ChannelBlock_ReadFramesI32(0, numFrames, out frames_read);
            //data = Port_1.ChannelBlock_ReadFramesI16 (0, numFrames, out frames_read);
            if (Port_1_Data_Event != null)
            {
                Port_1_Data_Event(this, EventArgs.Empty);
            }
        }