[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r3741 - gnuradio/branches/developers/jcorgan/cppwrap/g
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r3741 - gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native |
Date: |
Sun, 8 Oct 2006 16:10:23 -0600 (MDT) |
Author: jcorgan
Date: 2006-10-08 16:10:23 -0600 (Sun, 08 Oct 2006)
New Revision: 3741
Added:
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/gr_flow_graph.cc
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/gr_flow_graph.h
Modified:
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/Makefile.am
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/dialtone.cc
Log:
Work in progress.
Adds dummy C++ gr_flow_graph class. It's done here for now for ease
of compilation; it will get moved to gnuradio-core/src/lib/runtime
when it is finished.
Modified:
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/Makefile.am
===================================================================
---
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/Makefile.am
2006-10-08 19:24:49 UTC (rev 3740)
+++
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/Makefile.am
2006-10-08 22:10:23 UTC (rev 3741)
@@ -26,7 +26,10 @@
noinst_PROGRAMS = \
dialtone
-dialtone_SOURCES = dialtone.cc
+dialtone_SOURCES = \
+ dialtone.cc \
+ gr_flow_graph.cc
+
dialtone_LDADD = $(GNURADIO_CORE_LIBS) \
$(top_builddir)/gr-audio-alsa/src/libgr_audio_alsa.la
Modified:
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/dialtone.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/dialtone.cc
2006-10-08 19:24:49 UTC (rev 3740)
+++
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/dialtone.cc
2006-10-08 22:10:23 UTC (rev 3741)
@@ -1,15 +1,21 @@
#include <gnuradio/gr_sig_source_f.h>
#include <gnuradio/audio_alsa_sink.h>
+#include <gr_flow_graph.h>
int main()
{
gr_sig_source_f_sptr SRC0, SRC1;
audio_alsa_sink_sptr SINK;
+ gr_flow_graph_sptr fg;
SRC0 = gr_make_sig_source_f(48000, GR_SIN_WAVE, 350, 0.5);
SRC1 = gr_make_sig_source_f(48000, GR_SIN_WAVE, 440, 0.5);
+ SINK = audio_alsa_make_sink(48000);
- SINK = audio_alsa_make_sink(48000);
+ fg = gr_make_flow_graph();
+ fg->connect(SRC0, 0, SINK, 0);
+ fg->connect(SRC1, 0, SINK, 1);
+ fg->run();
return 0;
}
Added:
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/gr_flow_graph.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/gr_flow_graph.cc
(rev 0)
+++
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/gr_flow_graph.cc
2006-10-08 22:10:23 UTC (rev 3741)
@@ -0,0 +1,27 @@
+#include <gr_flow_graph.h>
+#include <gr_block_detail.h>
+
+gr_flow_graph_sptr gr_make_flow_graph()
+{
+ return gr_flow_graph_sptr(new gr_flow_graph());
+}
+
+gr_flow_graph::gr_flow_graph()
+{
+ // NOP
+}
+
+gr_flow_graph::~gr_flow_graph()
+{
+ // NOP
+}
+
+void gr_flow_graph::connect(gr_block_sptr block_from, int from_portno,
+ gr_block_sptr block_to, int to_portno)
+{
+}
+
+void gr_flow_graph::run()
+{
+}
+
Property changes on:
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/gr_flow_graph.cc
___________________________________________________________________
Name: svn:eol-style
+ native
Added:
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/gr_flow_graph.h
===================================================================
---
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/gr_flow_graph.h
(rev 0)
+++
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/gr_flow_graph.h
2006-10-08 22:10:23 UTC (rev 3741)
@@ -0,0 +1,25 @@
+#ifndef INCLUDED_GR_FLOW_GRAPH_H
+#define INCLUDED_GR_FLOW_GRAPH_H
+
+#include <gr_block.h>
+
+class gr_flow_graph;
+typedef boost::shared_ptr<gr_flow_graph> gr_flow_graph_sptr;
+
+gr_flow_graph_sptr gr_make_flow_graph();
+
+class gr_flow_graph
+{
+private:
+ gr_flow_graph();
+ friend gr_flow_graph_sptr gr_make_flow_graph();
+
+public:
+ ~gr_flow_graph();
+ void connect(gr_block_sptr block_from, int portno_from,
+ gr_block_sptr block_to, int portno_to);
+
+ void run();
+};
+
+#endif
Property changes on:
gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native/gr_flow_graph.h
___________________________________________________________________
Name: svn:eol-style
+ native
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r3741 - gnuradio/branches/developers/jcorgan/cppwrap/gnuradio-examples/native,
jcorgan <=