summaryrefslogtreecommitdiff
path: root/gnuradio-core/src
diff options
context:
space:
mode:
authorTom Rondeau2011-10-22 14:25:13 -0400
committerTom Rondeau2011-10-22 14:25:13 -0400
commitda5563356afe3f50eb2560b5106a81776da7a43f (patch)
treeb2c9c7bb0a1e8948f2507a38e595e5cc557799d7 /gnuradio-core/src
parent1468be3299036606b678664ba84d0c0870266c9c (diff)
parent31268cfb68965dbcf3df4912059f0c5b6d744626 (diff)
downloadgnuradio-da5563356afe3f50eb2560b5106a81776da7a43f.tar.gz
gnuradio-da5563356afe3f50eb2560b5106a81776da7a43f.tar.bz2
gnuradio-da5563356afe3f50eb2560b5106a81776da7a43f.zip
Merge remote branch 'jblum/cmake_fixes' into next
Diffstat (limited to 'gnuradio-core/src')
-rw-r--r--gnuradio-core/src/lib/runtime/CMakeLists.txt1
-rw-r--r--gnuradio-core/src/lib/runtime/Makefile.am1
-rw-r--r--gnuradio-core/src/lib/runtime/gr_tags.h11
-rw-r--r--gnuradio-core/src/lib/runtime/gr_tags.i32
-rw-r--r--gnuradio-core/src/lib/runtime/runtime.i2
-rw-r--r--gnuradio-core/src/lib/swig/CMakeLists.txt2
-rw-r--r--gnuradio-core/src/lib/viterbi/viterbi.h2
7 files changed, 41 insertions, 10 deletions
diff --git a/gnuradio-core/src/lib/runtime/CMakeLists.txt b/gnuradio-core/src/lib/runtime/CMakeLists.txt
index e0774154e..105fc0e06 100644
--- a/gnuradio-core/src/lib/runtime/CMakeLists.txt
+++ b/gnuradio-core/src/lib/runtime/CMakeLists.txt
@@ -153,6 +153,7 @@ install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_block.i
${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_decimator.i
${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_interpolator.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_tags.i
${CMAKE_CURRENT_SOURCE_DIR}/gr_top_block.i
${CMAKE_CURRENT_SOURCE_DIR}/runtime.i
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
diff --git a/gnuradio-core/src/lib/runtime/Makefile.am b/gnuradio-core/src/lib/runtime/Makefile.am
index d4233e1ba..38da3d5fd 100644
--- a/gnuradio-core/src/lib/runtime/Makefile.am
+++ b/gnuradio-core/src/lib/runtime/Makefile.am
@@ -160,5 +160,6 @@ swiginclude_HEADERS = \
gr_sync_block.i \
gr_sync_decimator.i \
gr_sync_interpolator.i \
+ gr_tags.i \
gr_top_block.i \
runtime.i
diff --git a/gnuradio-core/src/lib/runtime/gr_tags.h b/gnuradio-core/src/lib/runtime/gr_tags.h
index e410e76a4..5fff6f15b 100644
--- a/gnuradio-core/src/lib/runtime/gr_tags.h
+++ b/gnuradio-core/src/lib/runtime/gr_tags.h
@@ -25,24 +25,19 @@
#include <gr_core_api.h>
#include <gruel/pmt.h>
-//dummy namespace so the line below makes swig happy
-namespace pmt{}
-//stupid using namespace because pmt::pmt_t confuses swig
-using namespace pmt;
-
struct GR_CORE_API gr_tag_t{
//! the item \p tag occurred at (as a uint64_t)
uint64_t offset;
//! the key of \p tag (as a PMT symbol)
- pmt_t key;
+ pmt::pmt_t key;
//! the value of \p tag (as a PMT)
- pmt_t value;
+ pmt::pmt_t value;
//! the source ID of \p tag (as a PMT)
- pmt_t srcid;
+ pmt::pmt_t srcid;
//! Comparison function to test which tag, \p x or \p y, came first in time
static inline bool offset_compare(
diff --git a/gnuradio-core/src/lib/runtime/gr_tags.i b/gnuradio-core/src/lib/runtime/gr_tags.i
new file mode 100644
index 000000000..828d0147c
--- /dev/null
+++ b/gnuradio-core/src/lib/runtime/gr_tags.i
@@ -0,0 +1,32 @@
+/*
+ * 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,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%{
+#include <gr_tags.h>
+%}
+
+%include <pmt_swig.i> //for pmt support
+
+%include <gr_tags.h>
+
+//gives support for a vector of tags (get tags in range)
+%include "std_vector.i"
+%template(tags_vector_t) std::vector<gr_tag_t>;
diff --git a/gnuradio-core/src/lib/runtime/runtime.i b/gnuradio-core/src/lib/runtime/runtime.i
index ca89b8fbd..9bf2df31e 100644
--- a/gnuradio-core/src/lib/runtime/runtime.i
+++ b/gnuradio-core/src/lib/runtime/runtime.i
@@ -20,6 +20,8 @@
* Boston, MA 02110-1301, USA.
*/
+#define GR_CORE_API
+
%{
#include <gr_runtime_types.h>
#include <gr_io_signature.h>
diff --git a/gnuradio-core/src/lib/swig/CMakeLists.txt b/gnuradio-core/src/lib/swig/CMakeLists.txt
index 73a6f92ff..b10b7c186 100644
--- a/gnuradio-core/src/lib/swig/CMakeLists.txt
+++ b/gnuradio-core/src/lib/swig/CMakeLists.txt
@@ -28,7 +28,7 @@ set(GR_SWIG_INCLUDE_DIRS
${Boost_INCLUDE_DIRS}
${GSL_INCLUDE_DIRS}
${GRUEL_INCLUDE_DIRS}
- ${GNURADIO_CORE_INCLUDE_DIRS}
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
set(GR_SWIG_LIBRARIES gnuradio-core)
diff --git a/gnuradio-core/src/lib/viterbi/viterbi.h b/gnuradio-core/src/lib/viterbi/viterbi.h
index 5bb8b357a..3a3ea5615 100644
--- a/gnuradio-core/src/lib/viterbi/viterbi.h
+++ b/gnuradio-core/src/lib/viterbi/viterbi.h
@@ -26,7 +26,7 @@
#include <gr_core_api.h>
-struct GR_CORE_API viterbi_state {
+struct viterbi_state {
unsigned long path; /* Decoded path to this state */
long metric; /* Cumulative metric to this state */
};