def test2():
    streamhandler = StreamHandler()
    
    # Configure and start
    dev = MeasurementComputingMultiSignals(streamhandler = streamhandler)
    dev.configure( board_num = 0,
                          sampling_rate =10000.,
                          buffer_length = 5.,
                                )
    dev.initialize()
    dev.start()

    stop_recv = mp.Value('i', 0)
    process = mp.Process(target= test_recv_loop, args = (dev.streams[0]['port'],stop_recv))
    process.start()

    process = mp.Process(target= test_recv_loop, args = (dev.streams[1]['port'],stop_recv))
    process.start()
    
    
    time.sleep(20.)
    stop_recv.value = 1
    process.join()
    
    # Stope and release the device
    dev.stop()
    dev.close()
def test1():
    streamhandler = StreamHandler()
    
    # Configure and start
    dev = MeasurementComputingMultiSignals(streamhandler = streamhandler)
    dev.configure( board_num = 0,
                          sampling_rate =1000.,
                          buffer_length = 60.,
                                )
    dev.initialize()
    dev.start()
    
    app = QtGui.QApplication([])
    w1=Oscilloscope(stream = dev.streams[0])
    w1.auto_gain_and_offset(mode = 2)
    w1.set_params(xsize = 20., refresh_interval = 100, mode = 'scan', ylims = [-8., 8.])
    w1.show()
    
    w2 = TimeFreq(stream = dev.streams[0], max_visible_on_open = 4)
    w2.set_params(refresh_interval = 100, xsize = 2.)
    w2.show()
    
    w3=OscilloscopeDigital(stream = dev.streams[1])
    w3.set_params(xsize = 20, mode = 'scan')    
    w3.show()
    
    app.exec_()
    
    # Stope and release the device
    dev.stop()
    dev.close()
def test1():
    streamhandler = StreamHandler()

    # Configure and start
    dev = MeasurementComputingMultiSignals(streamhandler=streamhandler)
    dev.configure(board_num=0, sampling_rate=10000.0, buffer_length=60.0)
    dev.initialize()
    dev.start()

    app = QtGui.QApplication([])
    w1 = Oscilloscope(stream=dev.streams[0])
    w1.auto_gain_and_offset(mode=2)
    w1.set_params(xsize=5.0, refresh_interval=100, mode="scan", ylims=[-8.0, 8.0])
    w1.show()

    app.exec_()

    # Stope and release the device
    dev.stop()
    dev.close()