diff options
author | Martin Braun | 2013-02-21 10:38:26 +0100 |
---|---|---|
committer | Martin Braun | 2013-02-21 10:38:26 +0100 |
commit | 61b90a54cd5b5d452585669498ad2bf692b6e543 (patch) | |
tree | 75abfe12e76257b2b12b51b4c4986261d79e8b59 /gnuradio-core/src/lib/io | |
parent | 3b12bc5b360ced033cc45f795dc514dfe99f1588 (diff) | |
parent | 45c9daa0a7b7dc2316607aa3762e268ce1793dce (diff) | |
download | gnuradio-61b90a54cd5b5d452585669498ad2bf692b6e543.tar.gz gnuradio-61b90a54cd5b5d452585669498ad2bf692b6e543.tar.bz2 gnuradio-61b90a54cd5b5d452585669498ad2bf692b6e543.zip |
Merge branch 'master' of git://github.com/gnuradio/gnuradio into grmodtool
Diffstat (limited to 'gnuradio-core/src/lib/io')
-rw-r--r-- | gnuradio-core/src/lib/io/gr_file_source.cc | 1 | ||||
-rw-r--r-- | gnuradio-core/src/lib/io/gr_message_debug.cc | 9 | ||||
-rw-r--r-- | gnuradio-core/src/lib/io/gr_message_debug.h | 13 |
3 files changed, 19 insertions, 4 deletions
diff --git a/gnuradio-core/src/lib/io/gr_file_source.cc b/gnuradio-core/src/lib/io/gr_file_source.cc index f3def0721..6da7abac2 100644 --- a/gnuradio-core/src/lib/io/gr_file_source.cc +++ b/gnuradio-core/src/lib/io/gr_file_source.cc @@ -24,6 +24,7 @@ #include "config.h" #endif +#include <gruel/thread.h> #include <gr_file_source.h> #include <gr_io_signature.h> #include <cstdio> diff --git a/gnuradio-core/src/lib/io/gr_message_debug.cc b/gnuradio-core/src/lib/io/gr_message_debug.cc index 1327c31ba..9eb1bb639 100644 --- a/gnuradio-core/src/lib/io/gr_message_debug.cc +++ b/gnuradio-core/src/lib/io/gr_message_debug.cc @@ -59,10 +59,10 @@ gr_message_debug::store(pmt::pmt_t msg) } void -gr_message_debug::print_verbose(pmt::pmt_t msg) +gr_message_debug::print_pdu(pmt::pmt_t pdu) { - pmt::pmt_t meta = pmt::pmt_car(msg); - pmt::pmt_t vector = pmt::pmt_cdr(msg); + pmt::pmt_t meta = pmt::pmt_car(pdu); + pmt::pmt_t vector = pmt::pmt_cdr(pdu); std::cout << "* MESSAGE DEBUG PRINT PDU VERBOSE *\n"; pmt::pmt_print(meta); size_t len = pmt::pmt_length(vector); @@ -110,6 +110,9 @@ gr_message_debug::gr_message_debug() message_port_register_in(pmt::mp("store")); set_msg_handler(pmt::mp("store"), boost::bind(&gr_message_debug::store, this, _1)); + + message_port_register_in(pmt::mp("print_pdu")); + set_msg_handler(pmt::mp("print_pdu"), boost::bind(&gr_message_debug::print_pdu, this, _1)); } gr_message_debug::~gr_message_debug() diff --git a/gnuradio-core/src/lib/io/gr_message_debug.h b/gnuradio-core/src/lib/io/gr_message_debug.h index 6e6e5103c..f1374e806 100644 --- a/gnuradio-core/src/lib/io/gr_message_debug.h +++ b/gnuradio-core/src/lib/io/gr_message_debug.h @@ -55,7 +55,18 @@ class GR_CORE_API gr_message_debug : public gr_block * \param msg A pmt message passed from the scheduler's message handling. */ void print(pmt::pmt_t msg); - void print_verbose(pmt::pmt_t msg); + + /*! + * \brief PDU formatted messages received in this port are printed to stdout. + * + * This port receives messages from the scheduler's message handling + * mechanism and prints it to stdout. This message handler function + * is only meant to be used by the scheduler to handle messages + * posted to port 'print'. + * + * \param pdu A PDU message passed from the scheduler's message handling. + */ + void print_pdu(pmt::pmt_t pdu); /*! * \brief Messages received in this port are stored in a vector. |