diff options
author | Josh Blum | 2012-10-27 19:36:47 -0700 |
---|---|---|
committer | Josh Blum | 2012-10-27 19:36:47 -0700 |
commit | cd42f1c9d373639880503ee97c041d1f0dcd974f (patch) | |
tree | c507f7db4e077d6d7c741ca3238e6c8f0dc87f63 /lib | |
parent | 2a1966462484cf1cb25ea7802cc0d9a8e80096c9 (diff) | |
download | sandhi-cd42f1c9d373639880503ee97c041d1f0dcd974f.tar.gz sandhi-cd42f1c9d373639880503ee97c041d1f0dcd974f.tar.bz2 sandhi-cd42f1c9d373639880503ee97c041d1f0dcd974f.zip |
added support for the real PMC type (stub removed)
need to create conversions still...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CMakeLists.txt | 13 | ||||
-rw-r--r-- | lib/gr_block.cpp | 9 |
2 files changed, 18 insertions, 4 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index cfc957f..c9ba245 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -16,6 +16,19 @@ list(APPEND gnuradio_core_sources ) ######################################################################## +# Setup PMC Deps +######################################################################## +include_directories(${GRAS_SOURCE_DIR}/PMC/include) + +list(APPEND GNURADIO_CORE_INCLUDE_DIRS ${GRAS_SOURCE_DIR}/PMC/include) +GR_SET_GLOBAL(GNURADIO_CORE_INCLUDE_DIRS ${GNURADIO_CORE_INCLUDE_DIRS}) + +list(APPEND GNURADIO_CORE_SWIG_INCLUDE_DIRS ${GRAS_SOURCE_DIR}/PMC/include) +GR_SET_GLOBAL(GNURADIO_CORE_SWIG_INCLUDE_DIRS ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}) + +add_subdirectory(${GRAS_SOURCE_DIR}/PMC ${CMAKE_BINARY_DIR}/PMC) + +######################################################################## # Setup Theron Deps ######################################################################## set(THERON_SOURCE_DIR ${GRAS_SOURCE_DIR}/Theron) diff --git a/lib/gr_block.cpp b/lib/gr_block.cpp index 32d9a0c..f8c1d0d 100644 --- a/lib/gr_block.cpp +++ b/lib/gr_block.cpp @@ -150,19 +150,20 @@ bool gr_block::is_set_max_noutput_items(void) const } //TODO Tag2gr_tag and gr_tag2Tag need PMC to/from PMT logic +//currently PMC holds the pmt_t, this is temporary static gr_tag_t Tag2gr_tag(const gnuradio::Tag &tag) { gr_tag_t t; t.offset = tag.offset; - t.key = tag.key; - t.value = tag.value; - t.srcid = tag.srcid; + t.key = tag.key? tag.key.cast<pmt::pmt_t>() : pmt::pmt_t(); + t.value = tag.value? tag.value.cast<pmt::pmt_t>() : pmt::pmt_t(); + t.srcid = tag.srcid? tag.srcid.cast<pmt::pmt_t>() : pmt::pmt_t(); return t; } static gnuradio::Tag gr_tag2Tag(const gr_tag_t &tag) { - return gnuradio::Tag(tag.offset, tag.key, tag.value, tag.srcid); + return gnuradio::Tag(tag.offset, PMC::make(tag.key), PMC::make(tag.value), PMC::make(tag.srcid)); } void gr_block::add_item_tag( |