summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/flat_flowgraph.cc
diff options
context:
space:
mode:
authorBill Clark <saikou@vt.edu>2015-04-01 20:53:17 -0400
committerBill Clark <saikou@vt.edu>2015-04-01 20:55:53 -0400
commita15fe0ebdf444e4ff7c060b72950cd98c7f3ec8a (patch)
tree879f3d8090dbba555e470df5b803071d478dcdee /gnuradio-runtime/lib/flat_flowgraph.cc
parent7fe6115297c9d5d1d9220dc23bab96aa88b2b72d (diff)
gnuradio-runtime: added logger to flat_flowgraph and print out a warning for when the max_output_buffer isn't set to the requested value
Diffstat (limited to 'gnuradio-runtime/lib/flat_flowgraph.cc')
-rw-r--r--gnuradio-runtime/lib/flat_flowgraph.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnuradio-runtime/lib/flat_flowgraph.cc b/gnuradio-runtime/lib/flat_flowgraph.cc
index 9e5964cb7d..b580238b7c 100644
--- a/gnuradio-runtime/lib/flat_flowgraph.cc
+++ b/gnuradio-runtime/lib/flat_flowgraph.cc
@@ -50,6 +50,7 @@ namespace gr {
flat_flowgraph::flat_flowgraph()
{
+ configure_default_loggers(d_logger, d_debug_logger, "flat_flowgraph");
}
flat_flowgraph::~flat_flowgraph()
@@ -107,6 +108,13 @@ namespace gr {
detail->set_output(i, buffer);
// Update the block's max_output_buffer based on what was actually allocated.
+ if((grblock->max_output_buffer(i) != buffer->bufsize()) && (grblock->max_output_buffer(i) != -1))
+ GR_LOG_WARN(d_logger, boost::format("Block (%1%) max output buffer set to %2% instead of requested %3%") \
+ % grblock->alias() % buffer->bufsize() % grblock->max_output_buffer(i));
+ //std::cout << ">>> Warning: Block (" << grblock->alias()
+ // << ") max output buffer set to " << buffer->bufsize()
+ // << " instead of requested " << grblock->max_output_buffer(i)
+ // << std::endl;
grblock->set_max_output_buffer(i, buffer->bufsize());
}