summaryrefslogtreecommitdiff
path: root/gr-fcd
diff options
context:
space:
mode:
Diffstat (limited to 'gr-fcd')
-rw-r--r--gr-fcd/lib/fcd_source_c_impl.cc2
-rw-r--r--gr-fcd/swig/CMakeLists.txt3
-rw-r--r--gr-fcd/swig/Makefile.am3
-rw-r--r--gr-fcd/swig/fcd_source_c.i22
-rw-r--r--gr-fcd/swig/fcd_swig.i10
5 files changed, 14 insertions, 26 deletions
diff --git a/gr-fcd/lib/fcd_source_c_impl.cc b/gr-fcd/lib/fcd_source_c_impl.cc
index 9543f16eb..ca370d9f3 100644
--- a/gr-fcd/lib/fcd_source_c_impl.cc
+++ b/gr-fcd/lib/fcd_source_c_impl.cc
@@ -47,7 +47,7 @@ static const int MIN_OUT = 1; /*!< Minimum number of output streams. */
static const int MAX_OUT = 1; /*!< Maximum number of output streams. */
fcd_source_c_impl::fcd_source_c_impl(const std::string device_name)
- : gr_hier_block2 ("fcd_source_c_impl",
+ : gr_hier_block2 ("fcd_source_c",
gr_make_io_signature (MIN_IN, MAX_IN, sizeof (gr_complex)),
gr_make_io_signature (MIN_OUT, MAX_OUT, sizeof (gr_complex))),
d_freq_corr(-120),
diff --git a/gr-fcd/swig/CMakeLists.txt b/gr-fcd/swig/CMakeLists.txt
index 7d881c0b4..f715c4785 100644
--- a/gr-fcd/swig/CMakeLists.txt
+++ b/gr-fcd/swig/CMakeLists.txt
@@ -23,6 +23,8 @@
include(GrPython)
include(GrSwig)
+#set(GR_SWIG_FLAGS -DGR_HAVE_FCD) #needed to parse fcd_swig.i
+
set(GR_SWIG_INCLUDE_DIRS
${GR_FCD_INCLUDE_DIRS}
${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
@@ -45,7 +47,6 @@ GR_SWIG_INSTALL(
install(
FILES
fcd_swig.i
- fcd_source_c.i
${CMAKE_CURRENT_BINARY_DIR}/fcd_swig_doc.i
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
COMPONENT "fcd_swig"
diff --git a/gr-fcd/swig/Makefile.am b/gr-fcd/swig/Makefile.am
index cec8fa29a..225f32ae0 100644
--- a/gr-fcd/swig/Makefile.am
+++ b/gr-fcd/swig/Makefile.am
@@ -43,6 +43,8 @@ AM_CPPFLAGS = \
# The SWIG library
# TESTS = run_tests
+fcd_swig_swig_args = $(FCD_CPPFLAGS)
+
TOP_SWIG_DOC_IFILES = \
fcd_swig_doc.i
@@ -72,7 +74,6 @@ fcd_swig_la_swig_libadd = \
# additional SWIG files to be installed
fcd_swig_swiginclude_headers = \
- fcd_source_c.i \
$(TOP_SWIG_DOC_IFILES)
if GUILE
diff --git a/gr-fcd/swig/fcd_source_c.i b/gr-fcd/swig/fcd_source_c.i
deleted file mode 100644
index 77fcf8a42..000000000
--- a/gr-fcd/swig/fcd_source_c.i
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * First arg is the package prefix.
- * Second arg is the name of the class minus the prefix.
- *
- * This does some behind-the-scenes magic so we can
- * access fcd_source_c from python as fcd.source_c
- */
-GR_SWIG_BLOCK_MAGIC(fcd,source_c);
-
-fcd_source_c_sptr fcd_make_source_c (const std::string device_name = "");
-
-class fcd_source_c : public gr_hier_block2
-{
-public:
- void set_freq(float freq);
- void set_freq_khz(int freq);
- void set_lna_gain(float gain);
- void set_mixer_gain(float gain);
- void set_freq_corr(int ppm);
- void set_dc_corr(double dci, double dcq);
- void set_iq_corr(double gain, double phase);
-};
diff --git a/gr-fcd/swig/fcd_swig.i b/gr-fcd/swig/fcd_swig.i
index a565fb895..8fcc7d059 100644
--- a/gr-fcd/swig/fcd_swig.i
+++ b/gr-fcd/swig/fcd_swig.i
@@ -20,6 +20,11 @@
* Boston, MA 02110-1301, USA.
*/
+#define FCD_API
+
+//suppress 319. No access specifier given for base class name (ignored).
+#pragma SWIG nowarn=319
+
%include "gnuradio.i"
//load generated python docstrings
@@ -29,7 +34,10 @@
#include "fcd_source_c.h"
%}
-%include "fcd_source_c.i"
+%include "fcd_source_c.h"
+
+GR_SWIG_BLOCK_MAGIC(fcd,source_c);
+fcd_source_c_sptr fcd_make_source_c (const std::string device_name = "");
#if SWIGGUILE
%scheme %{