summaryrefslogtreecommitdiff
path: root/gr-analog
diff options
context:
space:
mode:
authorBen Reynwar <ben@reynwar.net>2013-04-02 23:04:08 -0700
committerBen Reynwar <ben@reynwar.net>2013-04-02 23:04:08 -0700
commitc6dbde23b256a41b3d92cb4ad6b63287095d53c7 (patch)
tree71db12ea2e1667770c22568dcdf5e0857d5f1e59 /gr-analog
parent22b70d0889ef3c51e27a31ee18d153093a55cbb8 (diff)
parent98758cbfa9a2aff714952d19e773bc370dfa2185 (diff)
Merged next into uninstalled import branch.
Diffstat (limited to 'gr-analog')
-rw-r--r--gr-analog/CMakeLists.txt2
-rwxr-xr-xgr-analog/examples/fmtest.py11
-rwxr-xr-xgr-analog/examples/tags/uhd_burst_detector.py6
-rw-r--r--gr-analog/gnuradio-analog.pc.in2
-rw-r--r--gr-analog/grc/analog_am_demod_cf.xml47
-rw-r--r--gr-analog/grc/analog_block_tree.xml9
-rw-r--r--gr-analog/grc/analog_fm_deemph.xml31
-rw-r--r--gr-analog/grc/analog_fm_demod_cf.xml68
-rw-r--r--gr-analog/grc/analog_fm_preemph.xml31
-rw-r--r--gr-analog/grc/analog_nbfm_rx.xml48
-rw-r--r--gr-analog/grc/analog_nbfm_tx.xml48
-rw-r--r--gr-analog/grc/analog_wfm_rcv.xml33
-rw-r--r--gr-analog/grc/analog_wfm_rcv_pll.xml37
-rw-r--r--gr-analog/grc/analog_wfm_tx.xml48
-rw-r--r--gr-analog/include/analog/CMakeLists.txt4
-rw-r--r--gr-analog/include/analog/agc.h16
-rw-r--r--gr-analog/include/analog/agc2.h18
-rw-r--r--gr-analog/include/analog/agc2_cc.h12
-rw-r--r--gr-analog/include/analog/agc2_ff.h12
-rw-r--r--gr-analog/include/analog/agc_cc.h8
-rw-r--r--gr-analog/include/analog/agc_ff.h8
-rw-r--r--gr-analog/include/analog/api.h2
-rw-r--r--gr-analog/include/analog/cpm.h37
-rw-r--r--gr-analog/include/analog/ctcss_squelch_ff.h10
-rw-r--r--gr-analog/include/analog/feedforward_agc_cc.h11
-rw-r--r--gr-analog/include/analog/frequency_modulator_fc.h5
-rw-r--r--gr-analog/include/analog/pll_carriertracking_cc.h5
-rw-r--r--gr-analog/include/analog/pll_freqdet_cf.h5
-rw-r--r--gr-analog/include/analog/pll_refout_cc.h5
-rw-r--r--gr-analog/include/analog/pwr_squelch_cc.h5
-rw-r--r--gr-analog/include/analog/pwr_squelch_ff.h5
-rw-r--r--gr-analog/include/analog/quadrature_demod_cf.h6
-rw-r--r--gr-analog/include/analog/rail_ff.h6
-rw-r--r--gr-analog/include/analog/sincos.h38
-rw-r--r--gr-analog/lib/CMakeLists.txt20
-rw-r--r--gr-analog/lib/fastnoise_source_X_impl.cc.t6
-rw-r--r--gr-analog/lib/noise_source_X_impl.cc.t6
-rw-r--r--gr-analog/lib/pll_carriertracking_cc_impl.cc36
-rw-r--r--gr-analog/lib/pll_carriertracking_cc_impl.h4
-rw-r--r--gr-analog/lib/pll_freqdet_cf_impl.cc34
-rw-r--r--gr-analog/lib/pll_freqdet_cf_impl.h4
-rw-r--r--gr-analog/lib/pll_refout_cc_impl.cc36
-rw-r--r--gr-analog/lib/pll_refout_cc_impl.h4
-rw-r--r--gr-analog/lib/qa_analog.cc4
-rw-r--r--gr-analog/lib/qa_analog.h2
-rw-r--r--gr-analog/lib/qa_sincos.cc75
-rw-r--r--gr-analog/lib/qa_sincos.h47
-rw-r--r--gr-analog/lib/sincos.cc89
-rw-r--r--gr-analog/lib/test_gr_analog.cc4
-rw-r--r--gr-analog/python/analog/CMakeLists.txt1
-rwxr-xr-xgr-analog/python/analog/qa_agc.py60
-rwxr-xr-xgr-analog/python/analog/qa_cpfsk.py8
-rwxr-xr-xgr-analog/python/analog/qa_ctcss_squelch.py12
-rwxr-xr-xgr-analog/python/analog/qa_dpll.py10
-rwxr-xr-xgr-analog/python/analog/qa_fmdet.py10
-rwxr-xr-xgr-analog/python/analog/qa_frequency_modulator.py8
-rwxr-xr-xgr-analog/python/analog/qa_phase_modulator.py8
-rwxr-xr-xgr-analog/python/analog/qa_pll_carriertracking.py8
-rwxr-xr-xgr-analog/python/analog/qa_pll_freqdet.py8
-rwxr-xr-xgr-analog/python/analog/qa_pll_refout.py8
-rwxr-xr-xgr-analog/python/analog/qa_probe_avg_mag_sqrd.py12
-rwxr-xr-xgr-analog/python/analog/qa_pwr_squelch.py12
-rwxr-xr-xgr-analog/python/analog/qa_quadrature_demod.py8
-rwxr-xr-xgr-analog/python/analog/qa_rail_ff.py8
-rwxr-xr-xgr-analog/python/analog/qa_sig_source.py44
-rwxr-xr-xgr-analog/python/analog/qa_simple_squelch.py8
-rw-r--r--gr-analog/python/analog/wfm_rcv_fmdet.py4
-rw-r--r--gr-analog/python/analog/wfm_rcv_pll.py4
-rw-r--r--gr-analog/swig/CMakeLists.txt7
-rw-r--r--gr-analog/swig/analog_swig.i10
70 files changed, 752 insertions, 516 deletions
diff --git a/gr-analog/CMakeLists.txt b/gr-analog/CMakeLists.txt
index c6de0697db..2143447022 100644
--- a/gr-analog/CMakeLists.txt
+++ b/gr-analog/CMakeLists.txt
@@ -29,7 +29,7 @@ include(GrComponent)
GR_REGISTER_COMPONENT("gr-analog" ENABLE_GR_ANALOG
Boost_FOUND
ENABLE_VOLK
- ENABLE_GR_CORE
+ ENABLE_GNURADIO_RUNTIME
ENABLE_GR_FFT
ENABLE_GR_FILTER
)
diff --git a/gr-analog/examples/fmtest.py b/gr-analog/examples/fmtest.py
index 294fa0d425..327da8eacb 100755
--- a/gr-analog/examples/fmtest.py
+++ b/gr-analog/examples/fmtest.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2009,2012 Free Software Foundation, Inc.
+# Copyright 2009,2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -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:
@@ -84,9 +85,9 @@ class fmtest(gr.top_block):
self.connect(sig, fm)
self.connect(fm, (self.sum, n))
- self.head = gr.head(gr.sizeof_gr_complex, self._nsamples)
- self.snk_tx = gr.vector_sink_c()
- self.channel = filter.channel_model(0.1)
+ self.head = blocks.head(gr.sizeof_gr_complex, self._nsamples)
+ self.snk_tx = blocks.vector_sink_c()
+ self.channel = channels.channel_model(0.1)
self.connect(self.sum, self.head, self.channel, self.snk_tx)
@@ -116,7 +117,7 @@ class fmtest(gr.top_block):
for i in xrange(self._M):
self.fmdet.append(analog.nbfm_rx(self._audio_rate, self._chan_rate))
self.squelch.append(analog.standard_squelch(self._audio_rate*10))
- self.snks.append(gr.vector_sink_f())
+ self.snks.append(blocks.vector_sink_f())
self.connect((self.pfb, i), self.fmdet[i], self.squelch[i], self.snks[i])
def num_tx_channels(self):
diff --git a/gr-analog/examples/tags/uhd_burst_detector.py b/gr-analog/examples/tags/uhd_burst_detector.py
index 6e73e8ad1e..b1bb15b974 100755
--- a/gr-analog/examples/tags/uhd_burst_detector.py
+++ b/gr-analog/examples/tags/uhd_burst_detector.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -55,7 +55,7 @@ class uhd_burst_detector(gr.top_block):
# Dummy signaler to collect a burst on known periods
data = 1000*[0,] + 1000*[1,]
- self.signal = gr.vector_source_s(data, True)
+ self.signal = blocks.vector_source_s(data, True)
# Energy detector to get signal burst
## use squelch to detect energy
@@ -70,7 +70,7 @@ class uhd_burst_detector(gr.top_block):
self.f2s = blocks.float_to_short()
# Use file sink burst tagger to capture bursts
- self.fsnk = gr.tagged_file_sink(gr.sizeof_gr_complex, self.samp_rate)
+ self.fsnk = blocks.tagged_file_sink(gr.sizeof_gr_complex, self.samp_rate)
##################################################
diff --git a/gr-analog/gnuradio-analog.pc.in b/gr-analog/gnuradio-analog.pc.in
index 675c7ee20a..2461fc3fdd 100644
--- a/gr-analog/gnuradio-analog.pc.in
+++ b/gr-analog/gnuradio-analog.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
Name: gnuradio-analog
Description: GNU Radio blocks for analog communications
-Requires: gnuradio-core
+Requires: gnuradio-runtime
Version: @LIBVER@
Libs: -L${libdir} -lgnuradio-analog
Cflags: -I${includedir}
diff --git a/gr-analog/grc/analog_am_demod_cf.xml b/gr-analog/grc/analog_am_demod_cf.xml
new file mode 100644
index 0000000000..b066882bda
--- /dev/null
+++ b/gr-analog/grc/analog_am_demod_cf.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##AM Demod
+###################################################
+ -->
+<block>
+ <name>AM Demod</name>
+ <key>analog_am_demod_cf</key>
+ <import>from gnuradio import analog</import>
+ <make>analog.am_demod_cf(
+ channel_rate=$chan_rate,
+ audio_decim=$audio_decim,
+ audio_pass=$audio_pass,
+ audio_stop=$audio_stop,
+)</make>
+ <param>
+ <name>Channel Rate</name>
+ <key>chan_rate</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Audio Decimation</name>
+ <key>audio_decim</key>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Audio Pass</name>
+ <key>audio_pass</key>
+ <value>5000</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Audio Stop</name>
+ <key>audio_stop</key>
+ <value>5500</value>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>float</type>
+ </source>
+</block>
diff --git a/gr-analog/grc/analog_block_tree.xml b/gr-analog/grc/analog_block_tree.xml
index 5d2ab6512b..0a01d38cd8 100644
--- a/gr-analog/grc/analog_block_tree.xml
+++ b/gr-analog/grc/analog_block_tree.xml
@@ -46,6 +46,15 @@
<block>analog_frequency_modulator_fc</block>
<block>analog_phase_modulator_fc</block>
<block>analog_quadrature_demod_cf</block>
+ <block>analog_nbfm_tx</block>
+ <block>analog_nbfm_rx</block>
+ <block>analog_wfm_tx</block>
+ <block>analog_wfm_rcv</block>
+ <block>analog_wfm_rcv_pll</block>
+ <block>analog_am_demod_cf</block>
+ <block>analog_fm_demod_cf</block>
+ <block>analog_fm_deemph</block>
+ <block>analog_fm_preemph</block>
</cat>
<cat>
<name>Sources</name>
diff --git a/gr-analog/grc/analog_fm_deemph.xml b/gr-analog/grc/analog_fm_deemph.xml
new file mode 100644
index 0000000000..0fcb5a87d4
--- /dev/null
+++ b/gr-analog/grc/analog_fm_deemph.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##FM Deemphasis
+###################################################
+ -->
+<block>
+ <name>FM Deemphasis</name>
+ <key>analog_fm_deemph</key>
+ <import>from gnuradio import analog</import>
+ <make>analog.fm_deemph(fs=$samp_rate, tau=$tau)</make>
+ <param>
+ <name>Sample Rate</name>
+ <key>samp_rate</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Tau</name>
+ <key>tau</key>
+ <value>75e-6</value>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>float</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>float</type>
+ </source>
+</block>
diff --git a/gr-analog/grc/analog_fm_demod_cf.xml b/gr-analog/grc/analog_fm_demod_cf.xml
new file mode 100644
index 0000000000..c903ddfc73
--- /dev/null
+++ b/gr-analog/grc/analog_fm_demod_cf.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##FM Demod
+###################################################
+ -->
+<block>
+ <name>FM Demod</name>
+ <key>analog_fm_demod_cf</key>
+ <import>from gnuradio import analog</import>
+ <make>analog.fm_demod_cf(
+ channel_rate=$chan_rate,
+ audio_decim=$audio_decim,
+ deviation=$deviation,
+ audio_pass=$audio_pass,
+ audio_stop=$audio_stop,
+ gain=$gain,
+ tau=$tau,
+)</make>
+ <param>
+ <name>Channel Rate</name>
+ <key>chan_rate</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Audio Decimation</name>
+ <key>audio_decim</key>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Deviation</name>
+ <key>deviation</key>
+ <value>75000</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Audio Pass</name>
+ <key>audio_pass</key>
+ <value>15000</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Audio Stop</name>
+ <key>audio_stop</key>
+ <value>16000</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Gain</name>
+ <key>gain</key>
+ <value>1.0</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Tau</name>
+ <key>tau</key>
+ <value>75e-6</value>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>float</type>
+ </source>
+</block>
diff --git a/gr-analog/grc/analog_fm_preemph.xml b/gr-analog/grc/analog_fm_preemph.xml
new file mode 100644
index 0000000000..fb898b87f3
--- /dev/null
+++ b/gr-analog/grc/analog_fm_preemph.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##FM Preemphasis
+###################################################
+ -->
+<block>
+ <name>FM Preemphasis</name>
+ <key>analog_fm_preemph</key>
+ <import>from gnuradio import analog</import>
+ <make>analog.fm_preemph(fs=$samp_rate, tau=$tau)</make>
+ <param>
+ <name>Sample Rate</name>
+ <key>samp_rate</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Tau</name>
+ <key>tau</key>
+ <value>75e-6</value>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>float</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>float</type>
+ </source>
+</block>
diff --git a/gr-analog/grc/analog_nbfm_rx.xml b/gr-analog/grc/analog_nbfm_rx.xml
new file mode 100644
index 0000000000..cc690c7b6b
--- /dev/null
+++ b/gr-analog/grc/analog_nbfm_rx.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##NBFM Receive
+###################################################
+ -->
+<block>
+ <name>NBFM Receive</name>
+ <key>analog_nbfm_rx</key>
+ <import>from gnuradio import analog</import>
+ <make>analog.nbfm_rx(
+ audio_rate=$audio_rate,
+ quad_rate=$quad_rate,
+ tau=$tau,
+ max_dev=$max_dev,
+)</make>
+ <param>
+ <name>Audio Rate</name>
+ <key>audio_rate</key>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Quadrature Rate</name>
+ <key>quad_rate</key>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Tau</name>
+ <key>tau</key>
+ <value>75e-6</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Max Deviation</name>
+ <key>max_dev</key>
+ <value>5e3</value>
+ <type>real</type>
+ </param>
+ <check>$quad_rate%$audio_rate == 0</check>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>float</type>
+ </source>
+</block>
diff --git a/gr-analog/grc/analog_nbfm_tx.xml b/gr-analog/grc/analog_nbfm_tx.xml
new file mode 100644
index 0000000000..b3d3451cf7
--- /dev/null
+++ b/gr-analog/grc/analog_nbfm_tx.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##NBFM Transmit
+###################################################
+ -->
+<block>
+ <name>NBFM Transmit</name>
+ <key>analog_nbfm_tx</key>
+ <import>from gnuradio import analog</import>
+ <make>analog.nbfm_tx(
+ audio_rate=$audio_rate,
+ quad_rate=$quad_rate,
+ tau=$tau,
+ max_dev=$max_dev,
+)</make>
+ <param>
+ <name>Audio Rate</name>
+ <key>audio_rate</key>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Quadrature Rate</name>
+ <key>quad_rate</key>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Tau</name>
+ <key>tau</key>
+ <value>75e-6</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Max Deviation</name>
+ <key>max_dev</key>
+ <value>5e3</value>
+ <type>real</type>
+ </param>
+ <check>$quad_rate%$audio_rate == 0</check>
+ <sink>
+ <name>in</name>
+ <type>float</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-analog/grc/analog_wfm_rcv.xml b/gr-analog/grc/analog_wfm_rcv.xml
new file mode 100644
index 0000000000..ce2abb92de
--- /dev/null
+++ b/gr-analog/grc/analog_wfm_rcv.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##WBFM Receive
+###################################################
+ -->
+<block>
+ <name>WBFM Receive</name>
+ <key>analog_wfm_rcv</key>
+ <import>from gnuradio import analog</import>
+ <make>analog.wfm_rcv(
+ quad_rate=$quad_rate,
+ audio_decimation=$audio_decimation,
+)</make>
+ <param>
+ <name>Quadrature Rate</name>
+ <key>quad_rate</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Audio Decimation</name>
+ <key>audio_decimation</key>
+ <type>int</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>float</type>
+ </source>
+</block>
diff --git a/gr-analog/grc/analog_wfm_rcv_pll.xml b/gr-analog/grc/analog_wfm_rcv_pll.xml
new file mode 100644
index 0000000000..db31ed9bee
--- /dev/null
+++ b/gr-analog/grc/analog_wfm_rcv_pll.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##WBFM Receive PLL
+###################################################
+ -->
+<block>
+ <name>WBFM Receive PLL</name>
+ <key>analog_wfm_rcv_pll</key>
+ <import>from gnuradio import analog</import>
+ <make>analog.wfm_rcv_pll(
+ demod_rate=$quad_rate,
+ audio_decimation=$audio_decimation,
+)</make>
+ <param>
+ <name>Quadrature Rate</name>
+ <key>quad_rate</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Audio Decimation</name>
+ <key>audio_decimation</key>
+ <type>int</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>Lout</name>
+ <type>float</type>
+ </source>
+ <source>
+ <name>Rout</name>
+ <type>float</type>
+ </source>
+</block>
diff --git a/gr-analog/grc/analog_wfm_tx.xml b/gr-analog/grc/analog_wfm_tx.xml
new file mode 100644
index 0000000000..0e00f05fb2
--- /dev/null
+++ b/gr-analog/grc/analog_wfm_tx.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##WBFM Transmit
+###################################################
+ -->
+<block>
+ <name>WBFM Transmit</name>
+ <key>analog_wfm_tx</key>
+ <import>from gnuradio import analog</import>
+ <make>analog.wfm_tx(
+ audio_rate=$audio_rate,
+ quad_rate=$quad_rate,
+ tau=$tau,
+ max_dev=$max_dev,
+)</make>
+ <param>
+ <name>Audio Rate</name>
+ <key>audio_rate</key>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Quadrature Rate</name>
+ <key>quad_rate</key>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Tau</name>
+ <key>tau</key>
+ <value>75e-6</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Max Deviation</name>
+ <key>max_dev</key>
+ <value>75e3</value>
+ <type>real</type>
+ </param>
+ <check>$quad_rate%$audio_rate == 0</check>
+ <sink>
+ <name>in</name>
+ <type>float</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-analog/include/analog/CMakeLists.txt b/gr-analog/include/analog/CMakeLists.txt
index 3c18c949ab..0343abcd85 100644
--- a/gr-analog/include/analog/CMakeLists.txt
+++ b/gr-analog/include/analog/CMakeLists.txt
@@ -26,7 +26,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
#!${PYTHON_EXECUTABLE}
import sys, os, re
-sys.path.append('${GR_CORE_PYTHONPATH}')
+sys.path.append('${GR_RUNTIME_PYTHONPATH}')
os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
@@ -106,7 +106,7 @@ install(FILES
quadrature_demod_cf.h
rail_ff.h
sig_source_waveform.h
- simple_squelch_cc.h
+ simple_squelch_cc.h
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/analog
COMPONENT "analog_devel"
)
diff --git a/gr-analog/include/analog/agc.h b/gr-analog/include/analog/agc.h
index 92d777fa19..c304ba8f3e 100644
--- a/gr-analog/include/analog/agc.h
+++ b/gr-analog/include/analog/agc.h
@@ -39,6 +39,14 @@ namespace gr {
class ANALOG_API agc_cc
{
public:
+ /*!
+ * Construct a complex value AGC loop implementation object.
+ *
+ * \param rate the update rate of the loop.
+ * \param reference reference value to adjust signal power to.
+ * \param gain initial gain value.
+ * \param max_gain maximum gain value (0 for unlimited).
+ */
agc_cc(float rate = 1e-4, float reference = 1.0,
float gain = 1.0, float max_gain = 0.0)
: _rate(rate), _reference(reference),
@@ -90,6 +98,14 @@ namespace gr {
class ANALOG_API agc_ff
{
public:
+ /*!
+ * Construct a floating point value AGC loop implementation object.
+ *
+ * \param rate the update rate of the loop.
+ * \param reference reference value to adjust signal power to.
+ * \param gain initial gain value.
+ * \param max_gain maximum gain value (0 for unlimited).
+ */
agc_ff(float rate = 1e-4, float reference = 1.0,
float gain = 1.0, float max_gain = 0.0)
: _rate(rate), _reference(reference), _gain(gain),
diff --git a/gr-analog/include/analog/agc2.h b/gr-analog/include/analog/agc2.h
index 75a203e9fc..8d1958d293 100644
--- a/gr-analog/include/analog/agc2.h
+++ b/gr-analog/include/analog/agc2.h
@@ -39,6 +39,15 @@ namespace gr {
class ANALOG_API agc2_cc
{
public:
+ /*!
+ * Construct a comple value AGC loop implementation object.
+ *
+ * \param attack_rate the update rate of the loop when in attack mode.
+ * \param decay_rate the update rate of the loop when in decay mode.
+ * \param reference reference value to adjust signal power to.
+ * \param gain initial gain value.
+ * \param max_gain maximum gain value (0 for unlimited).
+ */
agc2_cc(float attack_rate = 1e-1, float decay_rate = 1e-2,
float reference = 1.0,
float gain = 1.0, float max_gain = 0.0)
@@ -99,6 +108,15 @@ namespace gr {
class ANALOG_API agc2_ff
{
public:
+ /*!
+ * Construct a floating point value AGC loop implementation object.
+ *
+ * \param attack_rate the update rate of the loop when in attack mode.
+ * \param decay_rate the update rate of the loop when in decay mode.
+ * \param reference reference value to adjust signal power to.
+ * \param gain initial gain value.
+ * \param max_gain maximum gain value (0 for unlimited).
+ */
agc2_ff(float attack_rate = 1e-1, float decay_rate = 1e-2,
float reference = 1.0,
float gain = 1.0, float max_gain = 0.0)
diff --git a/gr-analog/include/analog/agc2_cc.h b/gr-analog/include/analog/agc2_cc.h
index c922ccd4da..7f3a7c24bd 100644
--- a/gr-analog/include/analog/agc2_cc.h
+++ b/gr-analog/include/analog/agc2_cc.h
@@ -31,7 +31,8 @@ namespace gr {
namespace analog {
/*!
- * \brief high performance Automatic Gain Control class
+ * \brief high performance Automatic Gain Control class with
+ * attack and decay rates.
* \ingroup level_blk
*
* For Power the absolute value of the complex number is used.
@@ -42,6 +43,15 @@ namespace gr {
// gr::analog::agc2_cc::sptr
typedef boost::shared_ptr<agc2_cc> sptr;
+ /*!
+ * Build a complex value AGC loop block with attack and decay rates.
+ *
+ * \param attack_rate the update rate of the loop when in attack mode.
+ * \param decay_rate the update rate of the loop when in decay mode.
+ * \param reference reference value to adjust signal power to.
+ * \param gain initial gain value.
+ * \param max_gain maximum gain value (0 for unlimited).
+ */
static sptr make(float attack_rate = 1e-1, float decay_rate = 1e-2,
float reference = 1.0,
float gain = 1.0, float max_gain = 0.0);
diff --git a/gr-analog/include/analog/agc2_ff.h b/gr-analog/include/analog/agc2_ff.h
index 27dd6d92e5..4bb7b0f646 100644
--- a/gr-analog/include/analog/agc2_ff.h
+++ b/gr-analog/include/analog/agc2_ff.h
@@ -31,7 +31,8 @@ namespace gr {
namespace analog {
/*!
- * \brief high performance Automatic Gain Control class
+ * \brief high performance Automatic Gain Control class with
+ * attack and decay rates.
*
* \ingroup level_blk
* Power is approximated by absolute value
@@ -42,6 +43,15 @@ namespace gr {
// gr::analog::agc2_ff::sptr
typedef boost::shared_ptr<agc2_ff> sptr;
+ /*!
+ * Build a floating point AGC loop block with attack and decay rates.
+ *
+ * \param attack_rate the update rate of the loop when in attack mode.
+ * \param decay_rate the update rate of the loop when in decay mode.
+ * \param reference reference value to adjust signal power to.
+ * \param gain initial gain value.
+ * \param max_gain maximum gain value (0 for unlimited).
+ */
static sptr make(float attack_rate = 1e-1, float decay_rate = 1e-2,
float reference = 1.0,
float gain = 1.0, float max_gain = 0.0);
diff --git a/gr-analog/include/analog/agc_cc.h b/gr-analog/include/analog/agc_cc.h
index b2b1a9b430..0e59f8593b 100644
--- a/gr-analog/include/analog/agc_cc.h
+++ b/gr-analog/include/analog/agc_cc.h
@@ -42,6 +42,14 @@ namespace gr {
// gr::analog::agc_cc::sptr
typedef boost::shared_ptr<agc_cc> sptr;
+ /*!
+ * Build a complex value AGC loop block.
+ *
+ * \param rate the update rate of the loop.
+ * \param reference reference value to adjust signal power to.
+ * \param gain initial gain value.
+ * \param max_gain maximum gain value (0 for unlimited).
+ */
static sptr make(float rate = 1e-4, float reference = 1.0,
float gain = 1.0, float max_gain = 0.0);
diff --git a/gr-analog/include/analog/agc_ff.h b/gr-analog/include/analog/agc_ff.h
index 30d1ae1fd9..6046d6f645 100644
--- a/gr-analog/include/analog/agc_ff.h
+++ b/gr-analog/include/analog/agc_ff.h
@@ -42,6 +42,14 @@ namespace gr {
// gr::analog::agc_ff::sptr
typedef boost::shared_ptr<agc_ff> sptr;
+ /*!
+ * Build a floating point AGC loop block.
+ *
+ * \param rate the update rate of the loop.
+ * \param reference reference value to adjust signal power to.
+ * \param gain initial gain value.
+ * \param max_gain maximum gain value (0 for unlimited).
+ */
static sptr make(float rate = 1e-4, float reference = 1.0,
float gain = 1.0, float max_gain = 0.0);
diff --git a/gr-analog/include/analog/api.h b/gr-analog/include/analog/api.h
index b7dee46933..2459ace614 100644
--- a/gr-analog/include/analog/api.h
+++ b/gr-analog/include/analog/api.h
@@ -22,7 +22,7 @@
#ifndef INCLUDED_ANALOG_API_H
#define INCLUDED_ANALOG_API_H
-#include <gruel/attributes.h>
+#include <attributes.h>
#ifdef gnuradio_analog_EXPORTS
# define ANALOG_API __GR_ATTR_EXPORT
diff --git a/gr-analog/include/analog/cpm.h b/gr-analog/include/analog/cpm.h
index d22e02321c..aff0dd19eb 100644
--- a/gr-analog/include/analog/cpm.h
+++ b/gr-analog/include/analog/cpm.h
@@ -28,6 +28,9 @@
namespace gr {
namespace analog {
+ /*! \brief Return the taps for an interpolating FIR filter
+ * (gr::filter::interp_fir_filter_fff).
+ */
class ANALOG_API cpm
{
public:
@@ -40,25 +43,30 @@ namespace gr {
GENERIC = 999
};
- /*! \brief Return the taps for an interpolating FIR filter (gr_interp_fir_filter_fff).
+ /*! \brief Return the taps for an interpolating FIR filter
+ * (gr::filter::interp_fir_filter_fff).
*
- * These taps represent the phase response \f$g(k)\f$ for use in a CPM modulator,
- * see also gr_cpmmod_bc.
+ * These taps represent the phase response \f$g(k)\f$ for use in
+ * a CPM modulator, see also gr_cpmmod_bc.
*
- * \param type The CPM type (Rectangular, Raised Cosine, Spectral Raised Cosine,
- * Tamed FM or Gaussian).
+ * \param type The CPM type (Rectangular, Raised Cosine,
+ * Spectral Raised Cosine, Tamed FM or Gaussian).
* \param samples_per_sym Samples per symbol.
* \param L The length of the phase response in symbols.
- * \param beta For Spectral Raised Cosine, this is the rolloff factor. For Gaussian
- * phase responses, this the 3dB-time-bandwidth product. For all other
- * cases, it is ignored.
+ * \param beta For Spectral Raised Cosine, this is the rolloff
+ * factor. For Gaussian phase responses, this the
+ * 3dB-time-bandwidth product. For all other cases,
+ * it is ignored.
*
- * Output: returns a vector of length \a K = \p samples_per_sym x \p L.
- * This can be used directly in an interpolating FIR filter such as
- * gr_interp_fir_filter_fff with interpolation factor \p samples_per_sym.
+ * Output: returns a vector of length \a K = \p samples_per_sym
+ * x \p L. This can be used directly in an
+ * interpolating FIR filter such as
+ * gr_interp_fir_filter_fff with interpolation factor \p
+ * samples_per_sym.
*
- * All phase responses are normalised s.t. \f$ \sum_{k=0}^{K-1} g(k) = 1\f$; this will cause
- * a maximum phase change of \f$ h \cdot \pi\f$ between two symbols, where \a h is the
+ * All phase responses are normalised s.t. \f$ \sum_{k=0}^{K-1}
+ * g(k) = 1\f$; this will cause a maximum phase change of \f$ h
+ * \cdot \pi\f$ between two symbols, where \a h is the
* modulation index.
*
* The following phase responses can be generated:
@@ -77,7 +85,8 @@ namespace gr {
* [1]: Anderson, Aulin and Sundberg; Digital Phase Modulation
*/
static std::vector<float>
- phase_response(cpm_type type, unsigned samples_per_sym, unsigned L, double beta=0.3);
+ phase_response(cpm_type type, unsigned samples_per_sym,
+ unsigned L, double beta=0.3);
};
} // namespace analog
} // namespace gr
diff --git a/gr-analog/include/analog/ctcss_squelch_ff.h b/gr-analog/include/analog/ctcss_squelch_ff.h
index f880299173..b63876714d 100644
--- a/gr-analog/include/analog/ctcss_squelch_ff.h
+++ b/gr-analog/include/analog/ctcss_squelch_ff.h
@@ -31,7 +31,7 @@ namespace gr {
namespace analog {
/*!
- * \brief gate or zero output if ctcss tone not present
+ * \brief gate or zero output if CTCSS tone not present
* \ingroup level_blk
*/
class ANALOG_API ctcss_squelch_ff :
@@ -47,6 +47,14 @@ namespace gr {
/*!
* \brief Make CTCSS tone squelch block.
+ *
+ * \param rate gain of the internal frequency filters.
+ * \param freq frequency value to use as the squelch tone.
+ * \param level threshold level for the squelch tone.
+ * \param len length of the frequency filters.
+ * \param ramp sets response characteristic.
+ * \param gate if true, no output if no squelch tone.
+ * if false, output 0's if no squelch tone.
*/
static sptr make(int rate, float freq, float level,
int len, int ramp, bool gate);
diff --git a/gr-analog/include/analog/feedforward_agc_cc.h b/gr-analog/include/analog/feedforward_agc_cc.h
index 9e259a4eba..743b9b3a3b 100644
--- a/gr-analog/include/analog/feedforward_agc_cc.h
+++ b/gr-analog/include/analog/feedforward_agc_cc.h
@@ -30,7 +30,8 @@ namespace gr {
namespace analog {
/*!
- * \brief Non-causal AGC which computes required gain based on max absolute value over nsamples
+ * \brief Non-causal AGC which computes required gain based on max
+ * absolute value over nsamples
* \ingroup level_blk
*/
class ANALOG_API feedforward_agc_cc : virtual public gr_sync_block
@@ -38,7 +39,13 @@ namespace gr {
public:
// gr::analog::feedforward_agc_cc::sptr
typedef boost::shared_ptr<feedforward_agc_cc> sptr;
-
+
+ /*!
+ * Build a complex valued feed-forward AGC loop block.
+ *
+ * \param nsamples number of samples to look ahead.
+ * \param reference reference value to adjust signal power to.
+ */
static sptr make(int nsamples, float reference);
};
diff --git a/gr-analog/include/analog/frequency_modulator_fc.h b/gr-analog/include/analog/frequency_modulator_fc.h
index 8706d513a6..67be1ff00e 100644
--- a/gr-analog/include/analog/frequency_modulator_fc.h
+++ b/gr-analog/include/analog/frequency_modulator_fc.h
@@ -41,6 +41,11 @@ namespace gr {
// gr::analog::frequency_modulator_fc::sptr
typedef boost::shared_ptr<frequency_modulator_fc> sptr;
+ /*!
+ * Build a frequency modulator block.
+ *
+ * \param sensitivity radians/sample = amplitude * sensitivity
+ */
static sptr make(double sensitivity);
virtual void set_sensitivity(float sens) = 0;
diff --git a/gr-analog/include/analog/pll_carriertracking_cc.h b/gr-analog/include/analog/pll_carriertracking_cc.h
index 3596429d49..0812d650f0 100644
--- a/gr-analog/include/analog/pll_carriertracking_cc.h
+++ b/gr-analog/include/analog/pll_carriertracking_cc.h
@@ -24,6 +24,7 @@
#define INCLUDED_ANALOG_PLL_CARRIERTRACKING_CC_H
#include <analog/api.h>
+#include <blocks/control_loop.h>
#include <gr_sync_block.h>
namespace gr {
@@ -45,7 +46,9 @@ namespace gr {
* and should be set around pi/200 -- 2pi/100. \sa
* pll_freqdet_cf, pll_carriertracking_cc
*/
- class ANALOG_API pll_carriertracking_cc : virtual public gr_sync_block
+ class ANALOG_API pll_carriertracking_cc
+ : virtual public gr_sync_block,
+ virtual public blocks::control_loop
{
public:
// gr::analog::pll_carriertracking_cc::sptr
diff --git a/gr-analog/include/analog/pll_freqdet_cf.h b/gr-analog/include/analog/pll_freqdet_cf.h
index 613e85263f..8ffbc5968e 100644
--- a/gr-analog/include/analog/pll_freqdet_cf.h
+++ b/gr-analog/include/analog/pll_freqdet_cf.h
@@ -24,6 +24,7 @@
#define INCLUDED_ANALOG_PLL_FREQDET_CF_H
#include <analog/api.h>
+#include <blocks/control_loop.h>
#include <gr_sync_block.h>
namespace gr {
@@ -44,7 +45,9 @@ namespace gr {
* around pi/200 -- 2pi/100.
* \sa pll_refout_cc, pll_carriertracking_cc
*/
- class ANALOG_API pll_freqdet_cf : virtual public gr_sync_block
+ class ANALOG_API pll_freqdet_cf
+ : virtual public gr_sync_block,
+ virtual public blocks::control_loop
{
public:
// gr::analog::pll_freqdet_cf::sptr
diff --git a/gr-analog/include/analog/pll_refout_cc.h b/gr-analog/include/analog/pll_refout_cc.h
index a18d177e6e..1ba907262e 100644
--- a/gr-analog/include/analog/pll_refout_cc.h
+++ b/gr-analog/include/analog/pll_refout_cc.h
@@ -24,6 +24,7 @@
#define INCLUDED_ANALOG_PLL_REFOUT_CC_H
#include <analog/api.h>
+#include <blocks/control_loop.h>
#include <gr_sync_block.h>
namespace gr {
@@ -45,7 +46,9 @@ namespace gr {
* and should be set around pi/200 -- 2pi/100. \sa
* pll_freqdet_cf, pll_carriertracking_cc
*/
- class ANALOG_API pll_refout_cc : virtual public gr_sync_block
+ class ANALOG_API pll_refout_cc
+ : virtual public gr_sync_block,
+ virtual public blocks::control_loop
{
public:
// gr::analog::pll_refout_cc::sptr
diff --git a/gr-analog/include/analog/pwr_squelch_cc.h b/gr-analog/include/analog/pwr_squelch_cc.h
index 79364a86b5..e3f6fb67fc 100644
--- a/gr-analog/include/analog/pwr_squelch_cc.h
+++ b/gr-analog/include/analog/pwr_squelch_cc.h
@@ -50,8 +50,9 @@ namespace gr {
*
* \param db threshold (in dB) for power squelch
* \param alpha Gain of averaging filter
- * \param ramp
- * \param gate
+ * \param ramp sets response characteristic.
+ * \param gate if true, no output if no squelch tone.
+ * if false, output 0's if no squelch tone.
*/
static sptr make(double db, double alpha=0.0001,
int ramp=0, bool gate=false);
diff --git a/gr-analog/include/analog/pwr_squelch_ff.h b/gr-analog/include/analog/pwr_squelch_ff.h
index 6fdebec746..f8f7b4aac2 100644
--- a/gr-analog/include/analog/pwr_squelch_ff.h
+++ b/gr-analog/include/analog/pwr_squelch_ff.h
@@ -50,8 +50,9 @@ namespace gr {
*
* \param db threshold (in dB) for power squelch
* \param alpha Gain of averaging filter
- * \param ramp
- * \param gate
+ * \param ramp sets response characteristic.
+ * \param gate if true, no output if no squelch tone.
+ * if false, output 0's if no squelch tone.
*/
static sptr make(double db, double alpha=0.0001,
int ramp=0, bool gate=false);
diff --git a/gr-analog/include/analog/quadrature_demod_cf.h b/gr-analog/include/analog/quadrature_demod_cf.h
index 916d8b2ece..fc29e494da 100644
--- a/gr-analog/include/analog/quadrature_demod_cf.h
+++ b/gr-analog/include/analog/quadrature_demod_cf.h
@@ -42,6 +42,12 @@ namespace gr {
// gr::analog::quadrature_demod_cf::sptr
typedef boost::shared_ptr<quadrature_demod_cf> sptr;
+ /* \brief Make a quadrature demodulator block.
+ *
+ * \param gain Gain setting to adjust the output amplitude. Set
+ * based on converting the phase difference between
+ * samples to a nominal output value.
+ */
static sptr make(float gain);
virtual void set_gain(float gain) = 0;
diff --git a/gr-analog/include/analog/rail_ff.h b/gr-analog/include/analog/rail_ff.h
index e51b2fc935..120ca2815b 100644
--- a/gr-analog/include/analog/rail_ff.h
+++ b/gr-analog/include/analog/rail_ff.h
@@ -39,6 +39,12 @@ namespace gr {
// gr::analog::rail_ff::sptr
typedef boost::shared_ptr<rail_ff> sptr;
+ /*!
+ * Build a rail block.
+ *
+ * \param lo the low value to clip to.
+ * \param hi the high value to clip to.
+ */
static sptr make(float lo, float hi);
virtual float lo() const = 0;
diff --git a/gr-analog/include/analog/sincos.h b/gr-analog/include/analog/sincos.h
deleted file mode 100644
index 38b9d96da0..0000000000
--- a/gr-analog/include/analog/sincos.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002,2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_ANALOG_SINCOS_H
-#define INCLUDED_ANALOG_SINCOS_H
-
-#include <analog/api.h>
-
-namespace gr {
- namespace analog {
-
- // compute sine and cosine at the same time
- ANALOG_API void sincos(double x, double *sin, double *cos);
- ANALOG_API void sincosf(float x, float *sin, float *cos);
-
- } /* namespace analog */
-} /* namespace gr */
-
-#endif /* INCLUDED_ANALOG_SINCOS_H */
diff --git a/gr-analog/lib/CMakeLists.txt b/gr-analog/lib/CMakeLists.txt
index 74169da4a2..5719eac7a5 100644
--- a/gr-analog/lib/CMakeLists.txt
+++ b/gr-analog/lib/CMakeLists.txt
@@ -27,9 +27,9 @@ include_directories(
${GR_ANALOG_INCLUDE_DIRS}
${GR_FILTER_INCLUDE_DIRS}
${GR_FFT_INCLUDE_DIRS}
- ${GNURADIO_CORE_INCLUDE_DIRS}
+ ${GR_BLOCKS_INCLUDE_DIRS}
+ ${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
- ${GRUEL_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
@@ -49,7 +49,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
#!${PYTHON_EXECUTABLE}
import sys, os, re
-sys.path.append('${GR_CORE_PYTHONPATH}')
+sys.path.append('${GR_RUNTIME_PYTHONPATH}')
os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
@@ -138,7 +138,6 @@ list(APPEND analog_sources
quadrature_demod_cf_impl.cc
rail_ff_impl.cc
simple_squelch_cc_impl.cc
- sincos.cc
)
#Add Windows DLL resource file if using MSVC
@@ -158,7 +157,7 @@ ENDIF(MSVC)
list(APPEND analog_libs
volk
- gnuradio-core
+ gnuradio-runtime
gnuradio-filter
${Boost_LIBRARIES}
)
@@ -181,14 +180,13 @@ if(ENABLE_TESTING)
list(APPEND test_gr_analog_sources
${CMAKE_CURRENT_SOURCE_DIR}/test_gr_analog.cc
${CMAKE_CURRENT_SOURCE_DIR}/qa_analog.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/qa_sincos.cc
)
add_executable(test-gr-analog ${test_gr_analog_sources})
target_link_libraries(
test-gr-analog
- gnuradio-core
+ gnuradio-runtime
gnuradio-analog
${Boost_LIBRARIES}
${CPPUNIT_LIBRARIES}
@@ -198,11 +196,3 @@ if(ENABLE_TESTING)
GR_ADD_TEST(test_gr_analog test-gr-analog)
endif(ENABLE_TESTING)
-
-CHECK_CXX_SOURCE_COMPILES("
- #define _GNU_SOURCE
- #include <math.h>
- int main(){double x, sin, cos; sincos(x, &sin, &cos); return 0;}
- " HAVE_SINCOS
-)
-GR_ADD_COND_DEF(HAVE_SINCOS)
diff --git a/gr-analog/lib/fastnoise_source_X_impl.cc.t b/gr-analog/lib/fastnoise_source_X_impl.cc.t
index 25ad8073aa..706ddbbf84 100644
--- a/gr-analog/lib/fastnoise_source_X_impl.cc.t
+++ b/gr-analog/lib/fastnoise_source_X_impl.cc.t
@@ -59,7 +59,7 @@ namespace gr {
void
@IMPL_NAME@::set_type(noise_type_t type)
{
- gruel::scoped_lock l(d_setlock);
+ gr::thread::scoped_lock l(d_setlock);
d_type = type;
generate();
}
@@ -67,7 +67,7 @@ namespace gr {
void
@IMPL_NAME@::set_amplitude(float ampl)
{
- gruel::scoped_lock l(d_setlock);
+ gr::thread::scoped_lock l(d_setlock);
d_ampl = ampl;
generate();
}
@@ -123,7 +123,7 @@ namespace gr {
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
- gruel::scoped_lock l(d_setlock);
+ gr::thread::scoped_lock l(d_setlock);
@TYPE@ *out = (@TYPE@*)output_items[0];
diff --git a/gr-analog/lib/noise_source_X_impl.cc.t b/gr-analog/lib/noise_source_X_impl.cc.t
index 40e2517d2e..7f371b2cfd 100644
--- a/gr-analog/lib/noise_source_X_impl.cc.t
+++ b/gr-analog/lib/noise_source_X_impl.cc.t
@@ -57,14 +57,14 @@ namespace gr {
void
@IMPL_NAME@::set_type(noise_type_t type)
{
- gruel::scoped_lock l(d_setlock);
+ gr::thread::scoped_lock l(d_setlock);
d_type = type;
}
void
@IMPL_NAME@::set_amplitude(float ampl)
{
- gruel::scoped_lock l(d_setlock);
+ gr::thread::scoped_lock l(d_setlock);
d_ampl = ampl;
}
@@ -73,7 +73,7 @@ namespace gr {
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
- gruel::scoped_lock l(d_setlock);
+ gr::thread::scoped_lock l(d_setlock);
@TYPE@ *out = (@TYPE@*)output_items[0];
diff --git a/gr-analog/lib/pll_carriertracking_cc_impl.cc b/gr-analog/lib/pll_carriertracking_cc_impl.cc
index c53e0f4332..9213a5e681 100644
--- a/gr-analog/lib/pll_carriertracking_cc_impl.cc
+++ b/gr-analog/lib/pll_carriertracking_cc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2010-2012 Free Software Foundation, Inc.
+ * Copyright 2006,2010-2013 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -50,7 +50,7 @@ namespace gr {
: gr_sync_block("pll_carriertracking_cc",
gr_make_io_signature(1, 1, sizeof(gr_complex)),
gr_make_io_signature(1, 1, sizeof(gr_complex))),
- gri_control_loop(loop_bw, max_freq, min_freq),
+ blocks::control_loop(loop_bw, max_freq, min_freq),
d_locksig(0), d_lock_threshold(0), d_squelch_enable(false)
{
}
@@ -130,98 +130,98 @@ namespace gr {
void
pll_carriertracking_cc_impl::set_loop_bandwidth(float bw)
{
- gri_control_loop::set_loop_bandwidth(bw);
+ blocks::control_loop::set_loop_bandwidth(bw);
}
void
pll_carriertracking_cc_impl::set_damping_factor(float df)
{
- gri_control_loop::set_damping_factor(df);
+ blocks::control_loop::set_damping_factor(df);
}
void
pll_carriertracking_cc_impl::set_alpha(float alpha)
{
- gri_control_loop::set_alpha(alpha);
+ blocks::control_loop::set_alpha(alpha);
}
void
pll_carriertracking_cc_impl::set_beta(float beta)
{
- gri_control_loop::set_beta(beta);
+ blocks::control_loop::set_beta(beta);
}
void
pll_carriertracking_cc_impl::set_frequency(float freq)
{
- gri_control_loop::set_frequency(freq);
+ blocks::control_loop::set_frequency(freq);
}
void
pll_carriertracking_cc_impl::set_phase(float phase)
{
- gri_control_loop::set_phase(phase);
+ blocks::control_loop::set_phase(phase);
}
void
pll_carriertracking_cc_impl::set_min_freq(float freq)
{
- gri_control_loop::set_min_freq(freq);
+ blocks::control_loop::set_min_freq(freq);
}
void
pll_carriertracking_cc_impl::set_max_freq(float freq)
{
- gri_control_loop::set_max_freq(freq);
+ blocks::control_loop::set_max_freq(freq);
}
float
pll_carriertracking_cc_impl::get_loop_bandwidth() const
{
- return gri_control_loop::get_loop_bandwidth();
+ return blocks::control_loop::get_loop_bandwidth();
}
float
pll_carriertracking_cc_impl::get_damping_factor() const
{
- return gri_control_loop::get_damping_factor();
+ return blocks::control_loop::get_damping_factor();
}
float
pll_carriertracking_cc_impl::get_alpha() const
{
- return gri_control_loop::get_alpha();
+ return blocks::control_loop::get_alpha();
}
float
pll_carriertracking_cc_impl::get_beta() const
{
- return gri_control_loop::get_beta();
+ return blocks::control_loop::get_beta();
}
float
pll_carriertracking_cc_impl::get_frequency() const
{
- return gri_control_loop::get_frequency();
+ return blocks::control_loop::get_frequency();
}
float
pll_carriertracking_cc_impl::get_phase() const
{
- return gri_control_loop::get_phase();
+ return blocks::control_loop::get_phase();
}
float
pll_carriertracking_cc_impl::get_min_freq() const
{
- return gri_control_loop::get_min_freq();
+ return blocks::control_loop::get_min_freq();
}
float
pll_carriertracking_cc_impl::get_max_freq() const
{
- return gri_control_loop::get_max_freq();
+ return blocks::control_loop::get_max_freq();
}
} /* namespace analog */
diff --git a/gr-analog/lib/pll_carriertracking_cc_impl.h b/gr-analog/lib/pll_carriertracking_cc_impl.h
index d67223db82..c809736709 100644
--- a/gr-analog/lib/pll_carriertracking_cc_impl.h
+++ b/gr-analog/lib/pll_carriertracking_cc_impl.h
@@ -24,13 +24,11 @@
#define INCLUDED_ANALOG_PLL_CARRIERTRACKING_CC_IMPL_H
#include <analog/pll_carriertracking_cc.h>
-#include <gri_control_loop.h>
namespace gr {
namespace analog {
- class pll_carriertracking_cc_impl
- : public pll_carriertracking_cc, public gri_control_loop
+ class pll_carriertracking_cc_impl : public pll_carriertracking_cc
{
private:
float d_locksig,d_lock_threshold;
diff --git a/gr-analog/lib/pll_freqdet_cf_impl.cc b/gr-analog/lib/pll_freqdet_cf_impl.cc
index 27e8d02aa4..9e55d9bedb 100644
--- a/gr-analog/lib/pll_freqdet_cf_impl.cc
+++ b/gr-analog/lib/pll_freqdet_cf_impl.cc
@@ -47,7 +47,7 @@ namespace gr {
: gr_sync_block("pll_freqdet_cf",
gr_make_io_signature(1, 1, sizeof(gr_complex)),
gr_make_io_signature(1, 1, sizeof(float))),
- gri_control_loop(loop_bw, max_freq, min_freq)
+ blocks::control_loop(loop_bw, max_freq, min_freq)
{
}
@@ -100,98 +100,98 @@ namespace gr {
void
pll_freqdet_cf_impl::set_loop_bandwidth(float bw)
{
- gri_control_loop::set_loop_bandwidth(bw);
+ blocks::control_loop::set_loop_bandwidth(bw);
}
void
pll_freqdet_cf_impl::set_damping_factor(float df)
{
- gri_control_loop::set_damping_factor(df);
+ blocks::control_loop::set_damping_factor(df);
}
void
pll_freqdet_cf_impl::set_alpha(float alpha)
{
- gri_control_loop::set_alpha(alpha);
+ blocks::control_loop::set_alpha(alpha);
}
void
pll_freqdet_cf_impl::set_beta(float beta)
{
- gri_control_loop::set_beta(beta);
+ blocks::control_loop::set_beta(beta);
}
void
pll_freqdet_cf_impl::set_frequency(float freq)
{
- gri_control_loop::set_frequency(freq);
+ blocks::control_loop::set_frequency(freq);
}
void
pll_freqdet_cf_impl::set_phase(float phase)
{
- gri_control_loop::set_phase(phase);
+ blocks::control_loop::set_phase(phase);
}
void
pll_freqdet_cf_impl::set_min_freq(float freq)
{
- gri_control_loop::set_min_freq(freq);
+ blocks::control_loop::set_min_freq(freq);
}
void
pll_freqdet_cf_impl::set_max_freq(float freq)
{
- gri_control_loop::set_max_freq(freq);
+ blocks::control_loop::set_max_freq(freq);
}
float
pll_freqdet_cf_impl::get_loop_bandwidth() const
{
- return gri_control_loop::get_loop_bandwidth();
+ return blocks::control_loop::get_loop_bandwidth();
}
float
pll_freqdet_cf_impl::get_damping_factor() const
{
- return gri_control_loop::get_damping_factor();
+ return blocks::control_loop::get_damping_factor();
}
float
pll_freqdet_cf_impl::get_alpha() const
{
- return gri_control_loop::get_alpha();
+ return blocks::control_loop::get_alpha();
}
float
pll_freqdet_cf_impl::get_beta() const
{
- return gri_control_loop::get_beta();
+ return blocks::control_loop::get_beta();
}
float
pll_freqdet_cf_impl::get_frequency() const
{
- return gri_control_loop::get_frequency();
+ return blocks::control_loop::get_frequency();
}
float
pll_freqdet_cf_impl::get_phase() const
{
- return gri_control_loop::get_phase();
+ return blocks::control_loop::get_phase();
}
float
pll_freqdet_cf_impl::get_min_freq() const
{
- return gri_control_loop::get_min_freq();
+ return blocks::control_loop::get_min_freq();
}
float
pll_freqdet_cf_impl::get_max_freq() const
{
- return gri_control_loop::get_max_freq();
+ return blocks::control_loop::get_max_freq();
}
} /* namespace analog */
diff --git a/gr-analog/lib/pll_freqdet_cf_impl.h b/gr-analog/lib/pll_freqdet_cf_impl.h
index 7acf53ebbf..3170d819b6 100644
--- a/gr-analog/lib/pll_freqdet_cf_impl.h
+++ b/gr-analog/lib/pll_freqdet_cf_impl.h
@@ -24,13 +24,11 @@
#define INCLUDED_ANALOG_PLL_FREQDET_CF_IMPL_H
#include <analog/pll_freqdet_cf.h>
-#include <gri_control_loop.h>
namespace gr {
namespace analog {
- class pll_freqdet_cf_impl :
- public pll_freqdet_cf, public gri_control_loop
+ class pll_freqdet_cf_impl : public pll_freqdet_cf
{
private:
float phase_detector(gr_complex sample,float ref_phase);
diff --git a/gr-analog/lib/pll_refout_cc_impl.cc b/gr-analog/lib/pll_refout_cc_impl.cc
index b94e3660a3..3f0ccc7df5 100644
--- a/gr-analog/lib/pll_refout_cc_impl.cc
+++ b/gr-analog/lib/pll_refout_cc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010-2012 Free Software Foundation, Inc.
+ * Copyright 2004,2010-2013 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -48,7 +48,7 @@ namespace gr {
: gr_sync_block("pll_refout_cc",
gr_make_io_signature(1, 1, sizeof(gr_complex)),
gr_make_io_signature(1, 1, sizeof(gr_complex))),
- gri_control_loop(loop_bw, max_freq, min_freq)
+ blocks::control_loop(loop_bw, max_freq, min_freq)
{
}
@@ -103,98 +103,98 @@ namespace gr {
void
pll_refout_cc_impl::set_loop_bandwidth(float bw)
{
- gri_control_loop::set_loop_bandwidth(bw);
+ blocks::control_loop::set_loop_bandwidth(bw);
}
void
pll_refout_cc_impl::set_damping_factor(float df)
{
- gri_control_loop::set_damping_factor(df);
+ blocks::control_loop::set_damping_factor(df);
}
void
pll_refout_cc_impl::set_alpha(float alpha)
{
- gri_control_loop::set_alpha(alpha);
+ blocks::control_loop::set_alpha(alpha);
}
void
pll_refout_cc_impl::set_beta(float beta)
{
- gri_control_loop::set_beta(beta);
+ blocks::control_loop::set_beta(beta);
}
void
pll_refout_cc_impl::set_frequency(float freq)
{
- gri_control_loop::set_frequency(freq);
+ blocks::control_loop::set_frequency(freq);
}
void
pll_refout_cc_impl::set_phase(float phase)
{
- gri_control_loop::set_phase(phase);
+ blocks::control_loop::set_phase(phase);
}
void
pll_refout_cc_impl::set_min_freq(float freq)
{
- gri_control_loop::set_min_freq(freq);
+ blocks::control_loop::set_min_freq(freq);
}
void
pll_refout_cc_impl::set_max_freq(float freq)
{
- gri_control_loop::set_max_freq(freq);
+ blocks::control_loop::set_max_freq(freq);
}
float
pll_refout_cc_impl::get_loop_bandwidth() const
{
- return gri_control_loop::get_loop_bandwidth();
+ return blocks::control_loop::get_loop_bandwidth();
}
float
pll_refout_cc_impl::get_damping_factor() const
{
- return gri_control_loop::get_damping_factor();
+ return blocks::control_loop::get_damping_factor();
}
float
pll_refout_cc_impl::get_alpha() const
{
- return gri_control_loop::get_alpha();
+ return blocks::control_loop::get_alpha();
}
float
pll_refout_cc_impl::get_beta() const
{
- return gri_control_loop::get_beta();
+ return blocks::control_loop::get_beta();
}
float
pll_refout_cc_impl::get_frequency() const
{
- return gri_control_loop::get_frequency();
+ return blocks::control_loop::get_frequency();
}
float
pll_refout_cc_impl::get_phase() const
{
- return gri_control_loop::get_phase();
+ return blocks::control_loop::get_phase();
}
float
pll_refout_cc_impl::get_min_freq() const
{
- return gri_control_loop::get_min_freq();
+ return blocks::control_loop::get_min_freq();
}
float
pll_refout_cc_impl::get_max_freq() const
{
- return gri_control_loop::get_max_freq();
+ return blocks::control_loop::get_max_freq();
}
} /* namespace analog */
diff --git a/gr-analog/lib/pll_refout_cc_impl.h b/gr-analog/lib/pll_refout_cc_impl.h
index 9e8ae286b1..1734b6e138 100644
--- a/gr-analog/lib/pll_refout_cc_impl.h
+++ b/gr-analog/lib/pll_refout_cc_impl.h
@@ -24,13 +24,11 @@
#define INCLUDED_ANALOG_PLL_REFOUT_CC_IMPL_H
#include <analog/pll_refout_cc.h>
-#include <gri_control_loop.h>
namespace gr {
namespace analog {
- class pll_refout_cc_impl
- : public pll_refout_cc, public gri_control_loop
+ class pll_refout_cc_impl : public pll_refout_cc
{
private:
float mod_2pi (float in);
diff --git a/gr-analog/lib/qa_analog.cc b/gr-analog/lib/qa_analog.cc
index f1e3a45e27..c7c975a3e5 100644
--- a/gr-analog/lib/qa_analog.cc
+++ b/gr-analog/lib/qa_analog.cc
@@ -26,15 +26,11 @@
*/
#include <qa_analog.h>
-#include <qa_sincos.h>
-#include <qa_rotator.h>
CppUnit::TestSuite *
qa_gr_analog::suite()
{
CppUnit::TestSuite *s = new CppUnit::TestSuite("gr-analog");
- s->addTest(gr::analog::qa_sincos::suite());
-
return s;
}
diff --git a/gr-analog/lib/qa_analog.h b/gr-analog/lib/qa_analog.h
index 458861cc91..b66b62b5fe 100644
--- a/gr-analog/lib/qa_analog.h
+++ b/gr-analog/lib/qa_analog.h
@@ -23,7 +23,7 @@
#ifndef _QA_GR_ANALOG_H_
#define _QA_GR_ANALOG_H_
-#include <gruel/attributes.h>
+#include <attributes.h>
#include <cppunit/TestSuite.h>
//! collect all the tests for the gr-analog directory
diff --git a/gr-analog/lib/qa_sincos.cc b/gr-analog/lib/qa_sincos.cc
deleted file mode 100644
index 62642c1171..0000000000
--- a/gr-analog/lib/qa_sincos.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <qa_sincos.h>
-#include <analog/sincos.h>
-#include <gruel/attributes.h>
-#include <cppunit/TestAssert.h>
-#include <cmath>
-
-namespace gr {
- namespace analog {
-
- void
- qa_sincos::t1()
- {
- static const unsigned int N = 1000;
- double c_sin, c_cos;
- double gr_sin, gr_cos;
-
- for(unsigned i = 0; i < N; i++) {
- double x = i/100.0;
- c_sin = sin(x);
- c_cos = cos(x);
-
- analog::sincos(x, &gr_sin, &gr_cos);
-
- CPPUNIT_ASSERT_DOUBLES_EQUAL(c_sin, gr_sin, 0.0001);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(c_cos, gr_cos, 0.0001);
- }
- }
-
- void
- qa_sincos::t2()
- {
- static const unsigned int N = 1000;
- float c_sin, c_cos;
- float gr_sin, gr_cos;
-
- for(unsigned i = 0; i < N; i++) {
- float x = i/100.0;
- c_sin = sinf(x);
- c_cos = cosf(x);
-
- analog::sincosf(x, &gr_sin, &gr_cos);
-
- CPPUNIT_ASSERT_DOUBLES_EQUAL(c_sin, gr_sin, 0.0001);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(c_cos, gr_cos, 0.0001);
- }
- }
-
- } /* namespace analog */
-} /* namespace gr */
diff --git a/gr-analog/lib/qa_sincos.h b/gr-analog/lib/qa_sincos.h
deleted file mode 100644
index f18e879dd8..0000000000
--- a/gr-analog/lib/qa_sincos.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef _QA_ANALOG_SINCOS_H_
-#define _QA_ANALOG_SINCOS_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/TestCase.h>
-
-namespace gr {
- namespace analog {
-
- class qa_sincos : public CppUnit::TestCase
- {
- CPPUNIT_TEST_SUITE(qa_sincos);
- CPPUNIT_TEST(t1);
- CPPUNIT_TEST(t2);
- CPPUNIT_TEST_SUITE_END();
-
- private:
- void t1();
- void t2();
- };
-
- } /* namespace analog */
-} /* namespace gr */
-
-#endif /* _QA_ANALOG_SINCOS_H_ */
diff --git a/gr-analog/lib/sincos.cc b/gr-analog/lib/sincos.cc
deleted file mode 100644
index 14ceeb3a29..0000000000
--- a/gr-analog/lib/sincos.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE // ask for GNU extensions if available
-#endif
-
-#include <analog/sincos.h>
-#include <math.h>
-
-namespace gr {
- namespace analog {
-
-// ----------------------------------------------------------------
-
-#if defined (HAVE_SINCOS)
-
- void
- sincos(double x, double *sinx, double *cosx)
- {
- ::sincos(x, sinx, cosx);
- }
-
-#else
-
- void
- sincos(double x, double *sinx, double *cosx)
- {
- *sinx = sin(x);
- *cosx = cos(x);
- }
-
-#endif
-
-// ----------------------------------------------------------------
-
-#if defined (HAVE_SINCOSF)
-
- void
- sincosf(float x, float *sinx, float *cosx)
- {
- sincosf(x, sinx, cosx);
- }
-
-#elif defined (HAVE_SINF) && defined (HAVE_COSF)
-
- void
- sincosf(float x, float *sinx, float *cosx)
- {
- *sinx = sinf(x);
- *cosx = cosf(x);
- }
-
-#else
-
- void
- sincosf(float x, float *sinx, float *cosx)
- {
- *sinx = sin(x);
- *cosx = cos(x);
- }
-
-#endif
-
- } /* namespace analog */
-} /* namespace gr */
diff --git a/gr-analog/lib/test_gr_analog.cc b/gr-analog/lib/test_gr_analog.cc
index 00d6242699..95ee3aa8cb 100644
--- a/gr-analog/lib/test_gr_analog.cc
+++ b/gr-analog/lib/test_gr_analog.cc
@@ -20,6 +20,10 @@
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <cppunit/TextTestRunner.h>
#include <cppunit/XmlOutputter.h>
diff --git a/gr-analog/python/analog/CMakeLists.txt b/gr-analog/python/analog/CMakeLists.txt
index 185cffff96..182fc24860 100644
--- a/gr-analog/python/analog/CMakeLists.txt
+++ b/gr-analog/python/analog/CMakeLists.txt
@@ -58,3 +58,4 @@ if(ENABLE_TESTING)
GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
endforeach(py_qa_test_file)
endif(ENABLE_TESTING)
+
diff --git a/gr-analog/python/analog/qa_agc.py b/gr-analog/python/analog/qa_agc.py
index d3186bd567..f274b04e7e 100755
--- a/gr-analog/python/analog/qa_agc.py
+++ b/gr-analog/python/analog/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
#
@@ -20,21 +20,16 @@
# Boston, MA 02110-1301, USA.
#
-import math
+from gnuradio import gr, gr_unittest, analog, blocks
-from gnuradio import gr, gr_unittest, analog
+class test_agc(gr_unittest.TestCase):
-test_output = False
+ def setUp(self):
+ self.tb = gr.top_block()
-class test_agc (gr_unittest.TestCase):
-
- def setUp (self):
- self.tb = gr.top_block ()
-
- def tearDown (self):
+ def tearDown(self):
self.tb = None
-
def test_001_sets(self):
agc = analog.agc_cc(1e-3, 1, 1, 1000)
@@ -107,8 +102,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)
@@ -116,9 +111,6 @@ class test_agc (gr_unittest.TestCase):
tb.connect(head, agc)
tb.connect(agc, dst1)
- if test_output == True:
- tb.connect(agc, gr.file_sink(gr.sizeof_gr_complex, "test_agc_cc.dat"))
-
tb.run()
dst_data = dst1.data()
self.assertComplexTuplesAlmostEqual(expected_result, dst_data, 4)
@@ -195,8 +187,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)
@@ -204,9 +196,6 @@ class test_agc (gr_unittest.TestCase):
tb.connect (head, agc)
tb.connect (agc, dst1)
- if test_output == True:
- tb.connect (agc, gr.file_sink(gr.sizeof_float, "test_agc_ff.dat"))
-
tb.run ()
dst_data = dst1.data ()
self.assertFloatTuplesAlmostEqual (expected_result, dst_data, 4)
@@ -285,8 +274,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)
@@ -294,9 +283,6 @@ class test_agc (gr_unittest.TestCase):
tb.connect(head, agc)
tb.connect(agc, dst1)
- if test_output == True:
- tb.connect(agc, gr.file_sink(gr.sizeof_gr_complex, "test_agc2_cc.dat"))
-
tb.run()
dst_data = dst1.data()
self.assertComplexTuplesAlmostEqual(expected_result, dst_data, 4)
@@ -375,8 +361,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)
@@ -384,9 +370,6 @@ class test_agc (gr_unittest.TestCase):
tb.connect(head, agc)
tb.connect(agc, dst1)
- if test_output == True:
- tb.connect(agc, gr.file_sink(gr.sizeof_float, "test_agc2_ff.dat"))
-
tb.run()
dst_data = dst1.data()
self.assertFloatTuplesAlmostEqual(expected_result, dst_data, 4)
@@ -451,8 +434,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)
@@ -460,9 +443,6 @@ class test_agc (gr_unittest.TestCase):
tb.connect(head, agc)
tb.connect(agc, dst1)
- if test_output == True:
- tb.connect(agc, gr.file_sink(gr.sizeof_gr_complex, "test_agc2_cc.dat"))
-
tb.run()
dst_data = dst1.data()
self.assertComplexTuplesAlmostEqual(expected_result, dst_data, 4)
@@ -476,15 +456,11 @@ 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)
- if test_output == True:
- self.tb.connect(agc, gr.file_sink(gr.sizeof_gr_complex,
- "test_feedforward_cc.dat"))
-
self.tb.run()
dst_data = dst.data()[0:len(expected_result)]
diff --git a/gr-analog/python/analog/qa_cpfsk.py b/gr-analog/python/analog/qa_cpfsk.py
index 95c1580892..a33a6e6092 100755
--- a/gr-analog/python/analog/qa_cpfsk.py
+++ b/gr-analog/python/analog/qa_cpfsk.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -22,7 +22,7 @@
import math
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
class test_cpfsk_bc(gr_unittest.TestCase):
@@ -52,9 +52,9 @@ class test_cpfsk_bc(gr_unittest.TestCase):
src_data = 10*[0, 1]
expected_result = map(lambda x: complex(2*x-1,0), src_data)
- src = gr.vector_source_b(src_data)
+ src = blocks.vector_source_b(src_data)
op = analog.cpfsk_bc(2, 1, 2)
- dst = gr.vector_sink_c()
+ dst = blocks.vector_sink_c()
self.tb.connect(src, op)
self.tb.connect(op, dst)
diff --git a/gr-analog/python/analog/qa_ctcss_squelch.py b/gr-analog/python/analog/qa_ctcss_squelch.py
index 957ab35a3c..f5cfcbf976 100755
--- a/gr-analog/python/analog/qa_ctcss_squelch.py
+++ b/gr-analog/python/analog/qa_ctcss_squelch.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -20,7 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
class test_ctcss_squelch(gr_unittest.TestCase):
@@ -67,10 +67,10 @@ class test_ctcss_squelch(gr_unittest.TestCase):
expected_result = src_data
expected_result[0] = 0
- src = gr.vector_source_f(src_data)
+ src = blocks.vector_source_f(src_data)
op = analog.ctcss_squelch_ff(rate, freq, level,
length, ramp, gate)
- dst = gr.vector_sink_f()
+ dst = blocks.vector_sink_f()
self.tb.connect(src, op)
self.tb.connect(op, dst)
@@ -89,10 +89,10 @@ class test_ctcss_squelch(gr_unittest.TestCase):
gate = False
src_data = map(lambda x: float(x)/10.0, range(1, 40))
- src = gr.vector_source_f(src_data)
+ src = blocks.vector_source_f(src_data)
op = analog.ctcss_squelch_ff(rate, freq, level,
length, ramp, gate)
- dst = gr.vector_sink_f()
+ dst = blocks.vector_sink_f()
self.tb.connect(src, op)
self.tb.connect(op, dst)
diff --git a/gr-analog/python/analog/qa_dpll.py b/gr-analog/python/analog/qa_dpll.py
index 9f7b66d7a9..44b1486035 100755
--- a/gr-analog/python/analog/qa_dpll.py
+++ b/gr-analog/python/analog/qa_dpll.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -20,9 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-import math
-
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
class test_dpll_bb(gr_unittest.TestCase):
@@ -60,9 +58,9 @@ class test_dpll_bb(gr_unittest.TestCase):
src_data = 10*((period-1)*[0,] + [1,])
expected_result = src_data
- src = gr.vector_source_b(src_data)
+ src = blocks.vector_source_b(src_data)
op = analog.dpll_bb(period, gain)
- dst = gr.vector_sink_b()
+ dst = blocks.vector_sink_b()
self.tb.connect(src, op)
self.tb.connect(op, dst)
diff --git a/gr-analog/python/analog/qa_fmdet.py b/gr-analog/python/analog/qa_fmdet.py
index 3ffd88b76a..a9c88c3b95 100755
--- a/gr-analog/python/analog/qa_fmdet.py
+++ b/gr-analog/python/analog/qa_fmdet.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -20,9 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-import math
-
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
class test_fmdet_cf(gr_unittest.TestCase):
@@ -63,9 +61,9 @@ class test_fmdet_cf(gr_unittest.TestCase):
def est_fmdet_cf_002(self):
N = 100
src = analog.sig_source_c(1, analog.GR_SIN_WAVE, 0.2, 1)
- head = gr.head(gr.sizeof_gr_complex, N)
+ head = blocks.head(gr.sizeof_gr_complex, N)
op = analog.fmdet_cf(1, 0.1, 0.3, 0.1)
- dst = gr.vector_sink_f()
+ dst = blocks.vector_sink_f()
self.tb.connect(src, head, op)
self.tb.connect(op, dst)
diff --git a/gr-analog/python/analog/qa_frequency_modulator.py b/gr-analog/python/analog/qa_frequency_modulator.py
index d5cc127c82..0f5c45b11a 100755
--- a/gr-analog/python/analog/qa_frequency_modulator.py
+++ b/gr-analog/python/analog/qa_frequency_modulator.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,7 +22,7 @@
import math
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
def sincos(x):
return math.cos(x) + math.sin(x) * 1j
@@ -42,9 +42,9 @@ class test_frequency_modulator(gr_unittest.TestCase):
src_data = (1.0/4, 1.0/2, 1.0/4, -1.0/4, -1.0/2, -1/4.0)
running_sum = (pi/16, 3*pi/16, pi/4, 3*pi/16, pi/16, 0)
expected_result = tuple([sincos(x) for x in running_sum])
- src = gr.vector_source_f(src_data)
+ src = blocks.vector_source_f(src_data)
op = analog.frequency_modulator_fc(sensitivity)
- dst = gr.vector_sink_c()
+ dst = blocks.vector_sink_c()
self.tb.connect(src, op)
self.tb.connect(op, dst)
self.tb.run()
diff --git a/gr-analog/python/analog/qa_phase_modulator.py b/gr-analog/python/analog/qa_phase_modulator.py
index 19e7ac9f93..05fe2127c0 100755
--- a/gr-analog/python/analog/qa_phase_modulator.py
+++ b/gr-analog/python/analog/qa_phase_modulator.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -22,7 +22,7 @@
import math
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
def sincos(x):
return math.cos(x) + math.sin(x) * 1j
@@ -42,9 +42,9 @@ class test_phase_modulator(gr_unittest.TestCase):
src_data = (1.0/4, 1.0/2, 1.0/4, -1.0/4, -1.0/2, -1/4.0)
expected_result = tuple([sincos(sensitivity*x) for x in src_data])
- src = gr.vector_source_f(src_data)
+ src = blocks.vector_source_f(src_data)
op = analog.phase_modulator_fc(sensitivity)
- dst = gr.vector_sink_c()
+ dst = blocks.vector_sink_c()
self.tb.connect(src, op)
self.tb.connect(op, dst)
diff --git a/gr-analog/python/analog/qa_pll_carriertracking.py b/gr-analog/python/analog/qa_pll_carriertracking.py
index 7694ed3a4c..d05e49641a 100755
--- a/gr-analog/python/analog/qa_pll_carriertracking.py
+++ b/gr-analog/python/analog/qa_pll_carriertracking.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2004,2007,2010-2012 Free Software Foundation, Inc.
+# Copyright 2004,2007,2010-2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -22,7 +22,7 @@
import math
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
class test_pll_carriertracking(gr_unittest.TestCase):
@@ -143,8 +143,8 @@ class test_pll_carriertracking(gr_unittest.TestCase):
src = analog.sig_source_c(sampling_freq, analog.GR_COS_WAVE, freq, 1.0)
pll = analog.pll_carriertracking_cc(loop_bw, maxf, minf)
- head = gr.head(gr.sizeof_gr_complex, int (freq))
- dst = gr.vector_sink_c()
+ head = blocks.head(gr.sizeof_gr_complex, int (freq))
+ dst = blocks.vector_sink_c()
self.tb.connect(src, pll, head)
self.tb.connect(head, dst)
diff --git a/gr-analog/python/analog/qa_pll_freqdet.py b/gr-analog/python/analog/qa_pll_freqdet.py
index 77190889fc..0166a40258 100755
--- a/gr-analog/python/analog/qa_pll_freqdet.py
+++ b/gr-analog/python/analog/qa_pll_freqdet.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2004,2007,2010-2012 Free Software Foundation, Inc.
+# Copyright 2004,2007,2010-2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -22,7 +22,7 @@
import math
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
class test_pll_freqdet(gr_unittest.TestCase):
@@ -143,8 +143,8 @@ class test_pll_freqdet(gr_unittest.TestCase):
src = analog.sig_source_c(sampling_freq, analog.GR_COS_WAVE, freq, 1.0)
pll = analog.pll_freqdet_cf(loop_bw, maxf, minf)
- head = gr.head(gr.sizeof_float, int (freq))
- dst = gr.vector_sink_f()
+ head = blocks.head(gr.sizeof_float, int (freq))
+ dst = blocks.vector_sink_f()
self.tb.connect(src, pll, head)
self.tb.connect(head, dst)
diff --git a/gr-analog/python/analog/qa_pll_refout.py b/gr-analog/python/analog/qa_pll_refout.py
index 741b4d3704..f85a027aa3 100755
--- a/gr-analog/python/analog/qa_pll_refout.py
+++ b/gr-analog/python/analog/qa_pll_refout.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2004,2010,2012 Free Software Foundation, Inc.
+# Copyright 2004,2010,2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -22,7 +22,7 @@
import math
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
class test_pll_refout(gr_unittest.TestCase):
@@ -143,8 +143,8 @@ class test_pll_refout(gr_unittest.TestCase):
src = analog.sig_source_c(sampling_freq, analog.GR_COS_WAVE, freq, 1.0)
pll = analog.pll_refout_cc(loop_bw, maxf, minf)
- head = gr.head(gr.sizeof_gr_complex, int (freq))
- dst = gr.vector_sink_c()
+ head = blocks.head(gr.sizeof_gr_complex, int (freq))
+ dst = blocks.vector_sink_c()
self.tb.connect(src, pll, head)
self.tb.connect(head, dst)
diff --git a/gr-analog/python/analog/qa_probe_avg_mag_sqrd.py b/gr-analog/python/analog/qa_probe_avg_mag_sqrd.py
index b4a61af71a..a52c0806e3 100755
--- a/gr-analog/python/analog/qa_probe_avg_mag_sqrd.py
+++ b/gr-analog/python/analog/qa_probe_avg_mag_sqrd.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -22,7 +22,7 @@
import math
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
def avg_mag_sqrd_c(x, alpha):
y = [0,]
@@ -52,7 +52,7 @@ class test_probe_avg_mag_sqrd(gr_unittest.TestCase):
6.0+6.0j, 7.0+7.0j, 8.0+8.0j, 9.0+9.0j, 10.0+10.0j]
expected_result = avg_mag_sqrd_c(src_data, alpha)[-1]
- src = gr.vector_source_c(src_data)
+ src = blocks.vector_source_c(src_data)
op = analog.probe_avg_mag_sqrd_c(0, alpha)
self.tb.connect(src, op)
@@ -67,9 +67,9 @@ class test_probe_avg_mag_sqrd(gr_unittest.TestCase):
6.0+6.0j, 7.0+7.0j, 8.0+8.0j, 9.0+9.0j, 10.0+10.0j]
expected_result = avg_mag_sqrd_c(src_data, alpha)[0:-1]
- src = gr.vector_source_c(src_data)
+ src = blocks.vector_source_c(src_data)
op = analog.probe_avg_mag_sqrd_cf(0, alpha)
- dst = gr.vector_sink_f()
+ dst = blocks.vector_sink_f()
self.tb.connect(src, op)
self.tb.connect(op, dst)
@@ -84,7 +84,7 @@ class test_probe_avg_mag_sqrd(gr_unittest.TestCase):
6.0, 7.0, 8.0, 9.0, 10.0]
expected_result = avg_mag_sqrd_f(src_data, alpha)[-1]
- src = gr.vector_source_f(src_data)
+ src = blocks.vector_source_f(src_data)
op = analog.probe_avg_mag_sqrd_f(0, alpha)
self.tb.connect(src, op)
diff --git a/gr-analog/python/analog/qa_pwr_squelch.py b/gr-analog/python/analog/qa_pwr_squelch.py
index c5f0b8b9b1..e366192f68 100755
--- a/gr-analog/python/analog/qa_pwr_squelch.py
+++ b/gr-analog/python/analog/qa_pwr_squelch.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -20,7 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
class test_pwr_squelch(gr_unittest.TestCase):
@@ -62,9 +62,9 @@ class test_pwr_squelch(gr_unittest.TestCase):
thr = -25
src_data = map(lambda x: float(x)/10.0, range(1, 40))
- src = gr.vector_source_c(src_data)
+ src = blocks.vector_source_c(src_data)
op = analog.pwr_squelch_cc(thr, alpha)
- dst = gr.vector_sink_c()
+ dst = blocks.vector_sink_c()
self.tb.connect(src, op)
self.tb.connect(op, dst)
@@ -108,9 +108,9 @@ class test_pwr_squelch(gr_unittest.TestCase):
thr = -25
src_data = map(lambda x: float(x)/10.0, range(1, 40))
- src = gr.vector_source_f(src_data)
+ src = blocks.vector_source_f(src_data)
op = analog.pwr_squelch_ff(thr, alpha)
- dst = gr.vector_sink_f()
+ dst = blocks.vector_sink_f()
self.tb.connect(src, op)
self.tb.connect(op, dst)
diff --git a/gr-analog/python/analog/qa_quadrature_demod.py b/gr-analog/python/analog/qa_quadrature_demod.py
index 93863ee435..bcf9aaa17f 100755
--- a/gr-analog/python/analog/qa_quadrature_demod.py
+++ b/gr-analog/python/analog/qa_quadrature_demod.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -22,7 +22,7 @@
import cmath
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
class test_quadrature_demod(gr_unittest.TestCase):
@@ -47,9 +47,9 @@ class test_quadrature_demod(gr_unittest.TestCase):
expected_result = [0,] + 199*[1.0]
- src = gr.vector_source_c(src_data)
+ src = blocks.vector_source_c(src_data)
op = analog.quadrature_demod_cf(gain)
- dst = gr.vector_sink_f()
+ dst = blocks.vector_sink_f()
self.tb.connect(src, op)
self.tb.connect(op, dst)
diff --git a/gr-analog/python/analog/qa_rail_ff.py b/gr-analog/python/analog/qa_rail_ff.py
index 05f3801b6f..4a7d3f3f7d 100755
--- a/gr-analog/python/analog/qa_rail_ff.py
+++ b/gr-analog/python/analog/qa_rail_ff.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -20,7 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
def clip(x, lo, hi):
if(x < lo):
@@ -62,9 +62,9 @@ class test_rail(gr_unittest.TestCase):
src_data = [-2, -1, -0.5, -0.25, 0, 0.25, 0.5, 1, 2]
expected_result = map(lambda x: clip(x, lo, hi), src_data)
- src = gr.vector_source_f(src_data)
+ src = blocks.vector_source_f(src_data)
op = analog.rail_ff(lo, hi)
- dst = gr.vector_sink_f()
+ dst = blocks.vector_sink_f()
self.tb.connect(src, op)
self.tb.connect(op, dst)
diff --git a/gr-analog/python/analog/qa_sig_source.py b/gr-analog/python/analog/qa_sig_source.py
index 8fa1e7096a..5ee4f24af8 100755
--- a/gr-analog/python/analog/qa_sig_source.py
+++ b/gr-analog/python/analog/qa_sig_source.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,7 +22,7 @@
import math
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
class test_sig_source(gr_unittest.TestCase):
@@ -36,8 +36,8 @@ class test_sig_source(gr_unittest.TestCase):
tb = self.tb
expected_result = (1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5)
src1 = analog.sig_source_f(1e6, analog.GR_CONST_WAVE, 0, 1.5)
- op = gr.head(gr.sizeof_float, 10)
- dst1 = gr.vector_sink_f()
+ op = blocks.head(gr.sizeof_float, 10)
+ dst1 = blocks.vector_sink_f()
tb.connect(src1, op)
tb.connect(op, dst1)
tb.run()
@@ -48,8 +48,8 @@ class test_sig_source(gr_unittest.TestCase):
tb = self.tb
expected_result = (1, 1, 1, 1)
src1 = analog.sig_source_i(1e6, analog.GR_CONST_WAVE, 0, 1)
- op = gr.head(gr.sizeof_int, 4)
- dst1 = gr.vector_sink_i()
+ op = blocks.head(gr.sizeof_int, 4)
+ dst1 = blocks.vector_sink_i()
tb.connect(src1, op)
tb.connect(op, dst1)
tb.run()
@@ -61,8 +61,8 @@ class test_sig_source(gr_unittest.TestCase):
sqrt2 = math.sqrt(2) / 2
expected_result = (0, sqrt2, 1, sqrt2, 0, -sqrt2, -1, -sqrt2, 0)
src1 = analog.sig_source_f(8, analog.GR_SIN_WAVE, 1.0, 1.0)
- op = gr.head(gr.sizeof_float, 9)
- dst1 = gr.vector_sink_f()
+ op = blocks.head(gr.sizeof_float, 9)
+ dst1 = blocks.vector_sink_f()
tb.connect(src1, op)
tb.connect(op, dst1)
tb.run()
@@ -74,8 +74,8 @@ class test_sig_source(gr_unittest.TestCase):
sqrt2 = math.sqrt(2) / 2
expected_result = (1, sqrt2, 0, -sqrt2, -1, -sqrt2, 0, sqrt2, 1)
src1 = analog.sig_source_f(8, analog.GR_COS_WAVE, 1.0, 1.0)
- op = gr.head(gr.sizeof_float, 9)
- dst1 = gr.vector_sink_f()
+ op = blocks.head(gr.sizeof_float, 9)
+ dst1 = blocks.vector_sink_f()
tb.connect(src1, op)
tb.connect(op, dst1)
tb.run()
@@ -86,8 +86,8 @@ class test_sig_source(gr_unittest.TestCase):
tb = self.tb #arg6 is a bit before -PI/2
expected_result = (1j, 1j, 0, 0, 1, 1, 1+0j, 1+1j, 1j)
src1 = analog.sig_source_c(8, analog.GR_SQR_WAVE, 1.0, 1.0)
- op = gr.head(gr.sizeof_gr_complex, 9)
- dst1 = gr.vector_sink_c()
+ op = blocks.head(gr.sizeof_gr_complex, 9)
+ dst1 = blocks.vector_sink_c()
tb.connect(src1, op)
tb.connect(op, dst1)
tb.run()
@@ -99,8 +99,8 @@ class test_sig_source(gr_unittest.TestCase):
expected_result = (1+.5j, .75+.75j, .5+1j, .25+.75j, 0+.5j,
.25+.25j, .5+0j, .75+.25j, 1+.5j)
src1 = analog.sig_source_c(8, analog.GR_TRI_WAVE, 1.0, 1.0)
- op = gr.head(gr.sizeof_gr_complex, 9)
- dst1 = gr.vector_sink_c()
+ op = blocks.head(gr.sizeof_gr_complex, 9)
+ dst1 = blocks.vector_sink_c()
tb.connect(src1, op)
tb.connect(op, dst1)
tb.run()
@@ -112,8 +112,8 @@ class test_sig_source(gr_unittest.TestCase):
expected_result = (.5+.25j, .625+.375j, .75+.5j, .875+.625j,
0+.75j, .125+.875j, .25+1j, .375+.125j, .5+.25j)
src1 = analog.sig_source_c(8, analog.GR_SAW_WAVE, 1.0, 1.0)
- op = gr.head(gr.sizeof_gr_complex, 9)
- dst1 = gr.vector_sink_c()
+ op = blocks.head(gr.sizeof_gr_complex, 9)
+ dst1 = blocks.vector_sink_c()
tb.connect(src1, op)
tb.connect(op, dst1)
tb.run()
@@ -124,8 +124,8 @@ class test_sig_source(gr_unittest.TestCase):
tb = self.tb
expected_result = (0, 0, 0, 0, 1, 1, 1, 1, 0)
src1 = analog.sig_source_f(8, analog.GR_SQR_WAVE, 1.0, 1.0)
- op = gr.head(gr.sizeof_float, 9)
- dst1 = gr.vector_sink_f()
+ op = blocks.head(gr.sizeof_float, 9)
+ dst1 = blocks.vector_sink_f()
tb.connect(src1, op)
tb.connect(op, dst1)
tb.run()
@@ -136,8 +136,8 @@ class test_sig_source(gr_unittest.TestCase):
tb = self.tb
expected_result = (1, .75, .5, .25, 0, .25, .5, .75, 1)
src1 = analog.sig_source_f(8, analog.GR_TRI_WAVE, 1.0, 1.0)
- op = gr.head(gr.sizeof_float, 9)
- dst1 = gr.vector_sink_f()
+ op = blocks.head(gr.sizeof_float, 9)
+ dst1 = blocks.vector_sink_f()
tb.connect(src1, op)
tb.connect(op, dst1)
tb.run()
@@ -148,8 +148,8 @@ class test_sig_source(gr_unittest.TestCase):
tb = self.tb
expected_result = (.5, .625, .75, .875, 0, .125, .25, .375, .5)
src1 = analog.sig_source_f(8, analog.GR_SAW_WAVE, 1.0, 1.0)
- op = gr.head(gr.sizeof_float, 9)
- dst1 = gr.vector_sink_f()
+ op = blocks.head(gr.sizeof_float, 9)
+ dst1 = blocks.vector_sink_f()
tb.connect(src1, op)
tb.connect(op, dst1)
tb.run()
diff --git a/gr-analog/python/analog/qa_simple_squelch.py b/gr-analog/python/analog/qa_simple_squelch.py
index baad3166c8..35f28a6122 100755
--- a/gr-analog/python/analog/qa_simple_squelch.py
+++ b/gr-analog/python/analog/qa_simple_squelch.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -20,7 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, gr_unittest, analog
+from gnuradio import gr, gr_unittest, analog, blocks
class test_simple_squelch(gr_unittest.TestCase):
@@ -49,9 +49,9 @@ class test_simple_squelch(gr_unittest.TestCase):
thr = -25
src_data = map(lambda x: float(x)/10.0, range(1, 40))
- src = gr.vector_source_c(src_data)
+ src = blocks.vector_source_c(src_data)
op = analog.simple_squelch_cc(thr, alpha)
- dst = gr.vector_sink_c()
+ dst = blocks.vector_sink_c()
self.tb.connect(src, op)
self.tb.connect(op, dst)
diff --git a/gr-analog/python/analog/wfm_rcv_fmdet.py b/gr-analog/python/analog/wfm_rcv_fmdet.py
index f3627d378d..b7cd1458fb 100644
--- a/gr-analog/python/analog/wfm_rcv_fmdet.py
+++ b/gr-analog/python/analog/wfm_rcv_fmdet.py
@@ -1,5 +1,5 @@
#
-# Copyright 2005,2006,2012 Free Software Foundation, Inc.
+# Copyright 2005,2006,2012-2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -132,7 +132,7 @@ class wfm_rcv_fmdet(gr.hier_block2):
stereo_rds_filter_coeffs)
self.rds_carrier_generator = blocks.multiply_cc();
self.rds_signal_generator = blocks.multiply_cc();
- self_rds_signal_processor = gr.null_sink(gr.sizeof_gr_complex);
+ self_rds_signal_processor = blocks.null_sink(gr.sizeof_gr_complex);
loop_bw = 2*math.pi/100.0
max_freq = -2.0*math.pi*18990/audio_rate;
diff --git a/gr-analog/python/analog/wfm_rcv_pll.py b/gr-analog/python/analog/wfm_rcv_pll.py
index 7452de731f..282e2b14be 100644
--- a/gr-analog/python/analog/wfm_rcv_pll.py
+++ b/gr-analog/python/analog/wfm_rcv_pll.py
@@ -1,5 +1,5 @@
#
-# Copyright 2005,2006,2012 Free Software Foundation, Inc.
+# Copyright 2005,2006,2012-2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -125,7 +125,7 @@ class wfm_rcv_pll(gr.hier_block2):
self.rds_carrier_generator = blocks.multiply_cc();
self.rds_signal_generator = blocks.multiply_cc();
- self_rds_signal_processor = gr.null_sink(gr.sizeof_gr_complex);
+ self_rds_signal_processor = blocks.null_sink(gr.sizeof_gr_complex);
loop_bw = 2*math.pi/100.0
max_freq = -2.0*math.pi*18990/audio_rate;
diff --git a/gr-analog/swig/CMakeLists.txt b/gr-analog/swig/CMakeLists.txt
index 4391e5e09a..5c940e66af 100644
--- a/gr-analog/swig/CMakeLists.txt
+++ b/gr-analog/swig/CMakeLists.txt
@@ -24,15 +24,16 @@ include(GrPython)
include(GrSwig)
set(GR_SWIG_INCLUDE_DIRS
+ ${GR_BLOCKS_INCLUDE_DIRS}
${GR_ANALOG_INCLUDE_DIRS}
${GR_FILTER_INCLUDE_DIRS}
- ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
- ${GRUEL_INCLUDE_DIRS}
+ ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/analog_swig_doc.i)
-set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../lib)
+set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/analog)
+set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
set(GR_SWIG_TARGET_DEPS analog_generated_includes)
set(GR_SWIG_LIBRARIES gnuradio-analog gnuradio-filter)
diff --git a/gr-analog/swig/analog_swig.i b/gr-analog/swig/analog_swig.i
index ab7beb3c0f..9ae019ad8e 100644
--- a/gr-analog/swig/analog_swig.i
+++ b/gr-analog/swig/analog_swig.i
@@ -20,14 +20,20 @@
*/
#define ANALOG_API
+#define BLOCKS_API
-%include "gnuradio.i"
+%include "runtime_swig.i"
%include "stdint.i"
//load generated python docstrings
%include "analog_swig_doc.i"
%{
+#include <blocks/control_loop.h>
+%}
+%include <blocks/control_loop.h>
+
+%{
#include "analog/cpm.h"
#include "analog/noise_type.h"
#include "analog/agc_cc.h"
@@ -59,7 +65,6 @@
#include "analog/pwr_squelch_ff.h"
#include "analog/quadrature_demod_cf.h"
#include "analog/rail_ff.h"
-#include "analog/sincos.h"
#include "analog/sig_source_s.h"
#include "analog/sig_source_i.h"
#include "analog/sig_source_f.h"
@@ -101,7 +106,6 @@
%include "analog/pwr_squelch_ff.h"
%include "analog/quadrature_demod_cf.h"
%include "analog/rail_ff.h"
-%include "analog/sincos.h"
%include "analog/sig_source_s.h"
%include "analog/sig_source_i.h"
%include "analog/sig_source_f.h"