summaryrefslogtreecommitdiff
path: root/gr-digital
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-03-17 21:31:47 -0400
committerTom Rondeau <trondeau@vt.edu>2013-03-17 21:31:47 -0400
commitcabdafcb55423b54b63b711c942d4438b6af1a65 (patch)
tree4130dbe4ef3f3814baad5e6d7a6f65c19add0657 /gr-digital
parent35e94fb8f4f3ead626f6ed28385148475773afc7 (diff)
cleaning up, converting examples, etc.
Diffstat (limited to 'gr-digital')
-rw-r--r--gr-digital/CMakeLists.txt8
-rw-r--r--gr-digital/examples/demod/mpsk_demod.grc228
-rw-r--r--gr-digital/examples/demod/pam_sync.grc2
-rwxr-xr-xgr-digital/examples/example_costas.py3
-rwxr-xr-xgr-digital/examples/example_fll.py3
-rwxr-xr-xgr-digital/examples/example_timing.py3
-rwxr-xr-xgr-digital/examples/snr_estimators.py3
-rw-r--r--gr-digital/python/gfsk.py2
-rw-r--r--gr-digital/swig/digital_swig.i2
9 files changed, 144 insertions, 110 deletions
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>;