diff options
author | jblum | 2009-05-19 23:56:09 +0000 |
---|---|---|
committer | jblum | 2009-05-19 23:56:09 +0000 |
commit | b086f7337f144a48296bdfd9e2a09ad9979e7bdd (patch) | |
tree | 7c69e7d917c2b49c13c8cb6efc5b4163ca923828 /grc/examples | |
parent | 4f41891176b8be25a2b6efe2cb888802347112cc (diff) | |
download | gnuradio-b086f7337f144a48296bdfd9e2a09ad9979e7bdd.tar.gz gnuradio-b086f7337f144a48296bdfd9e2a09ad9979e7bdd.tar.bz2 gnuradio-b086f7337f144a48296bdfd9e2a09ad9979e7bdd.zip |
Re-implemented variable sink so that it can pass vector-aligned samples.
Created backend grc blks2 block to sample the stream and set callback.
Renamed variable sink and moved it into the sinks category.
Added example of variable sink reading taps from a stream and setting them to a FIR filter.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11062 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/examples')
-rw-r--r-- | grc/examples/Makefile.am | 3 | ||||
-rw-r--r-- | grc/examples/simple/var_sink_taps.grc | 488 |
2 files changed, 490 insertions, 1 deletions
diff --git a/grc/examples/Makefile.am b/grc/examples/Makefile.am index 9a2fbd53d..95f352a64 100644 --- a/grc/examples/Makefile.am +++ b/grc/examples/Makefile.am @@ -30,7 +30,8 @@ dist_audiodata_DATA = \ simpledatadir = $(grc_examples_prefix)/simple dist_simpledata_DATA = \ simple/ber_simulation.grc \ - simple/dpsk_loopback.grc + simple/dpsk_loopback.grc \ + simple/var_sink_taps.grc trellisdatadir = $(grc_examples_prefix)/trellis dist_trellisdata_DATA = \ diff --git a/grc/examples/simple/var_sink_taps.grc b/grc/examples/simple/var_sink_taps.grc new file mode 100644 index 000000000..07207850e --- /dev/null +++ b/grc/examples/simple/var_sink_taps.grc @@ -0,0 +1,488 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Tue May 19 16:45:51 2009</timestamp> + <block> + <key>options</key> + <param> + <key>id</key> + <value>var_sink_taps</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>Variable Sink + Taps</value> + </param> + <param> + <key>author</key> + <value>Example</value> + </param> + <param> + <key>description</key> + <value>gnuradio flow graph</value> + </param> + <param> + <key>window_size</key> + <value>1280, 1024</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_noise_source_x</key> + <param> + <key>id</key> + <value>gr_noise_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>noise_type</key> + <value>gr.GR_GAUSSIAN</value> + </param> + <param> + <key>amp</key> + <value>1</value> + </param> + <param> + <key>seed</key> + <value>42</value> + </param> + <param> + <key>_coordinate</key> + <value>(619, 36)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_fir_filter_xxx</key> + <param> + <key>id</key> + <value>gr_fir_filter_xxx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>ccc</value> + </param> + <param> + <key>decim</key> + <value>1</value> + </param> + <param> + <key>taps</key> + <value>dest_taps</value> + </param> + <param> + <key>_coordinate</key> + <value>(831, 47)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_throttle</key> + <param> + <key>id</key> + <value>gr_throttle_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>samples_per_second</key> + <value>samp_rate</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(999, 198)</value> + </param> + <param> + <key>_rotation</key> + <value>270</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>wxgui_fftsink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>FFT Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>0</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>50</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(629, 184)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <block> + <key>import</key> + <param> + <key>id</key> + <value>import_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>import</key> + <value>from gnuradio.gr import firdes</value> + </param> + <param> + <key>_coordinate</key> + <value>(330, 120)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>dest_taps</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>[0]</value> + </param> + <param> + <key>_coordinate</key> + <value>(836, 223)</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>32000</value> + </param> + <param> + <key>_coordinate</key> + <value>(831, 130)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>source_taps</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>firdes.low_pass(1, samp_rate, 4000, 2000)</value> + </param> + <param> + <key>_coordinate</key> + <value>(397, 191)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>taps_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>10</value> + </param> + <param> + <key>_coordinate</key> + <value>(268, 189)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_vector_source_x</key> + <param> + <key>id</key> + <value>gr_vector_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>vector</key> + <value>source_taps</value> + </param> + <param> + <key>repeat</key> + <value>True</value> + </param> + <param> + <key>vlen</key> + <value>len(source_taps)</value> + </param> + <param> + <key>_coordinate</key> + <value>(205, 33)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>note</key> + <param> + <key>id</key> + <value>note_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>note</key> + <value>Pass the FIR taps via a variable sink.</value> + </param> + <param> + <key>_coordinate</key> + <value>(14, 141)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_throttle</key> + <param> + <key>id</key> + <value>gr_throttle</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>samples_per_second</key> + <value>taps_rate</value> + </param> + <param> + <key>vlen</key> + <value>len(source_taps)</value> + </param> + <param> + <key>_coordinate</key> + <value>(440, 41)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>blks2_variable_sink_x</key> + <param> + <key>id</key> + <value>blks2_variable_sink_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>variable</key> + <value>dest_taps</value> + </param> + <param> + <key>decim</key> + <value>1</value> + </param> + <param> + <key>vlen</key> + <value>len(source_taps)</value> + </param> + <param> + <key>_coordinate</key> + <value>(305, 283)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <connection> + <source_block_id>gr_noise_source_x_0</source_block_id> + <sink_block_id>gr_fir_filter_xxx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_fir_filter_xxx_0</source_block_id> + <sink_block_id>gr_throttle_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>wxgui_fftsink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_vector_source_x_0</source_block_id> + <sink_block_id>gr_throttle</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_throttle</source_block_id> + <sink_block_id>blks2_variable_sink_x_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> +</flow_graph> |