summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
Diffstat (limited to 'grc')
-rw-r--r--grc/.gitignore3
-rw-r--r--grc/CMakeLists.txt9
-rw-r--r--grc/Makefile.am49
-rw-r--r--grc/base/.gitignore2
-rw-r--r--grc/base/CMakeLists.txt8
-rw-r--r--grc/base/Makefile.am41
-rw-r--r--grc/base/Platform.py2
-rw-r--r--grc/base/block_tree.dtd6
-rw-r--r--grc/base/flow_graph.dtd6
-rw-r--r--grc/blocks/.gitignore2
-rw-r--r--grc/blocks/CMakeLists.txt8
-rw-r--r--grc/blocks/Makefile.am200
-rw-r--r--grc/blocks/blks2_pfb_arb_resampler.xml2
-rw-r--r--grc/blocks/blks2_pfb_channelizer.xml11
-rw-r--r--grc/blocks/block_tree.xml3
-rw-r--r--grc/blocks/gr_pfb_synthesizer.xml (renamed from grc/blocks/gr_pfb_synthesis_filterbank.xml)22
-rw-r--r--grc/blocks/gr_probe_mpsk_snr_c.xml28
-rw-r--r--grc/examples/CMakeLists.txt (renamed from grc/scripts/Makefile.am)29
-rw-r--r--grc/examples/simple/variable_config.grc329
-rw-r--r--grc/examples/xmlrpc/readme.txt18
-rw-r--r--grc/examples/xmlrpc/xmlrpc_client.grc312
-rw-r--r--grc/examples/xmlrpc/xmlrpc_client_script.py23
-rw-r--r--grc/examples/xmlrpc/xmlrpc_server.grc384
-rw-r--r--grc/freedesktop/.gitignore3
-rw-r--r--grc/freedesktop/CMakeLists.txt8
-rw-r--r--grc/freedesktop/Makefile.am55
-rw-r--r--grc/grc_gnuradio/.gitignore3
-rw-r--r--grc/grc_gnuradio/Makefile.am35
-rw-r--r--grc/gui/.gitignore2
-rw-r--r--grc/gui/ActionHandler.py2
-rw-r--r--grc/gui/BlockTreeWindow.py2
-rw-r--r--grc/gui/Makefile.am49
-rw-r--r--grc/python/.gitignore2
-rw-r--r--grc/python/CMakeLists.txt8
-rw-r--r--grc/python/Makefile.am43
-rw-r--r--grc/python/Param.py2
-rw-r--r--grc/python/Port.py57
-rw-r--r--grc/scripts/.gitignore2
-rw-r--r--grc/scripts/CMakeLists.txt8
-rw-r--r--grc/todo.txt2
40 files changed, 1203 insertions, 577 deletions
diff --git a/grc/.gitignore b/grc/.gitignore
deleted file mode 100644
index 8e70007d6..000000000
--- a/grc/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/grc.conf
-/Makefile
-/Makefile.in
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
index 997aa56b1..f54aa4f80 100644
--- a/grc/CMakeLists.txt
+++ b/grc/CMakeLists.txt
@@ -1,17 +1,17 @@
# Copyright 2011 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,
@@ -121,5 +121,6 @@ add_subdirectory(grc_gnuradio)
add_subdirectory(gui)
add_subdirectory(python)
add_subdirectory(scripts)
+add_subdirectory(examples)
endif(ENABLE_GRC)
diff --git a/grc/Makefile.am b/grc/Makefile.am
deleted file mode 100644
index addefcf36..000000000
--- a/grc/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Copyright 2008-2011 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.
-#
-
-include $(top_srcdir)/Makefile.common
-
-if PYTHON
-SUBDIRS = \
- base \
- blocks \
- freedesktop \
- grc_gnuradio \
- gui \
- python \
- scripts
-
-ourpythondir = $(pkgpythondir)/grc
-ourpython_PYTHON = __init__.py
-
-etcdir = $(gr_prefsdir)
-dist_etc_DATA = grc.conf
-
-EXTRA_DIST += $(srcdir)/grc.conf.in
-
-BUILT_SOURCES += grc.conf
-
-grc.conf: $(srcdir)/grc.conf.in Makefile
- sed \
- -e 's|@blocksdir[@]|$(grc_blocksdir)|g' \
- $< > $@
-
-endif
diff --git a/grc/base/.gitignore b/grc/base/.gitignore
deleted file mode 100644
index b336cc7ce..000000000
--- a/grc/base/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/grc/base/CMakeLists.txt b/grc/base/CMakeLists.txt
index c6d6a09eb..1087e842a 100644
--- a/grc/base/CMakeLists.txt
+++ b/grc/base/CMakeLists.txt
@@ -1,17 +1,17 @@
# Copyright 2011 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,
diff --git a/grc/base/Makefile.am b/grc/base/Makefile.am
deleted file mode 100644
index 6a95e33b9..000000000
--- a/grc/base/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright 2008, 2009 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.
-#
-
-include $(top_srcdir)/Makefile.common
-
-ourpythondir = $(pkgpythondir)/grc/base
-ourpython_PYTHON = \
- odict.py \
- ParseXML.py \
- Block.py \
- Connection.py \
- Constants.py \
- Element.py \
- FlowGraph.py \
- Param.py \
- Platform.py \
- Port.py \
- __init__.py
-
-ourdatadir = $(pkgpythondir)/grc/base
-dist_ourdata_DATA = \
- block_tree.dtd \
- flow_graph.dtd
diff --git a/grc/base/Platform.py b/grc/base/Platform.py
index a66c28ab9..94d0077ea 100644
--- a/grc/base/Platform.py
+++ b/grc/base/Platform.py
@@ -87,7 +87,7 @@ class Platform(_Element):
else:
self._blocks[key] = block
self._blocks_n[key] = n
- except ParseXML.XMLSyntaxError, e:
+ except ParseXML.XMLSyntaxError, e:
try: #try to add the xml file as a block tree
ParseXML.validate_dtd(xml_file, BLOCK_TREE_DTD)
self._block_tree_files.append(xml_file)
diff --git a/grc/base/block_tree.dtd b/grc/base/block_tree.dtd
index be1524a38..7d4a13ccc 100644
--- a/grc/base/block_tree.dtd
+++ b/grc/base/block_tree.dtd
@@ -1,4 +1,4 @@
-<!--
+<!--
Copyright 2008 Free Software Foundation, Inc.
This file is part of GNU Radio
@@ -14,10 +14,10 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-->
<!--
- block_tree.dtd
+ block_tree.dtd
Josh Blum
The document type definition for a block tree category listing.
-->
diff --git a/grc/base/flow_graph.dtd b/grc/base/flow_graph.dtd
index 904147b37..74f48f10a 100644
--- a/grc/base/flow_graph.dtd
+++ b/grc/base/flow_graph.dtd
@@ -1,4 +1,4 @@
-<!--
+<!--
Copyright 2008 Free Software Foundation, Inc.
This file is part of GNU Radio
@@ -14,10 +14,10 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-->
<!--
- flow_graph.dtd
+ flow_graph.dtd
Josh Blum
The document type definition for flow graph xml files.
-->
diff --git a/grc/blocks/.gitignore b/grc/blocks/.gitignore
deleted file mode 100644
index b336cc7ce..000000000
--- a/grc/blocks/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/grc/blocks/CMakeLists.txt b/grc/blocks/CMakeLists.txt
index ad31b0975..fce4a1907 100644
--- a/grc/blocks/CMakeLists.txt
+++ b/grc/blocks/CMakeLists.txt
@@ -1,17 +1,17 @@
# Copyright 2011 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,
diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am
deleted file mode 100644
index 37f493ce5..000000000
--- a/grc/blocks/Makefile.am
+++ /dev/null
@@ -1,200 +0,0 @@
-#
-# Copyright 2008-2011 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.
-#
-
-include $(top_srcdir)/Makefile.common
-
-ourdatadir = $(grc_blocksdir)
-dist_ourdata_DATA = \
- block_tree.xml \
- band_pass_filter.xml \
- band_reject_filter.xml \
- blks2_am_demod_cf.xml \
- blks2_analysis_filterbank.xml \
- blks2_error_rate.xml \
- blks2_fm_deemph.xml \
- blks2_fm_demod_cf.xml \
- blks2_fm_preemph.xml \
- blks2_logpwrfft_x.xml \
- blks2_nbfm_rx.xml \
- blks2_nbfm_tx.xml \
- blks2_packet_decoder.xml \
- blks2_packet_encoder.xml \
- blks2_pfb_arb_resampler.xml \
- blks2_pfb_channelizer.xml \
- blks2_rational_resampler_xxx.xml \
- blks2_selector.xml \
- blks2_standard_squelch.xml \
- blks2_stream_to_vector_decimator.xml \
- blks2_synthesis_filterbank.xml \
- blks2_tcp_sink.xml \
- blks2_tcp_source.xml \
- blks2_valve.xml \
- blks2_wfm_rcv.xml \
- blks2_wfm_rcv_pll.xml \
- blks2_wfm_tx.xml \
- const_source_x.xml \
- gr_add_const_vxx.xml \
- gr_add_xx.xml \
- gr_additive_scrambler_bb.xml \
- gr_agc2_xx.xml \
- gr_agc_xx.xml \
- gr_and_xx.xml \
- gr_and_const_xx.xml \
- gr_argmax_xx.xml \
- gr_channel_model.xml \
- gr_char_to_float.xml \
- gr_char_to_short.xml \
- gr_chunks_to_symbols.xml \
- gr_complex_to_arg.xml \
- gr_complex_to_float.xml \
- gr_complex_to_imag.xml \
- gr_complex_to_interleaved_short.xml \
- gr_complex_to_mag.xml \
- gr_complex_to_mag_squared.xml \
- gr_complex_to_real.xml \
- gr_conjugate_cc.xml \
- gr_copy.xml \
- gr_cpfsk_bc.xml \
- gr_ctcss_squelch_ff.xml \
- gr_dc_blocker.xml \
- gr_decode_ccsds_27_fb.xml \
- gr_deinterleave.xml \
- gr_delay.xml \
- gr_descrambler_bb.xml \
- gr_diff_decoder_bb.xml \
- gr_diff_encoder_bb.xml \
- gr_diff_phasor_cc.xml \
- gr_divide_xx.xml \
- gr_dpll_bb.xml \
- gr_encode_ccsds_27_bb.xml \
- gr_feedforward_agc_cc.xml \
- gr_fft_filter_xxx.xml \
- gr_fft_vxx.xml \
- gr_file_sink.xml \
- gr_file_source.xml \
- gr_filter_delay_fc.xml \
- gr_fir_filter_xxx.xml \
- gr_float_to_char.xml \
- gr_float_to_complex.xml \
- gr_float_to_int.xml \
- gr_float_to_short.xml \
- gr_float_to_uchar.xml \
- gr_fractional_interpolator_xx.xml \
- gr_freq_xlating_fir_filter_xxx.xml \
- gr_frequency_modulator_fc.xml \
- gr_glfsr_source_x.xml \
- gr_goertzel_fc.xml \
- gr_head.xml \
- gr_hilbert_fc.xml \
- gr_iir_filter_ffd.xml \
- gr_int_to_float.xml \
- gr_integrate_xx.xml \
- gr_interleave.xml \
- gr_interleaved_short_to_complex.xml \
- gr_interp_fir_filter_xxx.xml \
- gr_iqcomp_cc.xml \
- gr_keep_one_in_n.xml \
- gr_kludge_copy.xml \
- gr_map_bb.xml \
- gr_max_xx.xml \
- gr_message_sink.xml \
- gr_message_source.xml \
- gr_moving_average_xx.xml \
- gr_mpsk_sync_cc.xml \
- gr_multiply_const_vxx.xml \
- gr_multiply_xx.xml \
- gr_mute_xx.xml \
- gr_nlog10_ff.xml \
- gr_noise_source_x.xml \
- gr_nop.xml \
- gr_not_xx.xml \
- gr_null_sink.xml \
- gr_null_source.xml \
- gr_or_xx.xml \
- gr_packed_to_unpacked_xx.xml \
- gr_peak_detector2_fb.xml \
- gr_peak_detector_xb.xml \
- gr_pfb_clock_sync.xml \
- gr_pfb_synthesis_filterbank.xml \
- gr_phase_modulator_fc.xml \
- gr_pll_carriertracking_cc.xml \
- gr_pll_freqdet_cf.xml \
- gr_pll_refout_cc.xml \
- gr_pn_correlator_cc.xml \
- 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 \
- gr_repeat.xml \
- gr_rms_xx.xml \
- gr_sample_and_hold_xx.xml \
- gr_scrambler_bb.xml \
- gr_short_to_float.xml \
- gr_short_to_char.xml \
- gr_sig_source_x.xml \
- gr_simple_correlator.xml \
- gr_simple_framer.xml \
- gr_simple_squelch_cc.xml \
- gr_single_pole_iir_filter_xx.xml \
- gr_skiphead.xml \
- gr_stream_mux.xml \
- gr_stream_to_streams.xml \
- gr_stream_to_vector.xml \
- gr_streams_to_stream.xml \
- gr_streams_to_vector.xml \
- gr_burst_tagger.xml \
- gr_sub_xx.xml \
- gr_threshold_ff.xml \
- gr_throttle.xml \
- gr_transcendental.xml \
- gr_uchar_to_float.xml \
- gr_udp_sink.xml \
- gr_udp_source.xml \
- gr_unpack_k_bits_bb.xml \
- gr_unpacked_to_packed_xx.xml \
- gr_vco_f.xml \
- gr_vector_sink_x.xml \
- gr_vector_source_x.xml \
- gr_vector_to_stream.xml \
- gr_vector_to_streams.xml \
- gr_wavfile_sink.xml \
- gr_wavfile_source.xml \
- gr_xor_xx.xml \
- high_pass_filter.xml \
- import.xml \
- low_pass_filter.xml \
- note.xml \
- options.xml \
- pad_sink.xml \
- pad_source.xml \
- parameter.xml \
- random_source_x.xml \
- root_raised_cosine_filter.xml \
- variable.xml \
- variable_config.xml \
- variable_function_probe.xml \
- virtual_sink.xml \
- virtual_source.xml \
- xmlrpc_client.xml \
- xmlrpc_server.xml
diff --git a/grc/blocks/blks2_pfb_arb_resampler.xml b/grc/blocks/blks2_pfb_arb_resampler.xml
index b4e09791f..b58e70f1c 100644
--- a/grc/blocks/blks2_pfb_arb_resampler.xml
+++ b/grc/blocks/blks2_pfb_arb_resampler.xml
@@ -14,7 +14,7 @@
$taps,
$size,
)</make>
- <!-- Set taps not implemented yet
+ <!-- Set taps not implemented yet
<callback>set_taps($taps)</callback>
-->
<callback>set_rate($rate)</callback>
diff --git a/grc/blocks/blks2_pfb_channelizer.xml b/grc/blocks/blks2_pfb_channelizer.xml
index aee9dd512..5a93c0866 100644
--- a/grc/blocks/blks2_pfb_channelizer.xml
+++ b/grc/blocks/blks2_pfb_channelizer.xml
@@ -14,10 +14,13 @@
$taps,
$osr,
$atten)
+self.$(id).set_channel_map($ch_map)
</make>
- <!-- Set taps not implemented yet
+ <!-- Set taps not implemented yet
<callback>set_taps($taps)</callback>
-->
+ <callback>set_channel_map($ch_map)</callback>
+
<param>
<name>Channels</name>
<key>nchans</key>
@@ -41,6 +44,12 @@
<value>100</value>
<type>real</type>
</param>
+ <param>
+ <name>Channel Map</name>
+ <key>ch_map</key>
+ <value>[]</value>
+ <type>int_vector</type>
+ </param>
<sink>
<name>in</name>
<type>complex</type>
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml
index 42187585e..18bc050ba 100644
--- a/grc/blocks/block_tree.xml
+++ b/grc/blocks/block_tree.xml
@@ -174,7 +174,7 @@
<!-- Polyphase filters -->
<block>blks2_pfb_arb_resampler_ccf</block>
<block>blks2_pfb_channelizer_ccf</block>
- <block>gr_pfb_synthesis_filterbank_ccf</block>
+ <block>gr_pfb_synthesizer_ccf</block>
<!-- Other filters -->
<block>gr_single_pole_iir_filter_xx</block>
<block>gr_hilbert_fc</block>
@@ -231,7 +231,6 @@
<name>Probes</name>
<block>gr_probe_avg_mag_sqrd_x</block>
<block>gr_probe_density_b</block>
- <block>gr_probe_mpsk_snr_c</block>
<block>gr_probe_signal_f</block>
</cat>
<cat>
diff --git a/grc/blocks/gr_pfb_synthesis_filterbank.xml b/grc/blocks/gr_pfb_synthesizer.xml
index a8b944c6a..49e5cb032 100644
--- a/grc/blocks/gr_pfb_synthesis_filterbank.xml
+++ b/grc/blocks/gr_pfb_synthesizer.xml
@@ -5,14 +5,16 @@
###################################################
-->
<block>
- <name>Polyphase Synthesis Filterbank</name>
- <key>gr_pfb_synthesis_filterbank_ccf</key>
+ <name>Polyphase Synthesizer</name>
+ <key>gr_pfb_synthesizer_ccf</key>
<import>from gnuradio import gr</import>
<import>from gnuradio.gr import firdes</import>
- <make>gr.pfb_synthesis_filterbank_ccf(
- $numchans, $taps)
+ <make>gr.pfb_synthesizer_ccf(
+ $numchans, $taps, $twox)
+self.$(id).set_channel_map($ch_map)
</make>
<callback>set_taps($taps)</callback>
+ <callback>set_channel_map($ch_map)</callback>
<param>
<name>Channels</name>
@@ -31,6 +33,18 @@
<key>taps</key>
<type>real_vector</type>
</param>
+ <param>
+ <name>2x Sample Rate</name>
+ <key>twox</key>
+ <value>False</value>
+ <type>bool</type>
+ </param>
+ <param>
+ <name>Channel Map</name>
+ <key>ch_map</key>
+ <value>[]</value>
+ <type>int_vector</type>
+ </param>
<sink>
<name>in</name>
<type>complex</type>
diff --git a/grc/blocks/gr_probe_mpsk_snr_c.xml b/grc/blocks/gr_probe_mpsk_snr_c.xml
deleted file mode 100644
index 5687e867d..000000000
--- a/grc/blocks/gr_probe_mpsk_snr_c.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Probe MPSK SNR
-###################################################
- -->
-<block>
- <name>Probe MPSK SNR</name>
- <key>gr_probe_mpsk_snr_c</key>
- <import>from gnuradio import gr</import>
- <make>gr.probe_mpsk_snr_c($alpha)</make>
- <callback>set_alpha($alpha)</callback>
- <param>
- <name>Alpha</name>
- <key>alpha</key>
- <value>1</value>
- <type>real</type>
- </param>
- <sink>
- <name>in</name>
- <type>complex</type>
- </sink>
- <doc>
-Available functions to probe: signal_mean(), noise_variance()
-
-Use with the function probe block.
- </doc>
-</block>
diff --git a/grc/scripts/Makefile.am b/grc/examples/CMakeLists.txt
index 84e2759dc..a218dbe50 100644
--- a/grc/scripts/Makefile.am
+++ b/grc/examples/CMakeLists.txt
@@ -1,24 +1,37 @@
+# Copyright 2011 Free Software Foundation, Inc.
#
-# Copyright 2008-2011 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.
-#
-include $(top_srcdir)/Makefile.common
+# SIMPLE
+install(
+ FILES
+ simple/variable_config.grc
+ DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/simple
+ COMPONENT "grc"
+)
-dist_bin_SCRIPTS = gnuradio-companion
+# XMLRPC
+install(
+ FILES
+ xmlrpc/readme.txt
+ xmlrpc/xmlrpc_client.grc
+ xmlrpc/xmlrpc_client_script.py
+ xmlrpc/xmlrpc_server.grc
+ DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/xmlrpc
+ COMPONENT "grc"
+)
diff --git a/grc/examples/simple/variable_config.grc b/grc/examples/simple/variable_config.grc
new file mode 100644
index 000000000..95c287cce
--- /dev/null
+++ b/grc/examples/simple/variable_config.grc
@@ -0,0 +1,329 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Thu Jun 25 10:56:04 2009</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>variable_config_demo</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Variable Config Block Demonstration</value>
+ </param>
+ <param>
+ <key>author</key>
+ <value>Example</value>
+ </param>
+ <param>
+ <key>description</key>
+ <value>Save/Load freq from a config file.</value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>1280, 1024</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>wx_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>autostart</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>32000</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 170)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_config</key>
+ <param>
+ <key>id</key>
+ <value>freq_init</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>real</value>
+ </param>
+ <param>
+ <key>config_file</key>
+ <value>config.conf</value>
+ </param>
+ <param>
+ <key>section</key>
+ <value>main</value>
+ </param>
+ <param>
+ <key>option</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>writeback</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(255, 17)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frequency (Hz)</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>freq_init</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>-samp_rate/2</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>samp_rate/2</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(429, 24)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_throttle</key>
+ <param>
+ <key>id</key>
+ <value>gr_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(392, 233)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_sig_source_x</key>
+ <param>
+ <key>id</key>
+ <value>gr_sig_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>waveform</key>
+ <value>gr.GR_COS_WAVE</value>
+ </param>
+ <param>
+ <key>freq</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>amp</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>offset</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(148, 233)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_fftsink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_fftsink2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>FFT Plot</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>y_per_div</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>y_divs</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>50</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>1024</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>30</value>
+ </param>
+ <param>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>avg_alpha</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(671, 233)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>gr_sig_source_x_0</source_block_id>
+ <sink_block_id>gr_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>gr_throttle_0</source_block_id>
+ <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/grc/examples/xmlrpc/readme.txt b/grc/examples/xmlrpc/readme.txt
new file mode 100644
index 000000000..056ad1e82
--- /dev/null
+++ b/grc/examples/xmlrpc/readme.txt
@@ -0,0 +1,18 @@
+##################################################
+# XMLRPC example
+##################################################
+
+XMLRPC allows software to make remote function calls over http.
+In the case of GRC, one can use XMLRPC to modify variables in a running flow graph.
+See http://www.xmlrpc.com/
+
+--- Server Example ---
+Place an "XMLRPC Server" block inside of any flow graph.
+The server will provide set functions for every variable in the flow graph.
+If a variable is called "freq", the server will provide a function set_freq(new_freq).
+Run the server example and experiment with the example client script.
+
+-- Client Example --
+The "XMLRPC Client" block will give a variable control over one remove function.
+In the example client, there is one client block and gui control per variable.
+This technique can be used to remotely control a flow graph, perhaps running on a non-gui machine.
diff --git a/grc/examples/xmlrpc/xmlrpc_client.grc b/grc/examples/xmlrpc/xmlrpc_client.grc
new file mode 100644
index 000000000..3bb4e7ed3
--- /dev/null
+++ b/grc/examples/xmlrpc/xmlrpc_client.grc
@@ -0,0 +1,312 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Thu Jul 24 14:27:44 2008</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>client_block</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>XMLRPC Client</value>
+ </param>
+ <param>
+ <key>author</key>
+ <value>Example</value>
+ </param>
+ <param>
+ <key>description</key>
+ <value>example flow graph</value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>1280, 1024</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>wx_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>xmlrpc_client</key>
+ <param>
+ <key>id</key>
+ <value>xmlrpc_client0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>addr</key>
+ <value>localhost</value>
+ </param>
+ <param>
+ <key>port</key>
+ <value>1234</value>
+ </param>
+ <param>
+ <key>callback</key>
+ <value>set_ampl</value>
+ </param>
+ <param>
+ <key>variable</key>
+ <value>ampl</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(409, 35)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>xmlrpc_client</key>
+ <param>
+ <key>id</key>
+ <value>xmlrpc_client</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>addr</key>
+ <value>localhost</value>
+ </param>
+ <param>
+ <key>port</key>
+ <value>1234</value>
+ </param>
+ <param>
+ <key>callback</key>
+ <value>set_freq</value>
+ </param>
+ <param>
+ <key>variable</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(222, 34)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frequency (Hz)</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>5000</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>slider_type</key>
+ <value>horizontal</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 0, 1, 2</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(207, 162)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>ampl</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Amplitude</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>slider_type</key>
+ <value>horizontal</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>1, 0, 1, 2</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(397, 167)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_chooser</key>
+ <param>
+ <key>id</key>
+ <value>offset</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Offset</value>
+ </param>
+ <param>
+ <key>value_index</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>choices</key>
+ <value>[-1, 0, 1]</value>
+ </param>
+ <param>
+ <key>labels</key>
+ <value>["neg", "zero", "pos"]</value>
+ </param>
+ <param>
+ <key>chooser_type</key>
+ <value>radio_buttons_horizontal</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>2, 0, 1, 2</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(596, 177)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>xmlrpc_client</key>
+ <param>
+ <key>id</key>
+ <value>xmlrpc_client1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>addr</key>
+ <value>localhost</value>
+ </param>
+ <param>
+ <key>port</key>
+ <value>1234</value>
+ </param>
+ <param>
+ <key>callback</key>
+ <value>set_offset</value>
+ </param>
+ <param>
+ <key>variable</key>
+ <value>offset*ampl</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(608, 39)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>32000</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(13, 172)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+</flow_graph> \ No newline at end of file
diff --git a/grc/examples/xmlrpc/xmlrpc_client_script.py b/grc/examples/xmlrpc/xmlrpc_client_script.py
new file mode 100644
index 000000000..8f00fa55d
--- /dev/null
+++ b/grc/examples/xmlrpc/xmlrpc_client_script.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+
+import time
+import random
+import xmlrpclib
+
+#create server object
+s = xmlrpclib.Server("http://localhost:1234")
+
+#randomly change parameters of the sinusoid
+for i in range(10):
+ #generate random values
+ new_freq = random.uniform(0, 5000)
+ new_ampl = random.uniform(0, 2)
+ new_offset = random.uniform(-1, 1)
+ #set new values
+ time.sleep(1)
+ s.set_freq(new_freq)
+ time.sleep(1)
+ s.set_ampl(new_ampl)
+ time.sleep(1)
+ s.set_offset(new_offset)
+
diff --git a/grc/examples/xmlrpc/xmlrpc_server.grc b/grc/examples/xmlrpc/xmlrpc_server.grc
new file mode 100644
index 000000000..dc539ef1b
--- /dev/null
+++ b/grc/examples/xmlrpc/xmlrpc_server.grc
@@ -0,0 +1,384 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Thu Jul 24 14:27:42 2008</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>server_block</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>XMLRPC Server</value>
+ </param>
+ <param>
+ <key>author</key>
+ <value>Example</value>
+ </param>
+ <param>
+ <key>description</key>
+ <value>example flow graph</value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>1280, 1024</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>wx_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_sig_source_x</key>
+ <param>
+ <key>id</key>
+ <value>gr_sig_source_x</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>waveform</key>
+ <value>gr.GR_COS_WAVE</value>
+ </param>
+ <param>
+ <key>freq</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>amp</key>
+ <value>ampl</value>
+ </param>
+ <param>
+ <key>offset</key>
+ <value>offset</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(162, 200)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>offset</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(12, 390)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>xmlrpc_server</key>
+ <param>
+ <key>id</key>
+ <value>xmlrpc_server</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>addr</key>
+ <value>localhost</value>
+ </param>
+ <param>
+ <key>port</key>
+ <value>1234</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(395, 240)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_throttle</key>
+ <param>
+ <key>id</key>
+ <value>gr_throttle</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(386, 93)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_scopesink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_scopesink2</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Scope Plot</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>frame_decim</key>
+ <value>15</value>
+ </param>
+ <param>
+ <key>v_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>t_scale</key>
+ <value>.001</value>
+ </param>
+ <param>
+ <key>marker</key>
+ <value>set_format_line</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 0, 2, 4</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(623, 28)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_fftsink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_fftsink2</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>FFT Plot</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>y_per_div</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>y_divs</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>50</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>512</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>15</value>
+ </param>
+ <param>
+ <key>avg_alpha</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>2, 0, 2, 4</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(630, 233)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>32000</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(11, 160)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(11, 237)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>ampl</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(13, 315)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>gr_sig_source_x</source_block_id>
+ <sink_block_id>gr_throttle</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>gr_throttle</source_block_id>
+ <sink_block_id>wxgui_scopesink2</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>gr_throttle</source_block_id>
+ <sink_block_id>wxgui_fftsink2</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph> \ No newline at end of file
diff --git a/grc/freedesktop/.gitignore b/grc/freedesktop/.gitignore
deleted file mode 100644
index ff07a101f..000000000
--- a/grc/freedesktop/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/grc_setup_freedesktop
-/Makefile
-/Makefile.in
diff --git a/grc/freedesktop/CMakeLists.txt b/grc/freedesktop/CMakeLists.txt
index 492b0f7d8..d95fe04ac 100644
--- a/grc/freedesktop/CMakeLists.txt
+++ b/grc/freedesktop/CMakeLists.txt
@@ -1,17 +1,17 @@
# Copyright 2011-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,
diff --git a/grc/freedesktop/Makefile.am b/grc/freedesktop/Makefile.am
deleted file mode 100644
index f89a344f7..000000000
--- a/grc/freedesktop/Makefile.am
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Copyright 2008-2011 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.
-#
-
-include $(top_srcdir)/Makefile.common
-
-ourdatadir = $(pkgdatadir)/grc/freedesktop
-dist_ourdata_DATA = \
- grc-icon-256.png \
- grc-icon-128.png \
- grc-icon-64.png \
- grc-icon-48.png \
- grc-icon-32.png \
- gnuradio-grc.xml \
- gnuradio-grc.desktop
-
-pkglibexecdir = $(libexecdir)/$(PACKAGE)
-dist_pkglibexec_SCRIPTS = grc_setup_freedesktop
-
-grc_setup_freedesktop: $(srcdir)/grc_setup_freedesktop.in Makefile
- sed -e 's|@SRCDIR[@]|$(ourdatadir)|g' $< > $@
-
-EXTRA_DIST += $(srcdir)/grc_setup_freedesktop.in
-BUILT_SOURCES += grc_setup_freedesktop
-
-if XDG_UTILS
-install-data-hook:
- @printf "\n*** GRC Post-Install Message ***\
- \nTo install icons, mime type, and menu items\
- \nfor a freedesktop.org system (Gnome/KDE/Xfce):\
- \n >>> sudo $(pkglibexecdir)/grc_setup_freedesktop install\n\n"
-
-uninstall-hook:
- @printf "\n*** GRC Post-Uninstall Message ***\
- \nTo uninstall icons, mime type, and menu items\
- \nfor a freedesktop.org system (Gnome/KDE/Xfce):\
- \n >>> sudo $(pkglibexecdir)/grc_setup_freedesktop uninstall\n\n"
-endif
diff --git a/grc/grc_gnuradio/.gitignore b/grc/grc_gnuradio/.gitignore
deleted file mode 100644
index 908cf90b8..000000000
--- a/grc/grc_gnuradio/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/Makefile
-/Makefile.in
-/Constants.py
diff --git a/grc/grc_gnuradio/Makefile.am b/grc/grc_gnuradio/Makefile.am
deleted file mode 100644
index af1d86be9..000000000
--- a/grc/grc_gnuradio/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright 2008-2011 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.
-#
-
-include $(top_srcdir)/Makefile.common
-
-grc_gnuradio_prefix = $(pythondir)/grc_gnuradio
-
-root_pythondir = $(grc_gnuradio_prefix)
-root_python_PYTHON = __init__.py
-
-blks2_pythondir = $(grc_gnuradio_prefix)/blks2
-blks2_python_PYTHON = \
- blks2/__init__.py \
- blks2/error_rate.py \
- blks2/packet.py \
- blks2/selector.py \
- blks2/tcp.py
diff --git a/grc/gui/.gitignore b/grc/gui/.gitignore
deleted file mode 100644
index b336cc7ce..000000000
--- a/grc/gui/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index 15785f2ee..476c82b4f 100644
--- a/grc/gui/ActionHandler.py
+++ b/grc/gui/ActionHandler.py
@@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
import os
-import signal
+import signal
from Constants import IMAGE_FILE_EXTENSION
import Actions
import pygtk
diff --git a/grc/gui/BlockTreeWindow.py b/grc/gui/BlockTreeWindow.py
index c12120eaf..0175c8bec 100644
--- a/grc/gui/BlockTreeWindow.py
+++ b/grc/gui/BlockTreeWindow.py
@@ -67,7 +67,7 @@ class BlockTreeWindow(gtk.VBox):
#setup the search
self.treeview.set_enable_search(True)
self.treeview.set_search_equal_func(self._handle_search)
- #try to enable the tooltips (available in pygtk 2.12 and above)
+ #try to enable the tooltips (available in pygtk 2.12 and above)
try: self.treeview.set_tooltip_column(DOC_INDEX)
except: pass
#setup drag and drop
diff --git a/grc/gui/Makefile.am b/grc/gui/Makefile.am
deleted file mode 100644
index a73b6855d..000000000
--- a/grc/gui/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Copyright 2008, 2009 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.
-#
-
-include $(top_srcdir)/Makefile.common
-
-ourpythondir = $(pkgpythondir)/grc/gui
-ourpython_PYTHON = \
- Block.py \
- Colors.py \
- Constants.py \
- Connection.py \
- Element.py \
- FlowGraph.py \
- Param.py \
- Platform.py \
- Port.py \
- Utils.py \
- ActionHandler.py \
- Actions.py \
- Bars.py \
- BlockTreeWindow.py \
- Dialogs.py \
- DrawingArea.py \
- FileDialogs.py \
- MainWindow.py \
- Messages.py \
- NotebookPage.py \
- PropsDialog.py \
- Preferences.py \
- StateCache.py \
- __init__.py
diff --git a/grc/python/.gitignore b/grc/python/.gitignore
deleted file mode 100644
index b336cc7ce..000000000
--- a/grc/python/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/grc/python/CMakeLists.txt b/grc/python/CMakeLists.txt
index 0871c7bd1..4832dd897 100644
--- a/grc/python/CMakeLists.txt
+++ b/grc/python/CMakeLists.txt
@@ -1,17 +1,17 @@
# Copyright 2011 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,
diff --git a/grc/python/Makefile.am b/grc/python/Makefile.am
deleted file mode 100644
index eb35b6fc1..000000000
--- a/grc/python/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Copyright 2008, 2009 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.
-#
-
-include $(top_srcdir)/Makefile.common
-
-ourpythondir = $(pkgpythondir)/grc/python
-ourpython_PYTHON = \
- convert_hier.py \
- expr_utils.py \
- extract_docs.py \
- Block.py \
- Connection.py \
- Constants.py \
- FlowGraph.py \
- Generator.py \
- Param.py \
- Platform.py \
- Port.py \
- __init__.py
-
-ourdatadir = $(pkgpythondir)/grc/python
-dist_ourdata_DATA = \
- block.dtd \
- default_flow_graph.grc \
- flow_graph.tmpl
diff --git a/grc/python/Param.py b/grc/python/Param.py
index 2a7258dc7..2caca4802 100644
--- a/grc/python/Param.py
+++ b/grc/python/Param.py
@@ -335,7 +335,7 @@ class Param(_Param, _GUIParam):
# Stream ID Type
#########################
elif t == 'stream_id':
- #get a list of all stream ids used in the virtual sinks
+ #get a list of all stream ids used in the virtual sinks
ids = [param.get_value() for param in filter(
lambda p: p.get_parent().is_virtual_sink(),
self.get_all_params(t),
diff --git a/grc/python/Port.py b/grc/python/Port.py
index c2bfd9ccc..d0ef51b48 100644
--- a/grc/python/Port.py
+++ b/grc/python/Port.py
@@ -1,5 +1,5 @@
"""
-Copyright 2008-2011 Free Software Foundation, Inc.
+Copyright 2008-2012 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@ import Constants
def _get_source_from_virtual_sink_port(vsp):
"""
Resolve the source port that is connected to the given virtual sink port.
- Use the get source from virtual source to recursively resolve subsequent ports.
+ Use the get source from virtual source to recursively resolve subsequent ports.
"""
try: return _get_source_from_virtual_source_port(
vsp.get_enabled_connections()[0].get_source())
@@ -50,6 +50,35 @@ def _get_source_from_virtual_source_port(vsp, traversed=[]):
)
except: raise Exception, 'Could not resolve source for virtual source port %s'%vsp
+def _get_sink_from_virtual_source_port(vsp):
+ """
+ Resolve the sink port that is connected to the given virtual source port.
+ Use the get sink from virtual sink to recursively resolve subsequent ports.
+ """
+ try: return _get_sink_from_virtual_sink_port(
+ vsp.get_enabled_connections()[0].get_sink()) # Could have many connections, but use first
+ except: raise Exception, 'Could not resolve source for virtual source port %s'%vsp
+
+def _get_sink_from_virtual_sink_port(vsp, traversed=[]):
+ """
+ Recursively resolve sink ports over the virtual connections.
+ Keep track of traversed sinks to avoid recursive loops.
+ """
+ if not vsp.get_parent().is_virtual_sink(): return vsp
+ if vsp in traversed: raise Exception, 'Loop found when resolving virtual sink %s'%vsp
+ try: return _get_sink_from_virtual_sink_port(
+ _get_sink_from_virtual_source_port(
+ filter(#get all virtual source with a matching stream id
+ lambda vs: vs.get_param('stream_id').get_value() == vsp.get_parent().get_param('stream_id').get_value(),
+ filter(#get all enabled blocks that are also virtual sinks
+ lambda b: b.is_virtual_source(),
+ vsp.get_parent().get_parent().get_enabled_blocks(),
+ ),
+ )[0].get_sources()[0]
+ ), traversed + [vsp],
+ )
+ except: raise Exception, 'Could not resolve source for virtual sink port %s'%vsp
+
class Port(_Port, _GUIPort):
def __init__(self, block, n, dir):
@@ -81,6 +110,8 @@ class Port(_Port, _GUIPort):
def get_types(self): return Constants.TYPE_TO_SIZEOF.keys()
+ def is_type_empty(self): return not self._n['type']
+
def validate(self):
_Port.validate(self)
if not self.get_enabled_connections() and not self.get_optional():
@@ -99,18 +130,30 @@ class Port(_Port, _GUIPort):
Handle the port cloning for virtual blocks.
"""
_Port.rewrite(self)
- if self.get_parent().is_virtual_sink() or self.get_parent().is_virtual_source():
+ if self.is_type_empty():
try: #clone type and vlen
- source = self.resolve_virtual_source()
+ source = self.resolve_empty_type()
self._type = str(source.get_type())
self._vlen = str(source.get_vlen())
except: #reset type and vlen
self._type = ''
self._vlen = ''
- def resolve_virtual_source(self):
- if self.get_parent().is_virtual_sink(): return _get_source_from_virtual_sink_port(self)
- if self.get_parent().is_virtual_source(): return _get_source_from_virtual_source_port(self)
+ def resolve_empty_type(self):
+ if self.is_sink():
+ try:
+ src = _get_source_from_virtual_sink_port(self)
+ if not src.is_type_empty(): return src
+ except: pass
+ sink = _get_sink_from_virtual_sink_port(self)
+ if not sink.is_type_empty(): return sink
+ if self.is_source():
+ try:
+ src = _get_source_from_virtual_source_port(self)
+ if not src.is_type_empty(): return src
+ except: pass
+ sink = _get_sink_from_virtual_source_port(self)
+ if not sink.is_type_empty(): return sink
def get_vlen(self):
"""
diff --git a/grc/scripts/.gitignore b/grc/scripts/.gitignore
deleted file mode 100644
index b336cc7ce..000000000
--- a/grc/scripts/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/grc/scripts/CMakeLists.txt b/grc/scripts/CMakeLists.txt
index b8d5330f6..e90589230 100644
--- a/grc/scripts/CMakeLists.txt
+++ b/grc/scripts/CMakeLists.txt
@@ -1,17 +1,17 @@
# Copyright 2011 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,
diff --git a/grc/todo.txt b/grc/todo.txt
index ccfaad72a..1205b3ff6 100644
--- a/grc/todo.txt
+++ b/grc/todo.txt
@@ -12,7 +12,7 @@
* packet mod: whitening offset
* wx min window size in options block
* gr_adaptive_fir_ccf
-* ofdm
+* ofdm
* gr_ofdm_bpsk_demapper
* gr_ofdm_demapper_vcb
* gr_ofdm_frame_sink