commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r3910 - gnuradio/branches/developers/jcorgan/hier/gnur


From: jcorgan
Subject: [Commit-gnuradio] r3910 - gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime
Date: Tue, 31 Oct 2006 14:56:46 -0700 (MST)

Author: jcorgan
Date: 2006-10-31 14:56:45 -0700 (Tue, 31 Oct 2006)
New Revision: 3910

Modified:
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.cc
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.h
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2_impl.cc
Log:
Work in progress.

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.cc
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.cc
   2006-10-31 19:15:02 UTC (rev 3909)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.cc
   2006-10-31 21:56:45 UTC (rev 3910)
@@ -64,6 +64,8 @@
        gr_basic_block_sptr src_block = d_impl->lookup_component(src_name);
        if (!src_block)
            throw std::invalid_argument("Undefined from name");
+       if (GR_HIER_BLOCK2_DEBUG)
+           std::cout << "Connecting from block " << src_block << std::endl;
        src_io_signature = src_block->output_signature();
     }
     else
@@ -74,6 +76,8 @@
        gr_basic_block_sptr dst_block = d_impl->lookup_component(dst_name);
        if (!dst_block)
            throw std::invalid_argument("Undefined to name");
+       if (GR_HIER_BLOCK2_DEBUG)
+           std::cout << "Connecting to block " << dst_block << std::endl;
        dst_io_signature = dst_block->output_signature();
     }
     else

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.h
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.h
    2006-10-31 19:15:02 UTC (rev 3909)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2.h
    2006-10-31 21:56:45 UTC (rev 3910)
@@ -66,4 +66,12 @@
                  const std::string to_name, int to_port);
 };
 
+#if GR_HIER_BLOCK2_DEBUG
+inline std::ostream &operator << (std::ostream &os, gr_basic_block_sptr 
basic_block)
+{
+    os << basic_block->name() << "(" << basic_block->unique_id() << ")";
+    return os;
+}
+#endif /* GR_HIER_BLOCK2_DEBUG */
+
 #endif /* INCLUDED_GR_HIER_BLOCK2_H */

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2_impl.cc
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2_impl.cc
      2006-10-31 19:15:02 UTC (rev 3909)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_hier_block2_impl.cc
      2006-10-31 21:56:45 UTC (rev 3910)
@@ -77,8 +77,10 @@
     if (port < 0)
        throw std::invalid_argument("port number must not be negative");
        
-    if (sig->max_streams() >= 0 && port >= sig->max_streams())
+    if (sig->max_streams() >= 0 && port >= sig->max_streams()) {
+       std::cerr << "Port " << port << " exceeds max streams " << 
sig->max_streams() << std::endl;
        throw std::invalid_argument("port number exceeds max streams");
+    }
 }
 
 void gr_hier_block2_impl::check_dst_not_used(const std::string name, int port)





reply via email to

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