diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-03-17 21:31:47 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-03-17 21:31:47 -0400 |
commit | cabdafcb55423b54b63b711c942d4438b6af1a65 (patch) | |
tree | 4130dbe4ef3f3814baad5e6d7a6f65c19add0657 | |
parent | 35e94fb8f4f3ead626f6ed28385148475773afc7 (diff) |
cleaning up, converting examples, etc.
32 files changed, 468 insertions, 508 deletions
diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in index 86cf2fc96f..ccd647134b 100644 --- a/docs/doxygen/Doxyfile.in +++ b/docs/doxygen/Doxyfile.in @@ -581,19 +581,6 @@ EXCLUDE = @abs_top_builddir@/docs/doxygen/html \ @abs_top_builddir@/docs/doxygen/other/doxypy.py \ @abs_top_builddir@/dtools \ @abs_top_builddir@/gnuradio-core/src/lib/bug_work_around_6.cc \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/assembly.h \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_all.py \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_XXX.py \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_filter_XXX.py \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig_generic.py \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_util.py \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_freq_xlating_fir_filter_XXX.py \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_interp_fir_filter_XXX.py \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_rational_resampler_base_XXX.py \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_utils.py \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/gr_altivec.h \ - @abs_top_builddir@/gnuradio-core/src/lib/filter/sse_debug.h \ @abs_top_builddir@/gnuradio-core/src/lib/gengen/generate_all.py \ @abs_top_builddir@/gnuradio-core/src/lib/gengen/generate_common.py \ @abs_top_builddir@/gnuradio-core/src/lib/missing/bug_work_around_8.cc \ diff --git a/gnuradio-core/src/examples/mp-sched/synthetic.py b/gnuradio-core/src/examples/mp-sched/synthetic.py index 4b509af228..6f0bb85da8 100755 --- a/gnuradio-core/src/examples/mp-sched/synthetic.py +++ b/gnuradio-core/src/examples/mp-sched/synthetic.py @@ -29,7 +29,7 @@ import os class pipeline(gr.hier_block2): def __init__(self, nstages, ntaps=256): """ - Create a pipeline of nstages of gr.fir_filter_fff's connected in serial + Create a pipeline of nstages of filter.fir_filter_fff's connected in serial terminating in a blocks.null_sink. """ gr.hier_block2.__init__(self, "pipeline", @@ -38,7 +38,7 @@ class pipeline(gr.hier_block2): taps = ntaps*[1.0/ntaps] upstream = self for i in range(nstages): - op = gr.fir_filter_fff(1, taps) + op = filter.fir_filter_fff(1, taps) self.connect(upstream, op) upstream = op diff --git a/gnuradio-core/src/examples/mp-sched/wfm_rcv_pll_to_wav.py b/gnuradio-core/src/examples/mp-sched/wfm_rcv_pll_to_wav.py index 2f638e26ec..7cf3210b0e 100755 --- a/gnuradio-core/src/examples/mp-sched/wfm_rcv_pll_to_wav.py +++ b/gnuradio-core/src/examples/mp-sched/wfm_rcv_pll_to_wav.py @@ -68,7 +68,7 @@ class wfm_rx_block (gr.top_block): 0.1, # passband ripple 60) # stopband attenuation #print len(chan_filt_coeffs) - chan_filt = gr.fir_filter_ccf (chanfilt_decim, chan_filt_coeffs) + chan_filt = filter.fir_filter_ccf (chanfilt_decim, chan_filt_coeffs) #self.guts = analog.wfm_rcv (demod_rate, audio_decimation) diff --git a/gnuradio-core/src/lib/general/README b/gnuradio-core/src/lib/general/README deleted file mode 100644 index 5fa18d7f64..0000000000 --- a/gnuradio-core/src/lib/general/README +++ /dev/null @@ -1,98 +0,0 @@ -Files beginning with Gr* define classes that inherit from VrSigProc. -These are high level signal processing modules that can be glued -together in your signal processing chain. - -All the others are either lower level routines which implement the -functionality of the Gr* modules, but are easier to test (fewer -dependencies), or they are general purpose. - -gr_fir_???.{h,cc}, where ??? are in F, S or C are low level Finite -Impulse Response Filters. These turn out to be where the bulk of the -cycles are burned in many applications. The ??? suffix specifies the -input type, output type and tap type of the arguments. We've -implemented the most frequently used ones. - -[Once upon a time this stuff was done with templates -(gr_fir<iType,oType,tapType>), but this turned out to be a headache. -The code appeared to trigger a bug in GCC where we were getting -multiple definitions of unrelated stuff when we started subclassing -partially specialized templates. It was also not obvious as to to -what combinations of iType, oType and tapType actually worked. We're -now explicit, and the world is a safer place to live...] - -The top level routines for FIR filtering are: - - GrFIRfilterFFF : Float input, Float output, Float taps - -- general purpose - - GrFIRfilterCCF : Complex input, Complex output, Float taps - -- applying real filter to a complex signal - - GrFIRfilterFCC : Float input, Complex output, Complex taps - -- applying complex filter to float input - - GrFIRfilterSCC : Short input, Complex output, Complex taps - -- applying complex filter to short input. Quantizes complex - coefficients to 16 bits and uses MMX or SSE2 as appropriate - - -The combination of down conversion (frequency translation) and channel -selection (filtering) is performed with: - - GrFreqXlatingFIRfilterSFC : Short input, Float taps, Complex baseband output - -- quantizes complex coefficents to 16 bits and uses MMX or - SSE2 (128-bit MMX) as appropriate [optimization to be done]. - - GrFreqXlatingFIRfilterFFC : Float input, Float taps, Complex baseband output - -- 3dnow or SSE as appropriate. - - -[ The stuff described from here down is used to implement the routines - above. This info is only relevant to those who are hacking the internals ] - - -A bit of indirection is involved in selecting the fastest -implementation for any given platform. The lower level classes -gr_fir_FFF.h, gr_fir_CCF, gr_fir_FCC and gr_fir_SCC have i/o -signatures similar to the high level clases above. These -should be considered the abstract base classes that you -work with. Note that they are not actually abstract (they've got a -default implementation; this might be considered a bug), but they -should not be directly instantiated by user code. - -Instead of directly instantiating a gr_fir_FFF, for example, your code -should actually: - - #include <gr_fir_util.h> - - // let the system pick the best implementation for you - gr_fir_FFF *filter = gr_fir_util::create_gr_fir_FFF (my_taps); - -Clear? The same for all the other gr_fir_XXX's. - - - -Performance hacking can be done by subclassing the appropriate -base class. For example, on the x86 platform, there are two -additional classes derived from gr_fir_FFF, gr_fir_FFF_sse and -gr_fir_FFF_3dnow. These classes are then made available to the rest -of the system by virtue of being added to gr_fir_sysconfig_x86.cc, -along with any guards (CPUID checks) needed to ensure that only -compatible code is executed on the current hardware. - - -TO DO ------- - -* Move all the machine specific code to a subdirectory, then have -configure symlink to the right directory. This will allow us to build on -any platform without choking. There is generic code for all routines, -only the machine dependent speedup will be lacking. - -* Add an interface to gr_fir_util that will return a vector of all -valid constructors with descriptive names for each i/o signature. -This will allow the test code and benchmarking code to be blissfully -ignorant of what platform they're running on. The actual building of -the vectors should be done bottom up through the gr_fir_sysconfig -hierarchy. - diff --git a/gr-analog/examples/fmtest.py b/gr-analog/examples/fmtest.py index 359b05ba04..327da8eacb 100755 --- a/gr-analog/examples/fmtest.py +++ b/gr-analog/examples/fmtest.py @@ -24,6 +24,7 @@ from gnuradio import gr from gnuradio import blocks from gnuradio import filter from gnuradio import analog +from gnuradio import channels import sys, math, time try: @@ -86,7 +87,7 @@ class fmtest(gr.top_block): self.head = blocks.head(gr.sizeof_gr_complex, self._nsamples) self.snk_tx = blocks.vector_sink_c() - self.channel = filter.channel_model(0.1) + self.channel = channels.channel_model(0.1) self.connect(self.sum, self.head, self.channel, self.snk_tx) diff --git a/gr-audio/examples/python/noise.py b/gr-audio/examples/python/noise.py index bba9e83eae..b15065cd4e 100755 --- a/gr-audio/examples/python/noise.py +++ b/gr-audio/examples/python/noise.py @@ -44,7 +44,7 @@ class my_top_block(gr.top_block): sample_rate = int(options.sample_rate) ampl = 0.1 - src = gr.glfsr_source_b(32) # Pseudorandom noise source + src = digital.glfsr_source_b(32) # Pseudorandom noise source b2f = digital.chunks_to_symbols_bf([ampl, -ampl], 1) dst = audio.sink(sample_rate, options.audio_output) self.connect(src, b2f, dst) diff --git a/gr-audio/examples/python/test_resampler.py b/gr-audio/examples/python/test_resampler.py index 0f5544cfa9..94d95fecf3 100755 --- a/gr-audio/examples/python/test_resampler.py +++ b/gr-audio/examples/python/test_resampler.py @@ -22,6 +22,7 @@ from gnuradio import gr, gru from gnuradio import audio +from gnuradio import filter from gnuradio.eng_option import eng_option from optparse import OptionParser @@ -65,7 +66,7 @@ class my_top_block(gr.top_block): ampl = 0.1 src0 = analog.sig_source_f(input_rate, analog.GR_SIN_WAVE, 650, ampl) - rr = blocks.rational_resampler_fff(interp, decim) + rr = filter.rational_resampler_fff(interp, decim) dst = audio.sink(output_rate, options.audio_output) self.connect(src0, rr, (dst, 0)) diff --git a/gr-blocks/examples/ctrlport/pfb_sync_test-qt.grc b/gr-blocks/examples/ctrlport/pfb_sync_test-qt.grc index 0d245089a5..c28ed6d71a 100644 --- a/gr-blocks/examples/ctrlport/pfb_sync_test-qt.grc +++ b/gr-blocks/examples/ctrlport/pfb_sync_test-qt.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Sun Mar 17 17:11:21 2013</timestamp> + <timestamp>Sun Mar 17 21:00:28 2013</timestamp> <block> <key>options</key> <param> @@ -130,45 +130,6 @@ </param> </block> <block> - <key>blocks_vector_source_x</key> - <param> - <key>id</key> - <value>blocks_vector_source_x_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>byte</value> - </param> - <param> - <key>vector</key> - <value>0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50</value> - </param> - <param> - <key>tags</key> - <value>[]</value> - </param> - <param> - <key>repeat</key> - <value>True</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(190, 71)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>blocks_packed_to_unpacked_xx</key> <param> <key>id</key> @@ -756,6 +717,68 @@ <value>0</value> </param> </block> + <block> + <key>blocks_vector_source_x</key> + <param> + <key>id</key> + <value>blocks_vector_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>byte</value> + </param> + <param> + <key>vector</key> + <value>(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50)</value> + </param> + <param> + <key>tags</key> + <value>[]</value> + </param> + <param> + <key>repeat</key> + <value>True</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(190, 71)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>blocks_ctrlport_monitor</key> + <param> + <key>id</key> + <value>blocks_ctrlport_monitor_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>en</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(193, 7)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> <connection> <source_block_id>blocks_throttle_0</source_block_id> <sink_block_id>digital_psk_mod_0</sink_block_id> diff --git a/gr-blocks/examples/ctrlport/pfb_sync_test.grc b/gr-blocks/examples/ctrlport/pfb_sync_test.grc index da63b4f5b3..06692aad46 100644 --- a/gr-blocks/examples/ctrlport/pfb_sync_test.grc +++ b/gr-blocks/examples/ctrlport/pfb_sync_test.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Thu Feb 21 19:08:39 2013</timestamp> + <timestamp>Sun Mar 17 21:01:36 2013</timestamp> <block> <key>options</key> <param> @@ -500,29 +500,6 @@ </param> </block> <block> - <key>ctrlport_monitor</key> - <param> - <key>id</key> - <value>ctrlport_monitor_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>en</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(228, 5)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>blocks_file_source</key> <param> <key>id</key> @@ -623,6 +600,29 @@ <value>0</value> </param> </block> + <block> + <key>blocks_ctrlport_monitor</key> + <param> + <key>id</key> + <value>blocks_ctrlport_monitor_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>en</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(229, 7)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> <connection> <source_block_id>blocks_throttle_0</source_block_id> <sink_block_id>digital_psk_mod_0</sink_block_id> diff --git a/gr-blocks/examples/metadata/file_metadata_sink.grc b/gr-blocks/examples/metadata/file_metadata_sink.grc index 1328fb7978..4cda1eba39 100644 --- a/gr-blocks/examples/metadata/file_metadata_sink.grc +++ b/gr-blocks/examples/metadata/file_metadata_sink.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Fri Dec 14 17:09:06 2012</timestamp> + <timestamp>Sun Mar 17 20:44:09 2013</timestamp> <block> <key>options</key> <param> @@ -61,42 +61,77 @@ </param> </block> <block> - <key>gr_sig_source_x</key> + <key>variable_qtgui_range</key> <param> <key>id</key> - <value>gr_sig_source_x_0</value> + <value>qt_samp_rate</value> </param> <param> <key>_enabled</key> - <value>False</value> + <value>True</value> </param> <param> - <key>type</key> - <value>complex</value> + <key>label</key> + <value></value> </param> <param> - <key>samp_rate</key> + <key>value</key> <value>samp_rate</value> </param> <param> - <key>waveform</key> - <value>gr.GR_COS_WAVE</value> + <key>start</key> + <value>200000</value> </param> <param> - <key>freq</key> - <value>1000</value> + <key>stop</key> + <value>5000000</value> </param> <param> - <key>amp</key> - <value>1</value> + <key>step</key> + <value>200000</value> </param> <param> - <key>offset</key> + <key>widget</key> + <value>counter_slider</value> + </param> + <param> + <key>orient</key> + <value>Qt.Horizontal</value> + </param> + <param> + <key>min_len</key> + <value>200</value> + </param> + <param> + <key>gui_hint</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(330, 259)</value> + </param> + <param> + <key>_rotation</key> <value>0</value> </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>samp_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>200000</value> + </param> <param> <key>_coordinate</key> - <value>(57, 140)</value> + <value>(208, 11)</value> </param> <param> <key>_rotation</key> @@ -104,54 +139,54 @@ </param> </block> <block> - <key>variable_qtgui_range</key> + <key>blocks_file_meta_sink</key> <param> <key>id</key> - <value>qt_samp_rate</value> + <value>blocks_file_meta_sink_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>label</key> - <value></value> + <key>file</key> + <value>/tmp/metadat_file.out</value> </param> <param> - <key>value</key> - <value>samp_rate</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>start</key> - <value>200000</value> + <key>samp_rate</key> + <value>samp_rate</value> </param> <param> - <key>stop</key> - <value>5000000</value> + <key>rel_rate</key> + <value>1</value> </param> <param> - <key>step</key> - <value>200000</value> + <key>vlen</key> + <value>1</value> </param> <param> - <key>widget</key> - <value>counter_slider</value> + <key>max_seg_size</key> + <value>1000000</value> </param> <param> - <key>orient</key> - <value>Qt.Horizontal</value> + <key>extra_dict</key> + <value>""</value> </param> <param> - <key>min_len</key> - <value>200</value> + <key>detached</key> + <value>True</value> </param> <param> - <key>gui_hint</key> - <value></value> + <key>unbuffered</key> + <value>False</value> </param> <param> <key>_coordinate</key> - <value>(330, 259)</value> + <value>(569, 124)</value> </param> <param> <key>_rotation</key> @@ -159,22 +194,30 @@ </param> </block> <block> - <key>variable</key> + <key>blocks_head</key> <param> <key>id</key> - <value>samp_rate</value> + <value>blocks_head_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>200000</value> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>num_items</key> + <value>20000000</value> + </param> + <param> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(208, 11)</value> + <value>(309, 172)</value> </param> <param> <key>_rotation</key> @@ -189,7 +232,7 @@ </param> <param> <key>_enabled</key> - <value>True</value> + <value>False</value> </param> <param> <key>type</key> @@ -845,10 +888,10 @@ </param> </block> <block> - <key>blocks_head</key> + <key>analog_sig_source_x</key> <param> <key>id</key> - <value>blocks_head_0</value> + <value>analog_sig_source_x_0</value> </param> <param> <key>_enabled</key> @@ -859,71 +902,28 @@ <value>complex</value> </param> <param> - <key>num_items</key> - <value>20000000</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(309, 172)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>blocks_file_meta_sink</key> - <param> - <key>id</key> - <value>blocks_file_meta_sink_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>file</key> - <value>/tmp/metadat_file.out</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - <param> <key>samp_rate</key> <value>samp_rate</value> </param> <param> - <key>rel_rate</key> - <value>1</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>max_seg_size</key> - <value>1000000</value> + <key>waveform</key> + <value>analog.GR_COS_WAVE</value> </param> <param> - <key>extra_dict</key> - <value>""</value> + <key>freq</key> + <value>1000</value> </param> <param> - <key>detached</key> - <value>True</value> + <key>amp</key> + <value>1</value> </param> <param> - <key>unbuffered</key> - <value>False</value> + <key>offset</key> + <value>0</value> </param> <param> <key>_coordinate</key> - <value>(569, 124)</value> + <value>(48, 115)</value> </param> <param> <key>_rotation</key> @@ -931,20 +931,20 @@ </param> </block> <connection> - <source_block_id>gr_sig_source_x_0</source_block_id> + <source_block_id>uhd_usrp_source_0</source_block_id> <sink_block_id>blocks_head_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>uhd_usrp_source_0</source_block_id> - <sink_block_id>blocks_head_0</sink_block_id> + <source_block_id>blocks_head_0</source_block_id> + <sink_block_id>blocks_file_meta_sink_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blocks_head_0</source_block_id> - <sink_block_id>blocks_file_meta_sink_0</sink_block_id> + <source_block_id>analog_sig_source_x_0</source_block_id> + <sink_block_id>blocks_head_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> diff --git a/gr-blocks/examples/msg_passing/strobe.grc b/gr-blocks/examples/msg_passing/strobe.grc index a918332ce8..e5001a4262 100644 --- a/gr-blocks/examples/msg_passing/strobe.grc +++ b/gr-blocks/examples/msg_passing/strobe.grc @@ -1,46 +1,59 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Thu Dec 6 11:33:08 2012</timestamp> + <timestamp>Sun Mar 17 20:42:59 2013</timestamp> <block> - <key>variable</key> + <key>options</key> <param> <key>id</key> - <value>samp_rate</value> + <value>strobe</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>32000</value> + <key>title</key> + <value></value> </param> <param> - <key>_coordinate</key> - <value>(10, 170)</value> + <key>author</key> + <value></value> </param> <param> - <key>_rotation</key> - <value>0</value> + <key>description</key> + <value></value> </param> - </block> - <block> - <key>gr_pdu_to_tagged_stream</key> <param> - <key>id</key> - <value>gr_pdu_to_tagged_stream_0</value> + <key>window_size</key> + <value>1280, 1024</value> </param> <param> - <key>_enabled</key> + <key>generate_options</key> + <value>no_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> <value>True</value> </param> <param> - <key>type</key> - <value>byte</value> + <key>max_nouts</key> + <value>0</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(443, 89)</value> + <value>(10, 10)</value> </param> <param> <key>_rotation</key> @@ -48,18 +61,22 @@ </param> </block> <block> - <key>blocks_message_debug</key> + <key>variable</key> <param> <key>id</key> - <value>blocks_message_debug_0</value> + <value>samp_rate</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> + <key>value</key> + <value>32000</value> + </param> + <param> <key>_coordinate</key> - <value>(1049, 176)</value> + <value>(10, 170)</value> </param> <param> <key>_rotation</key> @@ -67,22 +84,18 @@ </param> </block> <block> - <key>gr_tagged_stream_to_pdu</key> + <key>blocks_message_debug</key> <param> <key>id</key> - <value>gr_tagged_stream_to_pdu_0</value> + <value>blocks_message_debug_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>byte</value> - </param> - <param> <key>_coordinate</key> - <value>(870, 89)</value> + <value>(1049, 176)</value> </param> <param> <key>_rotation</key> @@ -90,10 +103,10 @@ </param> </block> <block> - <key>blocks_copy</key> + <key>blocks_pdu_to_tagged_stream</key> <param> <key>id</key> - <value>blocks_copy_0</value> + <value>blocks_pdu_to_tagged_stream_0</value> </param> <param> <key>_enabled</key> @@ -104,16 +117,8 @@ <value>byte</value> </param> <param> - <key>num_ports</key> - <value>1</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> <key>_coordinate</key> - <value>(686, 89)</value> + <value>(388, 85)</value> </param> <param> <key>_rotation</key> @@ -124,7 +129,7 @@ <key>blocks_message_strobe</key> <param> <key>id</key> - <value>blocks_message_strobe_0</value> + <value>blocks_message_strobe_0_0</value> </param> <param> <key>_enabled</key> @@ -132,15 +137,15 @@ </param> <param> <key>msg</key> - <value>pmt.intern("TEST")</value> + <value>pmt.cons( pmt.PMT_NIL, pmt.make_u8vector(512,0) )</value> </param> <param> <key>period</key> - <value>1000</value> + <value>750</value> </param> <param> <key>_coordinate</key> - <value>(423, 177)</value> + <value>(95, 95)</value> </param> <param> <key>_rotation</key> @@ -148,26 +153,30 @@ </param> </block> <block> - <key>blocks_message_strobe</key> + <key>blocks_copy</key> <param> <key>id</key> - <value>blocks_message_strobe_0_0</value> + <value>blocks_copy_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>msg</key> - <value>pmt.cons( pmt.PMT_NIL, pmt.make_u8vector(512,0) )</value> + <key>type</key> + <value>byte</value> </param> <param> - <key>period</key> - <value>750</value> + <key>enabled</key> + <value>True</value> + </param> + <param> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(99, 85)</value> + <value>(629, 81)</value> </param> <param> <key>_rotation</key> @@ -175,58 +184,49 @@ </param> </block> <block> - <key>options</key> + <key>blocks_tagged_stream_to_pdu</key> <param> <key>id</key> - <value>strobe</value> + <value>blocks_tagged_stream_to_pdu_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>title</key> - <value></value> - </param> - <param> - <key>author</key> - <value></value> - </param> - <param> - <key>description</key> - <value></value> - </param> - <param> - <key>window_size</key> - <value>1280, 1024</value> + <key>type</key> + <value>byte</value> </param> <param> - <key>generate_options</key> - <value>no_gui</value> + <key>_coordinate</key> + <value>(837, 47)</value> </param> <param> - <key>category</key> - <value>Custom</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>blocks_message_strobe</key> <param> - <key>run_options</key> - <value>prompt</value> + <key>id</key> + <value>blocks_message_strobe_0</value> </param> <param> - <key>run</key> + <key>_enabled</key> <value>True</value> </param> <param> - <key>max_nouts</key> - <value>0</value> + <key>msg</key> + <value>pmt.intern("TEST")</value> </param> <param> - <key>realtime_scheduling</key> - <value></value> + <key>period</key> + <value>1000</value> </param> <param> <key>_coordinate</key> - <value>(10, 10)</value> + <value>(423, 164)</value> </param> <param> <key>_rotation</key> @@ -234,31 +234,31 @@ </param> </block> <connection> - <source_block_id>blocks_message_strobe_0_0</source_block_id> - <sink_block_id>gr_pdu_to_tagged_stream_0</sink_block_id> + <source_block_id>blocks_message_strobe_0</source_block_id> + <sink_block_id>blocks_message_debug_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blocks_message_strobe_0</source_block_id> - <sink_block_id>blocks_message_debug_0</sink_block_id> + <source_block_id>blocks_message_strobe_0_0</source_block_id> + <sink_block_id>blocks_pdu_to_tagged_stream_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_tagged_stream_to_pdu_0</source_block_id> + <source_block_id>blocks_tagged_stream_to_pdu_0</source_block_id> <sink_block_id>blocks_message_debug_0</sink_block_id> <source_key>0</source_key> - <sink_key>0</sink_key> + <sink_key>2</sink_key> </connection> <connection> <source_block_id>blocks_copy_0</source_block_id> - <sink_block_id>gr_tagged_stream_to_pdu_0</sink_block_id> + <sink_block_id>blocks_tagged_stream_to_pdu_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_pdu_to_tagged_stream_0</source_block_id> + <source_block_id>blocks_pdu_to_tagged_stream_0</source_block_id> <sink_block_id>blocks_copy_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> diff --git a/gr-blocks/examples/tags/test_file_tags.py b/gr-blocks/examples/tags/test_file_tags.py index 758623de98..cc11cf594e 100755 --- a/gr-blocks/examples/tags/test_file_tags.py +++ b/gr-blocks/examples/tags/test_file_tags.py @@ -39,7 +39,7 @@ def main(): thr = blocks.throttle(gr.sizeof_short, 10e3) ann = blocks.annotator_alltoall(1000000, gr.sizeof_short) - tagger = blocks..burst_tagger(gr.sizeof_short) + tagger = blocks.burst_tagger(gr.sizeof_short) fsnk = blocks.tagged_file_sink(gr.sizeof_short, 1) diff --git a/gr-blocks/grc/blocks_vector_source_x.xml b/gr-blocks/grc/blocks_vector_source_x.xml index 5221c4f3eb..6de3f5b184 100644 --- a/gr-blocks/grc/blocks_vector_source_x.xml +++ b/gr-blocks/grc/blocks_vector_source_x.xml @@ -47,7 +47,7 @@ <param> <name>Vector</name> <key>vector</key> - <value>[0, 0, 0]</value> + <value>(0, 0, 0)</value> <type>raw</type> </param> <param> diff --git a/gr-blocks/include/blocks/annotator_raw.h b/gr-blocks/include/blocks/annotator_raw.h index e835f0bd8d..ae273c2a46 100644 --- a/gr-blocks/include/blocks/annotator_raw.h +++ b/gr-blocks/include/blocks/annotator_raw.h @@ -48,7 +48,7 @@ namespace gr { static sptr make(size_t sizeof_stream_item); // insert a tag to be added - void add_tag(uint64_t offset, pmt::pmt_t key, pmt::pmt_t val); + virtual void add_tag(uint64_t offset, pmt::pmt_t key, pmt::pmt_t val) = 0; }; } /* namespace blocks */ diff --git a/gr-blocks/include/blocks/control_loop.h b/gr-blocks/include/blocks/control_loop.h index 475b28f944..7c09f5915b 100644 --- a/gr-blocks/include/blocks/control_loop.h +++ b/gr-blocks/include/blocks/control_loop.h @@ -99,7 +99,7 @@ namespace gr { * * \param bw (float) new bandwidth */ - void set_loop_bandwidth(float bw); + virtual void set_loop_bandwidth(float bw); /*! * \brief Set the loop damping factor diff --git a/gr-blocks/lib/annotator_raw_impl.cc b/gr-blocks/lib/annotator_raw_impl.cc index 8d30ba16de..fa323f999e 100644 --- a/gr-blocks/lib/annotator_raw_impl.cc +++ b/gr-blocks/lib/annotator_raw_impl.cc @@ -53,7 +53,12 @@ namespace gr { set_relative_rate(1.0); } - void annotator_raw_impl::add_tag(uint64_t offset, pmt_t key, pmt_t val) + annotator_raw_impl::~annotator_raw_impl() + { + } + + void + annotator_raw_impl::add_tag(uint64_t offset, pmt_t key, pmt_t val) { gruel::scoped_lock l(d_mutex); @@ -74,10 +79,6 @@ namespace gr { } } - annotator_raw_impl::~annotator_raw_impl() - { - } - int annotator_raw_impl::work(int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gr-blocks/swig/blocks_swig.i b/gr-blocks/swig/blocks_swig.i index 51861de8be..ad0b7b0717 100644 --- a/gr-blocks/swig/blocks_swig.i +++ b/gr-blocks/swig/blocks_swig.i @@ -54,6 +54,9 @@ #include "blocks/and_const_bb.h" #include "blocks/and_const_ss.h" #include "blocks/and_const_ii.h" +#include "blocks/annotator_1to1.h" +#include "blocks/annotator_alltoall.h" +#include "blocks/annotator_raw.h" #include "blocks/argmax_fs.h" #include "blocks/argmax_is.h" #include "blocks/argmax_ss.h" @@ -245,6 +248,9 @@ %include "blocks/and_const_bb.h" %include "blocks/and_const_ss.h" %include "blocks/and_const_ii.h" +%include "blocks/annotator_1to1.h" +%include "blocks/annotator_alltoall.h" +%include "blocks/annotator_raw.h" %include "blocks/argmax_fs.h" %include "blocks/argmax_is.h" %include "blocks/argmax_ss.h" @@ -435,6 +441,9 @@ GR_SWIG_BLOCK_MAGIC2(blocks, and_ii); GR_SWIG_BLOCK_MAGIC2(blocks, and_const_bb); GR_SWIG_BLOCK_MAGIC2(blocks, and_const_ss); GR_SWIG_BLOCK_MAGIC2(blocks, and_const_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, annotator_1to1); +GR_SWIG_BLOCK_MAGIC2(blocks, annotator_alltoall); +GR_SWIG_BLOCK_MAGIC2(blocks, annotator_raw); GR_SWIG_BLOCK_MAGIC2(blocks, argmax_fs); GR_SWIG_BLOCK_MAGIC2(blocks, argmax_is); GR_SWIG_BLOCK_MAGIC2(blocks, argmax_ss); diff --git a/gr-digital/CMakeLists.txt b/gr-digital/CMakeLists.txt index ab29c6d183..1ef84d5654 100644 --- a/gr-digital/CMakeLists.txt +++ b/gr-digital/CMakeLists.txt @@ -38,10 +38,10 @@ GR_REGISTER_COMPONENT("gr-digital" ENABLE_GR_DIGITAL ENABLE_GR_FILTER ) -#GR_SET_GLOBAL(GR_DIGITAL_INCLUDE_DIRS - #${CMAKE_CURRENT_SOURCE_DIR}/include - #${CMAKE_CURRENT_BINARY_DIR}/include -#) +GR_SET_GLOBAL(GR_DIGITAL_INCLUDE_DIRS + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_BINARY_DIR}/include +) GR_SET_GLOBAL(GR_DIGITAL_SWIG_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/swig diff --git a/gr-digital/examples/demod/mpsk_demod.grc b/gr-digital/examples/demod/mpsk_demod.grc index 1045ef5797..c252bb6e4f 100644 --- a/gr-digital/examples/demod/mpsk_demod.grc +++ b/gr-digital/examples/demod/mpsk_demod.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Mon Aug 20 19:51:38 2012</timestamp> + <timestamp>Sun Mar 17 21:08:14 2013</timestamp> <block> <key>options</key> <param> @@ -123,49 +123,6 @@ </param> </block> <block> - <key>digital_dxpsk_mod</key> - <param> - <key>id</key> - <value>digital_dxpsk_mod_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>dqpsk</value> - </param> - <param> - <key>samples_per_symbol</key> - <value>samps_per_sym</value> - </param> - <param> - <key>excess_bw</key> - <value>0.35</value> - </param> - <param> - <key>mod_code</key> - <value>"gray"</value> - </param> - <param> - <key>verbose</key> - <value>False</value> - </param> - <param> - <key>log</key> - <value>False</value> - </param> - <param> - <key>_coordinate</key> - <value>(361, 119)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>variable</key> <param> <key>id</key> @@ -346,38 +303,58 @@ </param> </block> <block> - <key>channel_model</key> + <key>qtgui_const_sink_x</key> <param> <key>id</key> - <value>channel_model_0</value> + <value>qtgui_const_sink_x_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>noise_voltage</key> - <value>noise</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>freq_offset</key> - <value>freq_off</value> + <key>name</key> + <value>QT GUI Plot</value> </param> <param> - <key>epsilon</key> - <value>1.0</value> + <key>size</key> + <value>1024</value> </param> <param> - <key>taps</key> - <value>1.0</value> + <key>ymin</key> + <value>-2</value> </param> <param> - <key>seed</key> - <value>0</value> + <key>ymax</key> + <value>2</value> + </param> + <param> + <key>xmin</key> + <value>-2</value> + </param> + <param> + <key>xmax</key> + <value>2</value> + </param> + <param> + <key>nconnections</key> + <value>1</value> + </param> + <param> + <key>update_time</key> + <value>0.10</value> + </param> + <param> + <key>gui_hint</key> + <value>notebook@0</value> </param> <param> <key>_coordinate</key> - <value>(369, 264)</value> + <value>(810, 184)</value> </param> <param> <key>_rotation</key> @@ -385,10 +362,10 @@ </param> </block> <block> - <key>blocks_throttle</key> + <key>qtgui_freq_sink_x</key> <param> <key>id</key> - <value>blocks_throttle_0</value> + <value>qtgui_freq_sink_x_0</value> </param> <param> <key>_enabled</key> @@ -399,16 +376,48 @@ <value>complex</value> </param> <param> - <key>samples_per_second</key> + <key>name</key> + <value>QT GUI Plot</value> + </param> + <param> + <key>fftsize</key> + <value>1024</value> + </param> + <param> + <key>wintype</key> + <value>firdes.WIN_BLACKMAN_hARRIS</value> + </param> + <param> + <key>fc</key> + <value>0</value> + </param> + <param> + <key>bw</key> <value>samp_rate</value> </param> <param> - <key>vlen</key> + <key>ymin</key> + <value>-140</value> + </param> + <param> + <key>ymax</key> + <value>10</value> + </param> + <param> + <key>nconnections</key> <value>1</value> </param> <param> + <key>update_time</key> + <value>0.10</value> + </param> + <param> + <key>gui_hint</key> + <value>notebook@1</value> + </param> + <param> <key>_coordinate</key> - <value>(597, 142)</value> + <value>(810, 65)</value> </param> <param> <key>_rotation</key> @@ -416,10 +425,10 @@ </param> </block> <block> - <key>qtgui_const_sink_x</key> + <key>digital_dxpsk_mod</key> <param> <key>id</key> - <value>qtgui_const_sink_x_0</value> + <value>digital_dxpsk_mod_0</value> </param> <param> <key>_enabled</key> @@ -427,27 +436,31 @@ </param> <param> <key>type</key> - <value>complex</value> + <value>dqpsk</value> </param> <param> - <key>name</key> - <value>QT GUI Plot</value> + <key>samples_per_symbol</key> + <value>samps_per_sym</value> </param> <param> - <key>size</key> - <value>1024</value> + <key>excess_bw</key> + <value>0.35</value> </param> <param> - <key>nconnections</key> - <value>1</value> + <key>mod_code</key> + <value>"gray"</value> </param> <param> - <key>gui_hint</key> - <value>notebook@0</value> + <key>verbose</key> + <value>False</value> + </param> + <param> + <key>log</key> + <value>False</value> </param> <param> <key>_coordinate</key> - <value>(810, 184)</value> + <value>(361, 119)</value> </param> <param> <key>_rotation</key> @@ -455,10 +468,10 @@ </param> </block> <block> - <key>qtgui_freq_sink_x</key> + <key>blocks_throttle</key> <param> <key>id</key> - <value>qtgui_freq_sink_x_0</value> + <value>blocks_throttle_0</value> </param> <param> <key>_enabled</key> @@ -469,40 +482,55 @@ <value>complex</value> </param> <param> - <key>name</key> - <value>QT GUI Plot</value> + <key>samples_per_second</key> + <value>samp_rate</value> </param> <param> - <key>fftsize</key> - <value>1024</value> + <key>vlen</key> + <value>1</value> </param> <param> - <key>wintype</key> - <value>firdes.WIN_BLACKMAN_hARRIS</value> + <key>_coordinate</key> + <value>(597, 142)</value> </param> <param> - <key>fc</key> + <key>_rotation</key> <value>0</value> </param> + </block> + <block> + <key>channels_channel_model</key> <param> - <key>bw</key> - <value>samp_rate</value> + <key>id</key> + <value>channels_channel_model_0</value> </param> <param> - <key>rate</key> - <value>10</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>nconnections</key> - <value>1</value> + <key>noise_voltage</key> + <value>noise</value> </param> <param> - <key>gui_hint</key> - <value>notebook@1</value> + <key>freq_offset</key> + <value>freq_off</value> + </param> + <param> + <key>epsilon</key> + <value>1.0</value> + </param> + <param> + <key>taps</key> + <value>1.0 + 1.0j</value> + </param> + <param> + <key>seed</key> + <value>0</value> </param> <param> <key>_coordinate</key> - <value>(810, 65)</value> + <value>(494, 263)</value> </param> <param> <key>_rotation</key> @@ -516,26 +544,26 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>digital_dxpsk_mod_0</source_block_id> - <sink_block_id>channel_model_0</sink_block_id> + <source_block_id>blocks_throttle_0</source_block_id> + <sink_block_id>qtgui_freq_sink_x_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>channel_model_0</source_block_id> - <sink_block_id>blocks_throttle_0</sink_block_id> + <source_block_id>blocks_throttle_0</source_block_id> + <sink_block_id>qtgui_const_sink_x_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blocks_throttle_0</source_block_id> - <sink_block_id>qtgui_freq_sink_x_0</sink_block_id> + <source_block_id>digital_dxpsk_mod_0</source_block_id> + <sink_block_id>channels_channel_model_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blocks_throttle_0</source_block_id> - <sink_block_id>qtgui_const_sink_x_0</sink_block_id> + <source_block_id>channels_channel_model_0</source_block_id> + <sink_block_id>blocks_throttle_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> diff --git a/gr-digital/examples/demod/pam_sync.grc b/gr-digital/examples/demod/pam_sync.grc index 4785482e3f..693b112088 100644 --- a/gr-digital/examples/demod/pam_sync.grc +++ b/gr-digital/examples/demod/pam_sync.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Tue Jan 15 15:21:49 2013</timestamp> + <timestamp>Sun Mar 17 21:08:58 2013</timestamp> <block> <key>options</key> <param> diff --git a/gr-digital/examples/example_costas.py b/gr-digital/examples/example_costas.py index ec33727799..dbb5e42cdf 100755 --- a/gr-digital/examples/example_costas.py +++ b/gr-digital/examples/example_costas.py @@ -22,6 +22,7 @@ from gnuradio import gr, digital, filter from gnuradio import blocks +from gnuradio import channels from gnuradio import eng_notation from gnuradio.eng_option import eng_option from optparse import OptionParser @@ -50,7 +51,7 @@ class example_costas(gr.top_block): self.src = blocks.vector_source_c(data.tolist(), False) self.rrc = filter.interp_fir_filter_ccf(sps, rrc_taps) - self.chn = filter.channel_model(noise, foffset, toffset) + self.chn = channels.channel_model(noise, foffset, toffset) self.cst = digital.costas_loop_cc(bw, 2) self.vsnk_src = blocks.vector_sink_c() diff --git a/gr-digital/examples/example_fll.py b/gr-digital/examples/example_fll.py index 8d52ec4be6..4fb12f5aae 100755 --- a/gr-digital/examples/example_fll.py +++ b/gr-digital/examples/example_fll.py @@ -22,6 +22,7 @@ from gnuradio import gr, digital, filter from gnuradio import blocks +from gnuradio import channels from gnuradio import eng_notation from gnuradio.eng_option import eng_option from optparse import OptionParser @@ -50,7 +51,7 @@ class example_fll(gr.top_block): self.src = blocks.vector_source_c(data.tolist(), False) self.rrc = filter.interp_fir_filter_ccf(sps, rrc_taps) - self.chn = filter.channel_model(noise, foffset, toffset) + self.chn = channels.channel_model(noise, foffset, toffset) self.fll = digital.fll_band_edge_cc(sps, rolloff, ntaps, bw) self.vsnk_src = blocks.vector_sink_c() diff --git a/gr-digital/examples/example_timing.py b/gr-digital/examples/example_timing.py index 5f5b458497..73a05b05dc 100755 --- a/gr-digital/examples/example_timing.py +++ b/gr-digital/examples/example_timing.py @@ -22,6 +22,7 @@ from gnuradio import gr, digital, filter from gnuradio import blocks +from gnuradio import channels from gnuradio import eng_notation from gnuradio.eng_option import eng_option from optparse import OptionParser @@ -58,7 +59,7 @@ class example_timing(gr.top_block): self.src = blocks.vector_source_c(data.tolist(), False) self.rrc = filter.interp_fir_filter_ccf(sps, rrc_taps) - self.chn = filter.channel_model(noise, foffset, toffset) + self.chn = channels.channel_model(noise, foffset, toffset) self.off = filter.fractional_interpolator_cc(0.20, 1.0) if mode == 0: diff --git a/gr-digital/examples/snr_estimators.py b/gr-digital/examples/snr_estimators.py index 73ae538865..9eae7865e5 100755 --- a/gr-digital/examples/snr_estimators.py +++ b/gr-digital/examples/snr_estimators.py @@ -37,6 +37,7 @@ except ImportError: from gnuradio import gr, digital, filter from gnuradio import blocks +from gnuradio import channels from optparse import OptionParser from gnuradio.eng_option import eng_option @@ -168,7 +169,7 @@ def main(): gr_src = blocks.vector_source_c(bits.tolist(), False) gr_snr = digital.mpsk_snr_est_cc(gr_est, ntag, 0.001) - gr_chn = filter.channel_model(1.0/scale) + gr_chn = channels.channel_model(1.0/scale) gr_snk = blocks.null_sink(gr.sizeof_gr_complex) tb = gr.top_block() tb.connect(gr_src, gr_chn, gr_snr, gr_snk) diff --git a/gr-digital/python/gfsk.py b/gr-digital/python/gfsk.py index 54c94b88fd..6ba007ca0f 100644 --- a/gr-digital/python/gfsk.py +++ b/gr-digital/python/gfsk.py @@ -116,7 +116,7 @@ class gfsk_mod(gr.hier_block2): self.gaussian_filter = filter.interp_fir_filter_fff(samples_per_symbol, self.taps) # FM modulation - self.fmmod = frequency.frequency_modulator_fc(sensitivity) + self.fmmod = analog.frequency_modulator_fc(sensitivity) # small amount of output attenuation to prevent clipping USRP sink self.amp = blocks.multiply_const_cc(0.999) diff --git a/gr-digital/swig/digital_swig.i b/gr-digital/swig/digital_swig.i index 4b41b251a1..494bb2f682 100644 --- a/gr-digital/swig/digital_swig.i +++ b/gr-digital/swig/digital_swig.i @@ -21,6 +21,7 @@ #define DIGITAL_API #define ANALOG_API +#define BLOCKS_API %include "gnuradio.i" %include "stdint.i" @@ -33,6 +34,7 @@ %{ #include <blocks/control_loop.h> %} +%include <blocks/control_loop.h> // Used in the constellation objects %template(unsigned_int_vector) std::vector<unsigned int>; diff --git a/gr-filter/examples/benchmark_filters.py b/gr-filter/examples/benchmark_filters.py index 011147190b..ffc869db73 100755 --- a/gr-filter/examples/benchmark_filters.py +++ b/gr-filter/examples/benchmark_filters.py @@ -67,9 +67,9 @@ def main(): block_size = options.block_size dec = options.decimation - benchmark("filter.fir_filter_ccc", gr.fir_filter_ccc, + benchmark("filter.fir_filter_ccc", filter.fir_filter_ccc, dec, ntaps, total_input_size, block_size) - benchmark("filter.fft_filter_ccc", gr.fft_filter_ccc, + benchmark("filter.fft_filter_ccc", filter.fft_filter_ccc, dec, ntaps, total_input_size, block_size) if __name__ == '__main__': diff --git a/gr-filter/include/filter/pfb_channelizer_ccf.h b/gr-filter/include/filter/pfb_channelizer_ccf.h index 07e0c96387..825532a699 100644 --- a/gr-filter/include/filter/pfb_channelizer_ccf.h +++ b/gr-filter/include/filter/pfb_channelizer_ccf.h @@ -52,14 +52,15 @@ namespace gr { * filters in the filterbank are filled out with 0's to make sure each * filter has the same number of taps. * - * Each filter operates using the gr_fir filter classs of GNU Radio, - * which takes the input stream at <EM>i</EM> and performs the inner - * product calculation to <EM>i+(n-1)</EM> where <EM>n</EM> is the - * number of filter taps. To efficiently handle this in the GNU Radio - * structure, each filter input must come from its own input - * stream. So the channelizer must be provided with <EM>M</EM> streams - * where the input stream has been deinterleaved. This is most easily - * done using the gr::blocks::stream_to_streams block. + * Each filter operates using the gr::blocks::fir_filter_XXX + * classs of GNU Radio, which takes the input stream at <EM>i</EM> + * and performs the inner product calculation to <EM>i+(n-1)</EM> + * where <EM>n</EM> is the number of filter taps. To efficiently + * handle this in the GNU Radio structure, each filter input must + * come from its own input stream. So the channelizer must be + * provided with <EM>M</EM> streams where the input stream has + * been deinterleaved. This is most easily done using the + * gr::blocks::stream_to_streams block. * * The output is then produced as a vector, where index <EM>i</EM> * in the vector is the next sample from the <EM>i</EM>th diff --git a/gr-filter/include/filter/polyphase_filterbank.h b/gr-filter/include/filter/polyphase_filterbank.h index cd4ee4db99..500d1c9b8f 100644 --- a/gr-filter/include/filter/polyphase_filterbank.h +++ b/gr-filter/include/filter/polyphase_filterbank.h @@ -55,15 +55,15 @@ namespace gr { * are filled out with 0's to make sure each filter has the same * number of taps. * - * Each filter operates using the gr_fir filter classs of GNU - * Radio, which takes the input stream at <EM>i</EM> and - * performs the inner product calculation to <EM>i+(n-1)</EM> - * where <EM>n</EM> is the number of filter taps. To efficiently - * handle this in the GNU Radio structure, each filter input - * must come from its own input stream. So the channelizer must - * be provided with <EM>M</EM> streams where the input stream - * has been deinterleaved. This is most easily done using the - * gr::blocks::stream_to_streams block. + * Each filter operates using the gr::filter::fir_filter_XXX + * classs of GNU Radio, which takes the input stream at + * <EM>i</EM> and performs the inner product calculation to + * <EM>i+(n-1)</EM> where <EM>n</EM> is the number of filter + * taps. To efficiently handle this in the GNU Radio structure, + * each filter input must come from its own input stream. So the + * channelizer must be provided with <EM>M</EM> streams where + * the input stream has been deinterleaved. This is most easily + * done using the gr::blocks::stream_to_streams block. * * The output is then produced as a vector, where index * <EM>i</EM> in the vector is the next sample from the diff --git a/gr-filter/python/qa_fir_filter.py b/gr-filter/python/qa_fir_filter.py index 0b44f1cac4..64e60ab295 100755 --- a/gr-filter/python/qa_fir_filter.py +++ b/gr-filter/python/qa_fir_filter.py @@ -185,7 +185,7 @@ class test_filter(gr_unittest.TestCase): def test_fir_filter_ccc_002(self): src_data = 10*[1+1j, 2+2j, 3+3j, 4+4j] - # results derived from original gr.fir_filter_ccc + # results derived from original filter.fir_filter_ccc expected_data = ((7.537424837948042e-20+7.537424837948042e-20j), (9.131923434324563e-05+9.131923434324563e-05j), (0.0003317668742965907+0.0003317668742965907j), (0.0007230418268591166+0.0007230418268591166j), (0.0012087896466255188+0.0012087896466255188j), (0.0013292605290189385+0.0013292605290189385j), (0.001120875240303576+0.001120875240303576j), (0.000744672492146492+0.000744672492146492j), (0.000429437990533188+0.000429437990533188j), (2.283908543176949e-05+2.283908543176949e-05j), (-0.0002245186478830874-0.0002245186478830874j), (-0.0001157080550910905-0.0001157080550910905j), (0.00041409023106098175+0.00041409023106098175j), (0.0009017843985930085+0.0009017843985930085j), (0.0012520025484263897+0.0012520025484263897j), (0.0014116164529696107+0.0014116164529696107j), (0.001393353333696723+0.001393353333696723j), (0.000912194955162704+0.000912194955162704j), (0.00022649182938039303+0.00022649182938039303j), (-0.00031363096786662936-0.00031363096786662936j), (-0.0003966730728279799-0.0003966730728279799j), (-0.00023757052258588374-0.00023757052258588374j), (0.00021952332463115454+0.00021952332463115454j), (0.0009092430118471384+0.0009092430118471384j), (0.001662317430600524+0.001662317430600524j), (0.0019024648936465383+0.0019024648936465383j), (0.0015955769922584295+0.0015955769922584295j), (0.0009144138311967254+0.0009144138311967254j), (0.0001872836146503687+0.0001872836146503687j), (-0.000581968342885375-0.000581968342885375j), (-0.0009886166080832481-0.0009886166080832481j), (-0.0007480768254026771-0.0007480768254026771j), (0.00018211957649327815+0.00018211957649327815j), (0.0012042406015098095+0.0012042406015098095j), (0.0020200139842927456+0.0020200139842927456j), (0.0023816542234271765+0.0023816542234271765j), (0.002195809967815876+0.002195809967815876j), (0.0012113333214074373+0.0012113333214074373j), (-0.00014088614261709154-0.00014088614261709154j), (-0.0012574587017297745-0.0012574587017297745j)) taps = filter.firdes.low_pass(1, 1, 0.1, 0.01) diff --git a/gr-filter/python/rational_resampler.py b/gr-filter/python/rational_resampler.py index 97df283e67..8f1dc36e0d 100644 --- a/gr-filter/python/rational_resampler.py +++ b/gr-filter/python/rational_resampler.py @@ -20,6 +20,7 @@ # from gnuradio import gr, gru +import filter_swig as filter _plot = None diff --git a/gr-trellis/doc/gr-trellis.xml b/gr-trellis/doc/gr-trellis.xml index a835a2543a..335c77a39f 100644 --- a/gr-trellis/doc/gr-trellis.xml +++ b/gr-trellis/doc/gr-trellis.xml @@ -813,7 +813,7 @@ The modulated symbols are filtered by the ISI channel and AWGN with appropriate </para> <programlisting> 28 # CHANNEL - 29 isi = gr.fir_filter_fff(1,channel) + 29 isi = filter.fir_filter_fff(1,channel) 30 add = blocks.add_ff() 31 noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) </programlisting> |