diff options
Diffstat (limited to 'gr-analog/python/qa_agc.py')
-rwxr-xr-x | gr-analog/python/qa_agc.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/gr-analog/python/qa_agc.py b/gr-analog/python/qa_agc.py index 263f9a647e..0d8a7bfb5d 100755 --- a/gr-analog/python/qa_agc.py +++ b/gr-analog/python/qa_agc.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2007,2010,2012 Free Software Foundation, Inc. +# Copyright 2004,2007,2010,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -22,6 +22,7 @@ from gnuradio import gr, gr_unittest import analog_swig as analog +import blocks_swig as blocks import math class test_agc(gr_unittest.TestCase): @@ -105,8 +106,8 @@ class test_agc(gr_unittest.TestCase): sampling_freq = 100 src1 = analog.sig_source_c(sampling_freq, analog.GR_SIN_WAVE, sampling_freq * 0.10, 100.0) - dst1 = gr.vector_sink_c() - head = gr.head(gr.sizeof_gr_complex, int (5*sampling_freq * 0.10)) + dst1 = blocks.vector_sink_c() + head = blocks.head(gr.sizeof_gr_complex, int (5*sampling_freq * 0.10)) agc = analog.agc_cc(1e-3, 1, 1, 1000) @@ -190,8 +191,8 @@ class test_agc(gr_unittest.TestCase): sampling_freq = 100 src1 = analog.sig_source_f(sampling_freq, analog.GR_SIN_WAVE, sampling_freq * 0.10, 100.0) - dst1 = gr.vector_sink_f () - head = gr.head (gr.sizeof_float, int (5*sampling_freq * 0.10)) + dst1 = blocks.vector_sink_f () + head = blocks.head (gr.sizeof_float, int (5*sampling_freq * 0.10)) agc = analog.agc_ff(1e-3, 1, 1, 1000) @@ -277,8 +278,8 @@ class test_agc(gr_unittest.TestCase): sampling_freq = 100 src1 = analog.sig_source_c(sampling_freq, analog.GR_SIN_WAVE, sampling_freq * 0.10, 100) - dst1 = gr.vector_sink_c() - head = gr.head(gr.sizeof_gr_complex, int(5*sampling_freq * 0.10)) + dst1 = blocks.vector_sink_c() + head = blocks.head(gr.sizeof_gr_complex, int(5*sampling_freq * 0.10)) agc = analog.agc2_cc(1e-2, 1e-3, 1, 1, 1000) @@ -364,8 +365,8 @@ class test_agc(gr_unittest.TestCase): sampling_freq = 100 src1 = analog.sig_source_f(sampling_freq, analog.GR_SIN_WAVE, sampling_freq * 0.10, 100) - dst1 = gr.vector_sink_f() - head = gr.head(gr.sizeof_float, int(5*sampling_freq * 0.10)) + dst1 = blocks.vector_sink_f() + head = blocks.head(gr.sizeof_float, int(5*sampling_freq * 0.10)) agc = analog.agc2_ff(1e-2, 1e-3, 1, 1, 1000) @@ -437,8 +438,8 @@ class test_agc(gr_unittest.TestCase): sampling_freq = 100 src1 = analog.sig_source_c(sampling_freq, analog.GR_SIN_WAVE, sampling_freq * 0.10, 100) - dst1 = gr.vector_sink_c() - head = gr.head(gr.sizeof_gr_complex, int(5*sampling_freq * 0.10)) + dst1 = blocks.vector_sink_c() + head = blocks.head(gr.sizeof_gr_complex, int(5*sampling_freq * 0.10)) agc = analog.agc2_cc(1e-2, 1e-3, 1, 1, 1000) @@ -459,9 +460,9 @@ class test_agc(gr_unittest.TestCase): input_data = 8*(0.0,) + 24*(1.0,) + 24*(0.0,) expected_result = (8+length-1)*(0.0,) + 24*(gain*1.0,) + (0,) - src = gr.vector_source_c(input_data) + src = blocks.vector_source_c(input_data) agc = analog.feedforward_agc_cc(8, 2.0) - dst = gr.vector_sink_c() + dst = blocks.vector_sink_c() self.tb.connect(src, agc, dst) self.tb.run() |