diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-11-09 22:30:01 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-11-10 14:39:41 -0500 |
commit | cbc7960a4facfc50c3861ca96e51348802d457cc (patch) | |
tree | f2b0c58eedc052ca399bde721d6bf054b4e0819b /docs | |
parent | 6be5d93ab0e9ec205f1cb72f8d2d60006b08e7f2 (diff) |
analog: removed noise and sig sources from core.
Fixed QA code for components that do not use gr-analog.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/doxygen/other/main_page.dox | 18 | ||||
-rwxr-xr-x | docs/exploring-gnuradio/dial_tone.py | 25 | ||||
-rw-r--r-- | docs/exploring-gnuradio/dial_tone_example.xml | 21 | ||||
-rw-r--r-- | docs/exploring-gnuradio/exploring-gnuradio.xml | 2 | ||||
-rw-r--r-- | docs/sphinx/source/gr/index.rst | 8 | ||||
-rw-r--r-- | docs/sphinx/source/gr/source_blk.rst | 8 |
6 files changed, 34 insertions, 48 deletions
diff --git a/docs/doxygen/other/main_page.dox b/docs/doxygen/other/main_page.dox index 2826824647..15a56d0dec 100644 --- a/docs/doxygen/other/main_page.dox +++ b/docs/doxygen/other/main_page.dox @@ -62,7 +62,7 @@ done. A single source and sink are used with a FIR filter between them. \code - from gnuradio import gr, filter + from gnuradio import gr, filter, analog class my_topblock(gr.top_block): def __init__(self): @@ -71,7 +71,7 @@ them. amp = 1 taps = filter.firdes.low_pass(1, 1, 0.1, 0.01) - self.src = gr.noise_source_c(gr.GR_GAUSSIAN, amp) + self.src = analog.noise_source_c(gr.GR_GAUSSIAN, amp) self.flt = filter.fir_filter_ccf(1, taps) self.snk = gr.null_sink(gr.sizeof_gr_complex) @@ -203,19 +203,19 @@ running and processing data, performing the reconfiguration, and then restarting the graph by unlocking it. The following example code shows a graph that first adds two -gr_noise_source_c blocks and then replaces the gr_add_cc block with a +analog::noise_source_c blocks and then replaces the gr_add_cc block with a gr_sub_cc block to then subtract the sources. \code -from gnuradio import gr +from gnuradio import gr, analog import time class mytb(gr.top_block): def __init__(self): gr.top_block.__init__(self) - self.src0 = gr.noise_source_c(gr.GR_GAUSSIAN, 1) - self.src1 = gr.noise_source_c(gr.GR_GAUSSIAN, 1) + self.src0 = analog.noise_source_c(gr.GR_GAUSSIAN, 1) + self.src1 = analog.noise_source_c(gr.GR_GAUSSIAN, 1) self.add = gr.add_cc() self.sub = gr.sub_cc() self.head = gr.head(gr.sizeof_gr_complex, 1000000) @@ -262,15 +262,15 @@ The following example expands the previous example but sets and resets the max noutput_items both locally and globally. \code -from gnuradio import gr +from gnuradio import gr, analog import time class mytb(gr.top_block): def __init__(self): gr.top_block.__init__(self) - self.src0 = gr.noise_source_c(gr.GR_GAUSSIAN, 1) - self.src1 = gr.noise_source_c(gr.GR_GAUSSIAN, 1) + self.src0 = analog.noise_source_c(gr.GR_GAUSSIAN, 1) + self.src1 = analog.noise_source_c(gr.GR_GAUSSIAN, 1) self.add = gr.add_cc() self.sub = gr.sub_cc() self.head = gr.head(gr.sizeof_gr_complex, 1000000) diff --git a/docs/exploring-gnuradio/dial_tone.py b/docs/exploring-gnuradio/dial_tone.py index cabfa0864d..ba43c43bfc 100755 --- a/docs/exploring-gnuradio/dial_tone.py +++ b/docs/exploring-gnuradio/dial_tone.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2007 Free Software Foundation, Inc. +# Copyright 2004,2007,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -22,22 +22,23 @@ from gnuradio import gr from gnuradio import audio +from gnuradio import analog -def build_graph (): +def build_graph(): sampling_freq = 32000 ampl = 0.1 - tb = gr.top_block () - src0 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 350, ampl) - src1 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 440, ampl) - dst = audio.sink (sampling_freq) - tb.connect (src0, (dst, 0)) - tb.connect (src1, (dst, 1)) + tb = gr.top_block() + src0 = analog.sig_source_f(sampling_freq, analog.GR_SIN_WAVE, 350, ampl) + src1 = analog.sig_source_f(sampling_freq, analog.GR_SIN_WAVE, 440, ampl) + dst = audio.sink(sampling_freq) + tb.connect(src0, (dst, 0)) + tb.connect(src1, (dst, 1)) return tb if __name__ == '__main__': - tb = build_graph () - tb.start () - raw_input ('Press Enter to quit: ') - tb.stop () + tb = build_graph() + tb.start() + raw_input('Press Enter to quit: ') + tb.stop() diff --git a/docs/exploring-gnuradio/dial_tone_example.xml b/docs/exploring-gnuradio/dial_tone_example.xml index 14ea68039e..5d193df776 100644 --- a/docs/exploring-gnuradio/dial_tone_example.xml +++ b/docs/exploring-gnuradio/dial_tone_example.xml @@ -5,24 +5,25 @@ from gnuradio import gr from gnuradio import audio +from gnuradio import analog def build_graph (): sampling_freq = 48000 ampl = 0.1 - fg = gr.flow_graph () - src0 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 350, ampl) - src1 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 440, ampl) - dst = audio.sink (sampling_freq) - fg.connect ((src0, 0), (dst, 0)) - fg.connect ((src1, 0), (dst, 1)) + fg = gr.flow_graph() + src0 = analog.sig_source_f(sampling_freq, analog.GR_SIN_WAVE, 350, ampl) + src1 = analog.sig_source_f(sampling_freq, analog.GR_SIN_WAVE, 440, ampl) + dst = audio.sink(sampling_freq) + fg.connect((src0, 0), (dst, 0)) + fg.connect((src1, 0), (dst, 1)) return fg if __name__ == '__main__': - fg = build_graph () - fg.start () - raw_input ('Press Enter to quit: ') - fg.stop () + fg = build_graph() + fg.start() + raw_input('Press Enter to quit: ') + fg.stop() </programlisting> </example> diff --git a/docs/exploring-gnuradio/exploring-gnuradio.xml b/docs/exploring-gnuradio/exploring-gnuradio.xml index 286ca86095..5b70d4d0bf 100644 --- a/docs/exploring-gnuradio/exploring-gnuradio.xml +++ b/docs/exploring-gnuradio/exploring-gnuradio.xml @@ -180,7 +180,7 @@ right.</para> <para>We start by creating a flow graph to hold the blocks and connections between them. The two sine waves are generated by the -gr.sig_source_f calls. The f suffix indicates that the source produces +analog.sig_source_f calls. The f suffix indicates that the source produces floats. One sine wave is at 350 Hz, and the other is at 440 Hz. Together, they sound like the US dial tone.</para> diff --git a/docs/sphinx/source/gr/index.rst b/docs/sphinx/source/gr/index.rst index 18cbdcbee6..ec4671d545 100644 --- a/docs/sphinx/source/gr/index.rst +++ b/docs/sphinx/source/gr/index.rst @@ -23,14 +23,6 @@ Signal Sources gnuradio.gr.lfsr_32k_source_s gnuradio.gr.null_source - gnuradio.gr.noise_source_c - gnuradio.gr.noise_source_f - gnuradio.gr.noise_source_i - gnuradio.gr.noise_source_s - gnuradio.gr.sig_source_c - gnuradio.gr.sig_source_f - gnuradio.gr.sig_source_i - gnuradio.gr.sig_source_s gnuradio.gr.vector_source_b gnuradio.gr.vector_source_c gnuradio.gr.vector_source_f diff --git a/docs/sphinx/source/gr/source_blk.rst b/docs/sphinx/source/gr/source_blk.rst index c3e30c17b7..8e9f67980c 100644 --- a/docs/sphinx/source/gr/source_blk.rst +++ b/docs/sphinx/source/gr/source_blk.rst @@ -3,14 +3,6 @@ gnuradio.gr: Signal Sources .. autooldblock:: gnuradio.gr.lfsr_32k_source_s .. autooldblock:: gnuradio.gr.null_source -.. autooldblock:: gnuradio.gr.noise_source_c -.. autooldblock:: gnuradio.gr.noise_source_f -.. autooldblock:: gnuradio.gr.noise_source_i -.. autooldblock:: gnuradio.gr.noise_source_s -.. autooldblock:: gnuradio.gr.sig_source_c -.. autooldblock:: gnuradio.gr.sig_source_f -.. autooldblock:: gnuradio.gr.sig_source_i -.. autooldblock:: gnuradio.gr.sig_source_s .. autooldblock:: gnuradio.gr.vector_source_b .. autooldblock:: gnuradio.gr.vector_source_c .. autooldblock:: gnuradio.gr.vector_source_f |