commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 17/43: gnuradio-runtume: hier_block2 output


From: git
Subject: [Commit-gnuradio] [gnuradio] 17/43: gnuradio-runtume: hier_block2 output buffer lengths - clean up of debug output
Date: Thu, 2 Apr 2015 19:15:51 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 0d19b0d29c6bb7ae5af0f1f28049cdd633fa686a
Author: Bill Clark <address@hidden>
Date:   Wed Apr 1 17:56:33 2015 -0400

    gnuradio-runtume: hier_block2 output buffer lengths - clean up of debug 
output
---
 gnuradio-runtime/include/gnuradio/hier_block2.h | 12 ++---
 gnuradio-runtime/lib/hier_block2.cc             |  2 -
 gnuradio-runtime/lib/hier_block2_detail.cc      | 60 ++++++++++++++++++-------
 3 files changed, 50 insertions(+), 24 deletions(-)

diff --git a/gnuradio-runtime/include/gnuradio/hier_block2.h 
b/gnuradio-runtime/include/gnuradio/hier_block2.h
index 18739d3..3a74a37 100644
--- a/gnuradio-runtime/include/gnuradio/hier_block2.h
+++ b/gnuradio-runtime/include/gnuradio/hier_block2.h
@@ -172,32 +172,32 @@ namespace gr {
     virtual void unlock();
 
     /*!
-     * \brief Returns max buffer size on output port \p i.
+     * \brief Returns max buffer size (itemcount) on output port \p i.
      */
     size_t max_output_buffer(size_t i=0);
 
     /*!
-     * \brief Sets max buffer size on all output ports.
+     * \brief Sets max buffer size (itemcount) on all output ports.
      */
     void set_max_output_buffer(size_t max_output_buffer);
 
     /*!
-     * \brief Sets max buffer size on output port \p port.
+     * \brief Sets max buffer size (itemcount) on output port \p port.
      */
     void set_max_output_buffer(int port, size_t max_output_buffer);
 
     /*!
-     * \brief Returns min buffer size on output port \p i.
+     * \brief Returns min buffer size (itemcount) on output port \p i.
      */
     size_t min_output_buffer(size_t i=0);
 
     /*!
-     * \brief Sets min buffer size on all output ports.
+     * \brief Sets min buffer size (itemcount) on all output ports.
      */
     void set_min_output_buffer(size_t min_output_buffer);
 
     /*!
-     * \brief Sets min buffer size on output port \p port.
+     * \brief Sets min buffer size (itemcount) on output port \p port.
      */
     void set_min_output_buffer(int port, size_t min_output_buffer);
 
diff --git a/gnuradio-runtime/lib/hier_block2.cc 
b/gnuradio-runtime/lib/hier_block2.cc
index 81d310a..4d2c460 100644
--- a/gnuradio-runtime/lib/hier_block2.cc
+++ b/gnuradio-runtime/lib/hier_block2.cc
@@ -29,7 +29,6 @@
 #include <gnuradio/flowgraph.h>
 #include "hier_block2_detail.h"
 #include <iostream>
-#include <stdio.h>
 
 namespace gr {
 
@@ -194,7 +193,6 @@ namespace gr {
   void
   hier_block2::set_max_output_buffer(size_t max_output_buffer)
   {
-    
     if(output_signature()->max_streams()>0)
     {
       if(d_detail->d_max_output_buffer.size() == 0)
diff --git a/gnuradio-runtime/lib/hier_block2_detail.cc 
b/gnuradio-runtime/lib/hier_block2_detail.cc
index 5b935d1..a735de3 100644
--- a/gnuradio-runtime/lib/hier_block2_detail.cc
+++ b/gnuradio-runtime/lib/hier_block2_detail.cc
@@ -30,8 +30,6 @@
 #include <stdexcept>
 #include <sstream>
 #include <boost/format.hpp>
-#include <stdio.h>
-#include <typeinfo>
 
 namespace gr {
 
@@ -526,12 +524,14 @@ namespace gr {
     // Get the min and max buffer length
     if(set_all_min_buff){
       if(HIER_BLOCK2_DETAIL_DEBUG)
-        printf("Getting (%s) min buffer\n",(d_owner->alias()).c_str());
+        std::cout << "Getting (" << (d_owner->alias()).c_str()
+                  << ") min buffer" << std::endl;
       min_buff = d_owner->min_output_buffer();
     }
     if(set_all_max_buff){
       if(HIER_BLOCK2_DETAIL_DEBUG)
-        printf("Getting (%s) max buffer\n",(d_owner->alias()).c_str());
+        std::cout << "Getting (" << (d_owner->alias()).c_str()
+                  << ") max buffer" << std::endl;
       max_buff = d_owner->max_output_buffer();
     }
 
@@ -554,7 +554,9 @@ namespace gr {
           if(bb != 0){
             if(bb->min_output_buffer(0) != min_buff){
               if(HIER_BLOCK2_DETAIL_DEBUG)
-                printf("Block (%s) min_buff 
(%ld)\n",(bb->alias()).c_str(),min_buff);
+                std::cout << "Block (" << (bb->alias()).c_str()
+                          << ") min_buff (" << min_buff
+                          << ")" << std::endl;
               bb->set_min_output_buffer(min_buff);
             }
           }
@@ -563,7 +565,9 @@ namespace gr {
             if(hh != 0){
               if(hh->min_output_buffer(0) != min_buff){
                 if(HIER_BLOCK2_DETAIL_DEBUG)
-                  printf("HBlock (%s) min_buff 
(%ld)\n",(hh->alias()).c_str(),min_buff);
+                  std::cout << "HBlock (" << (hh->alias()).c_str()
+                            << ") min_buff (" << min_buff
+                            << ")" << std::endl;
                 hh->set_min_output_buffer(min_buff);
               }
             }
@@ -577,7 +581,9 @@ namespace gr {
           if(bb != 0){
             if(bb->max_output_buffer(0) != max_buff){
               if(HIER_BLOCK2_DETAIL_DEBUG)
-                printf("Block (%s) max_buff 
(%ld)\n",(bb->alias()).c_str(),max_buff);
+                std::cout << "Block (" << (bb->alias()).c_str()
+                          << ") max_buff (" << max_buff
+                          << ")" << std::endl;
               bb->set_max_output_buffer(max_buff);
             }
           }
@@ -586,7 +592,9 @@ namespace gr {
             if(hh != 0){
               if(hh->max_output_buffer(0) != max_buff){
                 if(HIER_BLOCK2_DETAIL_DEBUG)
-                  printf("HBlock (%s) max_buff 
(%ld)\n",(hh->alias()).c_str(),max_buff);
+                  std::cout << "HBlock (" << (hh->alias()).c_str()
+                            << ") max_buff (" << max_buff
+                            << ")" << std::endl;
                 hh->set_max_output_buffer(max_buff);
               }
             }
@@ -608,7 +616,9 @@ namespace gr {
           if(bb != 0){
             if(bb->min_output_buffer(0) != min_buff){
               if(HIER_BLOCK2_DETAIL_DEBUG)
-                printf("Block (%s) min_buff 
(%ld)\n",(bb->alias()).c_str(),min_buff);
+                std::cout << "Block (" << (bb->alias()).c_str()
+                          << ") min_buff (" << min_buff
+                          << ")" << std::endl;
               bb->set_min_output_buffer(min_buff);
             }
           }
@@ -617,7 +627,9 @@ namespace gr {
             if(hh != 0){
               if(hh->min_output_buffer(0) != min_buff){
                 if(HIER_BLOCK2_DETAIL_DEBUG)
-                  printf("HBlock (%s) min_buff 
(%ld)\n",(hh->alias()).c_str(),min_buff);
+                  std::cout << "HBlock (" << (hh->alias()).c_str()
+                            << ") min_buff (" << min_buff
+                            << ")" << std::endl;
                 hh->set_min_output_buffer(min_buff);
               }
             }
@@ -631,7 +643,9 @@ namespace gr {
           if(bb != 0){
             if(bb->max_output_buffer(0) != max_buff){
               if(HIER_BLOCK2_DETAIL_DEBUG)
-                printf("Block (%s) max_buff 
(%ld)\n",(bb->alias()).c_str(),max_buff);
+                std::cout << "Block (" << (bb->alias()).c_str()
+                          << ") max_buff (" << max_buff
+                          << ")" << std::endl;
               bb->set_max_output_buffer(max_buff);
             }
           }
@@ -640,7 +654,9 @@ namespace gr {
             if(hh != 0){
               if(hh->max_output_buffer(0) != max_buff){
                 if(HIER_BLOCK2_DETAIL_DEBUG)
-                  printf("HBlock (%s) max_buff 
(%ld)\n",(hh->alias()).c_str(),max_buff);
+                  std::cout << "HBlock (" << (hh->alias()).c_str()
+                            << ") max_buff (" << max_buff
+                            << ")" << std::endl;
                 hh->set_max_output_buffer(max_buff);
               }
             }
@@ -762,7 +778,10 @@ namespace gr {
           if(bb != 0){
             int bb_src_port = d_outputs[i].port();
             if(HIER_BLOCK2_DETAIL_DEBUG)
-              printf("Block (%s) Port (%d) min_buff 
(%ld)\n",(bb->alias()).c_str(),bb_src_port,min_buff);
+              std::cout << "Block (" << (bb->alias()).c_str()
+                        << ") Port (" << bb_src_port
+                        << ") min_buff (" << min_buff
+                        << ")" << std::endl;
             bb->set_min_output_buffer(bb_src_port, min_buff);
           }
           else{
@@ -770,7 +789,10 @@ namespace gr {
             if(hh != 0){
               int hh_src_port = d_outputs[i].port();
               if(HIER_BLOCK2_DETAIL_DEBUG)
-                printf("HBlock (%s) Port (%d) min_buff 
(%ld)\n",(hh->alias()).c_str(),hh_src_port,min_buff);
+                std::cout << "HBlock (" << (hh->alias()).c_str()
+                          << ") Port (" << hh_src_port
+                          << ") min_buff ("<< min_buff
+                          << ")" << std::endl;
               hh->set_min_output_buffer(hh_src_port, min_buff);
             }
           }
@@ -783,7 +805,10 @@ namespace gr {
           if(bb != 0){
             int bb_src_port = d_outputs[i].port();
             if(HIER_BLOCK2_DETAIL_DEBUG)
-              printf("Block (%s) Port (%d) max_buff 
(%ld)\n",(bb->alias()).c_str(),bb_src_port,max_buff);
+              std::cout << "Block (" << (bb->alias()).c_str()
+                        << ") Port (" << bb_src_port
+                        << ") max_buff (" << max_buff
+                        << ")" << std::endl;
             bb->set_max_output_buffer(bb_src_port, max_buff);
           }
           else{
@@ -791,7 +816,10 @@ namespace gr {
             if(hh != 0){
               int hh_src_port = d_outputs[i].port();
               if(HIER_BLOCK2_DETAIL_DEBUG)
-                printf("HBlock (%s) Port (%d) max_buff 
(%ld)\n",(hh->alias()).c_str(),hh_src_port,max_buff);
+                std::cout << "HBlock (" << (hh->alias()).c_str()
+                          << ") Port (" << hh_src_port
+                          << ") max_buff (" << max_buff
+                          << ")" << std::endl;
               hh->set_max_output_buffer(hh_src_port, max_buff);
             }
           }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]