diff options
author | Tim O'Shea | 2012-11-28 15:15:58 -0800 |
---|---|---|
committer | Johnathan Corgan | 2012-11-29 15:42:57 -0800 |
commit | 92cfb0240005675f4e7a55a81552f4c7a5128cd8 (patch) | |
tree | 024a40e11a27a41eaa908b2eefb4a218795bff18 /gruel/src/lib/pmt | |
parent | 0fbd1699158f01937f61c245398ccdaebe3d978b (diff) | |
download | gnuradio-92cfb0240005675f4e7a55a81552f4c7a5128cd8.tar.gz gnuradio-92cfb0240005675f4e7a55a81552f4c7a5128cd8.tar.bz2 gnuradio-92cfb0240005675f4e7a55a81552f4c7a5128cd8.zip |
core: adding msg_connect, updating msg interface, adding symbolic block names
Diffstat (limited to 'gruel/src/lib/pmt')
-rw-r--r-- | gruel/src/lib/pmt/pmt.cc | 16 | ||||
-rw-r--r-- | gruel/src/lib/pmt/qa_pmt_prims.cc | 9 |
2 files changed, 21 insertions, 4 deletions
diff --git a/gruel/src/lib/pmt/pmt.cc b/gruel/src/lib/pmt/pmt.cc index 1d9125d4e..3eb39ed7b 100644 --- a/gruel/src/lib/pmt/pmt.cc +++ b/gruel/src/lib/pmt/pmt.cc @@ -1325,6 +1325,22 @@ pmt_list_add(pmt_t list, const pmt_t& item) } pmt_t +pmt_list_rm(pmt_t list, const pmt_t& item) +{ + if(pmt_is_pair(list)){ + pmt_t left = pmt_car(list); + pmt_t right = pmt_cdr(list); + if(!pmt_equal(left, item)){ + return pmt_cons(left, pmt_list_rm(right, item)); + } else { + return pmt_list_rm(right, item); + } + } else { + return list; + } +} + +pmt_t pmt_caar(pmt_t pair) { return (pmt_car(pmt_car(pair))); diff --git a/gruel/src/lib/pmt/qa_pmt_prims.cc b/gruel/src/lib/pmt/qa_pmt_prims.cc index 6212b8ea4..1bf5fcfb1 100644 --- a/gruel/src/lib/pmt/qa_pmt_prims.cc +++ b/gruel/src/lib/pmt/qa_pmt_prims.cc @@ -472,7 +472,7 @@ class qa_pmt_msg_accepter_nop : public gruel::msg_accepter { public: qa_pmt_msg_accepter_nop(){}; ~qa_pmt_msg_accepter_nop(); - void post(pmt_t){}; + void post(pmt_t,pmt_t){}; }; qa_pmt_msg_accepter_nop::~qa_pmt_msg_accepter_nop(){} @@ -495,9 +495,10 @@ qa_pmt_prims::test_msg_accepter() CPPUNIT_ASSERT_THROW(pmt_msg_accepter_ref(p0), pmt_wrong_type); // just confirm interfaces on send are OK - gruel::send(ma0.get(), sym); - gruel::send(ma0, sym); - gruel::send(p1, sym); + pmt_t port(pmt_intern("port")); + gruel::send(ma0.get(), port, sym); + gruel::send(ma0, port, sym); + gruel::send(p1, port, sym); } |