From 4df03f7bb6c99bb22f41d21e6c65c1b41e00ff05 Mon Sep 17 00:00:00 2001 From: jblum Date: Wed, 8 Oct 2008 03:48:33 +0000 Subject: probe hier wrappers git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9741 221aa14e-8319-0410-a670-987f0aec2ac5 --- grc/data/platforms/python/block_tree.xml | 1 - grc/data/platforms/python/blocks/Makefile.am | 1 - .../python/blocks/gr_probe_avg_mag_sqrd_x.xml | 30 +++++++------- .../platforms/python/blocks/gr_probe_density_b.xml | 28 ++++++------- .../python/blocks/gr_probe_mpsk_snr_c.xml | 48 ++++++++++++++-------- .../platforms/python/blocks/gr_probe_signal_f.xml | 31 -------------- .../platforms/python/blocks/wxgui_numbersink2.xml | 2 +- 7 files changed, 63 insertions(+), 78 deletions(-) delete mode 100644 grc/data/platforms/python/blocks/gr_probe_signal_f.xml (limited to 'grc/data') diff --git a/grc/data/platforms/python/block_tree.xml b/grc/data/platforms/python/block_tree.xml index a234001d8..5e2d8f50c 100644 --- a/grc/data/platforms/python/block_tree.xml +++ b/grc/data/platforms/python/block_tree.xml @@ -241,7 +241,6 @@ gr_probe_avg_mag_sqrd_x gr_probe_density_b gr_probe_mpsk_snr_c - gr_probe_signal_f USRP diff --git a/grc/data/platforms/python/blocks/Makefile.am b/grc/data/platforms/python/blocks/Makefile.am index 2d4eec56c..1e4d3f7fc 100644 --- a/grc/data/platforms/python/blocks/Makefile.am +++ b/grc/data/platforms/python/blocks/Makefile.am @@ -141,7 +141,6 @@ dist_ourdata_DATA = \ gr_probe_avg_mag_sqrd_x.xml \ gr_probe_density_b.xml \ gr_probe_mpsk_snr_c.xml \ - gr_probe_signal_f.xml \ gr_pwr_squelch_xx.xml \ gr_quadrature_demod_cf.xml \ gr_rational_resampler_base_xxx.xml \ diff --git a/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml b/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml index cbd8446cd..eb855956a 100644 --- a/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml +++ b/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml @@ -7,19 +7,15 @@ Probe Avg Mag^2 gr_probe_avg_mag_sqrd_x - from gnuradio import gr - import threading - import time - gr.probe_avg_mag_sqrd_$(type)($threshold, $alpha) -def _$(id)_run(): - while True: - time.sleep($update_interval) - print "$(id) Level:", self.$(id).level() -_$(id)_thread = threading.Thread(target=_$(id)_run) -_$(id)_thread.setDaemon(True) -_$(id)_thread.start() + from grc_gnuradio import blks2 as grc_blks2 + grc_blks2.probe_avg_mag_sqrd_$(type)( + threshold=$threshold, + alpha=$alpha, + probe_rate=$probe_rate, +) set_alpha($alpha) set_threshold($threshold) + set_probe_rate($probe_rate) Type type @@ -38,21 +34,27 @@ _$(id)_thread.start() Threshold (dB) threshold + 0 real Alpha alpha + 1 real - Update Interval (s) - update_interval - 1.0 + Probe Rate + probe_rate + 10 real in $type.input + + out + float + diff --git a/grc/data/platforms/python/blocks/gr_probe_density_b.xml b/grc/data/platforms/python/blocks/gr_probe_density_b.xml index 4c5b9e2fa..74d3b0a2b 100644 --- a/grc/data/platforms/python/blocks/gr_probe_density_b.xml +++ b/grc/data/platforms/python/blocks/gr_probe_density_b.xml @@ -7,31 +7,31 @@ Probe Density gr_probe_density_b - from gnuradio import gr - import threading - import time - gr.probe_density_b($alpha) -def _$(id)_run(): - while True: - time.sleep($update_interval) - print "$(id) Density:", self.$(id).density() -_$(id)_thread = threading.Thread(target=_$(id)_run) -_$(id)_thread.setDaemon(True) -_$(id)_thread.start() + from grc_gnuradio import blks2 as grc_blks2 + grc_blks2.probe_density_b( + alpha=$alpha, + probe_rate=$probe_rate, +) set_alpha($alpha) + set_probe_rate($probe_rate) Alpha alpha + 1 real - Update Interval (s) - update_interval - 1.0 + Probe Rate + probe_rate + 10 real in byte + + out + float + diff --git a/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml b/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml index ec80d092d..655eb7c0d 100644 --- a/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml +++ b/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml @@ -7,33 +7,49 @@ Probe MPSK SNR gr_probe_mpsk_snr_c - from gnuradio import gr - import threading - import time - gr.probe_mpsk_snr_c($alpha) -def _$(id)_run(): - while True: - time.sleep($update_interval) - print "$(id) Signal Mean:", self.$(id).signal_mean() - print "$(id) Noise Variance:", self.$(id).noise_variance() - print "$(id) SNR:", self.$(id).snr() -_$(id)_thread = threading.Thread(target=_$(id)_run) -_$(id)_thread.setDaemon(True) -_$(id)_thread.start() + from grc_gnuradio import blks2 as grc_blks2 + grc_blks2.probe_mpsk_snr_c( + type="$type", + alpha=$alpha, + probe_rate=$probe_rate, +) set_alpha($alpha) + set_probe_rate($probe_rate) + + Type + type + enum + + + + Alpha alpha + 1 real - Update Interval (s) - update_interval - 1.0 + Probe Rate + probe_rate + 10 real in complex + + out + float + diff --git a/grc/data/platforms/python/blocks/gr_probe_signal_f.xml b/grc/data/platforms/python/blocks/gr_probe_signal_f.xml deleted file mode 100644 index 688887f47..000000000 --- a/grc/data/platforms/python/blocks/gr_probe_signal_f.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - Probe Signal - gr_probe_signal_f - from gnuradio import gr - import threading - import time - gr.probe_signal_f() -def _$(id)_run(): - while True: - time.sleep($update_interval) - print "$(id) Level:", self.$(id).level() -_$(id)_thread = threading.Thread(target=_$(id)_run) -_$(id)_thread.setDaemon(True) -_$(id)_thread.start() - - Update Interval (s) - update_interval - 1.0 - real - - - in - float - - diff --git a/grc/data/platforms/python/blocks/wxgui_numbersink2.xml b/grc/data/platforms/python/blocks/wxgui_numbersink2.xml index e54da3e61..c3a8c52bd 100644 --- a/grc/data/platforms/python/blocks/wxgui_numbersink2.xml +++ b/grc/data/platforms/python/blocks/wxgui_numbersink2.xml @@ -102,7 +102,7 @@ self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos Reference Level ref_level - 50 + 0 real -- cgit