diff options
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/runtime/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/Makefile.am | 1 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_tags.h | 11 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_tags.i | 32 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/runtime.i | 3 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/CMakeLists.txt | 2 |
6 files changed, 41 insertions, 9 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..e08693a0c 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> @@ -64,4 +66,5 @@ %include <gr_sync_block.i> %include <gr_sync_decimator.i> %include <gr_sync_interpolator.i> +%include <gr_tags.i> %include <gr_top_block.i> 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) |