commit-gnuradio
[Top][All Lists]
Advanced

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

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


From: jcorgan
Subject: [Commit-gnuradio] r3954 - gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime
Date: Wed, 8 Nov 2006 04:32:01 -0700 (MST)

Author: jcorgan
Date: 2006-11-08 04:32:01 -0700 (Wed, 08 Nov 2006)
New Revision: 3954

Modified:
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.cc
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.h
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.cc
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.h
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.i
Log:
Work in progress.  Moved check_topology into gr_basic_block
so it can be a virtual method for hierarchical blocks as well.


Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.cc
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.cc
   2006-11-08 03:11:35 UTC (rev 3953)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.cc
   2006-11-08 11:32:01 UTC (rev 3954)
@@ -57,3 +57,11 @@
 {
     return shared_from_this();
 }
+
+// default implementation
+
+bool
+gr_basic_block::check_topology(int ninputs, int noutputs)
+{
+    return true;
+}

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.h
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.h
    2006-11-08 03:11:35 UTC (rev 3953)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.h
    2006-11-08 11:32:01 UTC (rev 3954)
@@ -67,6 +67,21 @@
     gr_io_signature_sptr input_signature() const  { return d_input_signature; }
     gr_io_signature_sptr output_signature() const { return d_output_signature; 
}
     gr_basic_block_sptr basic_block();
+
+    /*!
+     * \brief Confirm that ninputs and noutputs is an acceptable combination.
+     *
+     * \param ninputs  number of input streams connected
+     * \param noutputs number of output streams connected
+     *
+     * \returns true if this is a valid configuration for this block.
+     *
+     * This function is called by the runtime system whenever the
+     * topology changes.  Most classes do not need to override this.
+     * This check is in addition to the constraints specified by the input
+     * and output gr_io_signatures.
+     */
+    virtual bool check_topology (int ninputs, int noutputs);
 };
 
 long gr_basic_block_ncurrently_allocated();

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
    2006-11-08 03:11:35 UTC (rev 3953)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
    2006-11-08 11:32:01 UTC (rev 3954)
@@ -41,6 +41,7 @@
     gr_io_signature_sptr output_signature() const;
     long unique_id() const;
     gr_basic_block_sptr basic_block();
+    bool check_topology (int ninputs, int noutputs);
 };
 
 %rename(block_ncurrently_allocated) gr_basic_block_ncurrently_allocated;

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.cc
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.cc
 2006-11-08 03:11:35 UTC (rev 3953)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.cc
 2006-11-08 11:32:01 UTC (rev 3954)
@@ -56,12 +56,6 @@
 // default implementation
 
 bool
-gr_block::check_topology (int ninputs, int noutputs)
-{
-  return true;
-}
-
-bool
 gr_block::start()
 {
   return true;

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.h
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.h
  2006-11-08 03:11:35 UTC (rev 3953)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.h
  2006-11-08 11:32:01 UTC (rev 3954)
@@ -113,21 +113,6 @@
                            gr_vector_void_star &output_items) = 0;
 
   /*!
-   * \brief Confirm that ninputs and noutputs is an acceptable combination.
-   *
-   * \param ninputs    number of input streams connected
-   * \param noutputs   number of output streams connected
-   *
-   * \returns true if this is a valid configuration for this block.
-   *
-   * This function is called by the runtime system whenever the
-   * topology changes.  Most classes do not need to override this.
-   * This check is in addition to the constraints specified by the input
-   * and output gr_io_signatures.
-   */
-  virtual bool check_topology (int ninputs, int noutputs);
-
-  /*!
    * \brief Called to enable drivers, etc for i/o devices.
    *
    * This allows a block to enable an associated driver to begin

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.i
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.i
  2006-11-08 03:11:35 UTC (rev 3953)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.i
  2006-11-08 11:32:01 UTC (rev 3954)
@@ -46,7 +46,6 @@
   int  output_multiple () const;
   double relative_rate () const;
 
-  bool check_topology (int ninputs, int noutputs);
   bool start();
   bool stop();
 





reply via email to

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