diff options
author | jcorgan | 2007-08-27 18:49:11 +0000 |
---|---|---|
committer | jcorgan | 2007-08-27 18:49:11 +0000 |
commit | c088a546ac7ae55748e5421201f3387f3e1286f9 (patch) | |
tree | b655773370d082062c2842181bff1638354c57c8 /gnuradio-examples/c++ | |
parent | 06945c04b4af8af035aeee2e28d5e5626888f5ee (diff) | |
download | gnuradio-c088a546ac7ae55748e5421201f3387f3e1286f9.tar.gz gnuradio-c088a546ac7ae55748e5421201f3387f3e1286f9.tar.bz2 gnuradio-c088a546ac7ae55748e5421201f3387f3e1286f9.zip |
Merged r6171:6186 from jcorgan/fg into trunk.
Changes hierarchical flow graph API to use gr.top_block instead
of gr.runtime.
See discuss-gnuradio mailing list for explanation of changes.
GRC has not been updated to use the changed API.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6187 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-examples/c++')
-rw-r--r-- | gnuradio-examples/c++/Makefile.am | 3 | ||||
-rw-r--r-- | gnuradio-examples/c++/dial_tone/README | 14 | ||||
-rw-r--r-- | gnuradio-examples/c++/dial_tone/dial_tone.cc | 4 | ||||
-rw-r--r-- | gnuradio-examples/c++/dial_tone/dial_tone.h | 4 | ||||
-rw-r--r-- | gnuradio-examples/c++/dial_tone/main.cc | 5 |
5 files changed, 18 insertions, 12 deletions
diff --git a/gnuradio-examples/c++/Makefile.am b/gnuradio-examples/c++/Makefile.am index 444bf11e3..5ac086075 100644 --- a/gnuradio-examples/c++/Makefile.am +++ b/gnuradio-examples/c++/Makefile.am @@ -20,7 +20,4 @@ # include $(top_srcdir)/Makefile.common - -# FIXME: do not build automatically; need to detect required pre-requisites - # SUBDIRS = dial_tone diff --git a/gnuradio-examples/c++/dial_tone/README b/gnuradio-examples/c++/dial_tone/README index cfc545802..6d5ed5059 100644 --- a/gnuradio-examples/c++/dial_tone/README +++ b/gnuradio-examples/c++/dial_tone/README @@ -1,2 +1,16 @@ This example requires that gr-audio-alsa be built in the main tree in order to compile successfully. It is not built automatically. + +To build this example, you must make two modifications to the build system: + +1) Add the following line inside config/grc_gnuradio_examples.m4: + + gnuradio-examples/c++/dial_tone/Makefile + + ...to the list of Makefiles already in there. + +2) In gnuradio-examples/c++/Makefile.am, uncomment the SUBDIRS line + +# SUBDIRS = dial_tone + +Then, from the top-level directory, re-run ./bootstrap and ./configure.
\ No newline at end of file diff --git a/gnuradio-examples/c++/dial_tone/dial_tone.cc b/gnuradio-examples/c++/dial_tone/dial_tone.cc index f87b5e60d..296cfcc11 100644 --- a/gnuradio-examples/c++/dial_tone/dial_tone.cc +++ b/gnuradio-examples/c++/dial_tone/dial_tone.cc @@ -32,9 +32,7 @@ dial_tone_sptr make_dial_tone() // Hierarchical block constructor, with no inputs or outputs dial_tone::dial_tone() : -gr_hier_block2("dial_tone", - gr_make_io_signature(0,0,0), - gr_make_io_signature(0,0,0)) + gr_top_block("dial_tone") { gr_sig_source_f_sptr src0 = gr_make_sig_source_f(48000, GR_SIN_WAVE, 350, 0.1); gr_sig_source_f_sptr src1 = gr_make_sig_source_f(48000, GR_SIN_WAVE, 440, 0.1); diff --git a/gnuradio-examples/c++/dial_tone/dial_tone.h b/gnuradio-examples/c++/dial_tone/dial_tone.h index 793f65b4c..c645439bb 100644 --- a/gnuradio-examples/c++/dial_tone/dial_tone.h +++ b/gnuradio-examples/c++/dial_tone/dial_tone.h @@ -19,13 +19,13 @@ * Boston, MA 02110-1301, USA. */ -#include <gr_hier_block2.h> +#include <gr_top_block.h> class dial_tone; typedef boost::shared_ptr<dial_tone> dial_tone_sptr; dial_tone_sptr make_dial_tone(); -class dial_tone : public gr_hier_block2 +class dial_tone : public gr_top_block { private: dial_tone(); diff --git a/gnuradio-examples/c++/dial_tone/main.cc b/gnuradio-examples/c++/dial_tone/main.cc index 684b8efd3..a09bd8288 100644 --- a/gnuradio-examples/c++/dial_tone/main.cc +++ b/gnuradio-examples/c++/dial_tone/main.cc @@ -26,13 +26,10 @@ // Tell the runtime to go... #include <dial_tone.h> -#include <gr_runtime.h> int main() { dial_tone_sptr top_block = make_dial_tone(); - gr_runtime_sptr runtime = gr_make_runtime(top_block); - - runtime->run(); + top_block->run(); return 0; } |