commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r3380 - gnuradio/branches/developers/eb/mb/mblock/src/


From: eb
Subject: [Commit-gnuradio] r3380 - gnuradio/branches/developers/eb/mb/mblock/src/lib
Date: Tue, 22 Aug 2006 20:18:17 -0600 (MDT)

Author: eb
Date: 2006-08-22 20:18:16 -0600 (Tue, 22 Aug 2006)
New Revision: 3380

Added:
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.cc
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.h
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime.cc
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime.h
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime_impl.cc
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime_impl.h
Modified:
   gnuradio/branches/developers/eb/mb/mblock/src/lib/Makefile.am
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_common.h
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.cc
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.h
Log:
work-in-progress

Modified: gnuradio/branches/developers/eb/mb/mblock/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/Makefile.am       
2006-08-22 18:30:43 UTC (rev 3379)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/Makefile.am       
2006-08-23 02:18:16 UTC (rev 3380)
@@ -33,10 +33,13 @@
 # These are the source files that go into the mblock shared library
 libmblock_la_SOURCES =                 \
        mb_mblock.cc                    \
+       mb_mblock_impl.cc               \
        mb_message.cc                   \
        mb_port.cc                      \
        mb_port_class.cc                \
-       mb_protocol_class.cc            
+       mb_protocol_class.cc            \
+       mb_runtime.cc                   \
+       mb_runtime_impl.cc              
 
 
 # magic flags
@@ -53,9 +56,13 @@
        mb_message.h                    \
        mb_port.h                       \
        mb_port_class.h                 \
-       mb_protocol_class.h             
+       mb_protocol_class.h             \
+       mb_runtime.h                    
 
+
 noinst_HEADERS =                       \
+       mb_mblock_impl.h                \
+       mb_runtime_impl.h               \
        qa_mblock.h                     
 
 

Modified: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_common.h
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_common.h       
2006-08-22 18:30:43 UTC (rev 3379)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_common.h       
2006-08-23 02:18:16 UTC (rev 3380)
@@ -30,6 +30,18 @@
 
 
 
+class mb_runtime;
+typedef boost::shared_ptr<mb_runtime> mb_runtime_sptr;
+
+class mb_runtime_impl;
+typedef boost::shared_ptr<mb_runtime_impl> mb_runtime_impl_sptr;
+
+class mb_mblock;
+typedef boost::shared_ptr<mb_mblock> mb_mblock_sptr;
+
+class mb_mblock_impl;
+typedef boost::shared_ptr<mb_mblock_impl> mb_mblock_impl_sptr;
+
 class mb_port_class;
 typedef boost::shared_ptr<mb_port_class> mb_port_class_sptr;
 

Modified: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.cc
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.cc      
2006-08-22 18:30:43 UTC (rev 3379)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.cc      
2006-08-23 02:18:16 UTC (rev 3380)
@@ -26,7 +26,8 @@
 #include <mb_mblock.h>
 #include <mb_protocol_class.h>
 
-mb_mblock::mb_mblock()
+mb_mblock::mb_mblock(mb_runtime_sptr runtime)
+  : d_runtime(runtime)
 {
   // FIXME
 }

Modified: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.h
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.h       
2006-08-22 18:30:43 UTC (rev 3379)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.h       
2006-08-23 02:18:16 UTC (rev 3380)
@@ -60,12 +60,15 @@
 class mb_mblock
 {
 private:
-  friend class mb_runtime;
+  mb_mblock_impl_sptr          d_impl;         // implementation details
+  mb_runtime_sptr              d_runtime;      // associated runtime
 
   // NOT IMPLEMENTED
   mb_mblock (const mb_mblock &rhs);            // no copy constructor
   mb_mblock &operator= (const mb_mblock &rhs);  // no assignment operator
 
+  friend class mb_runtime;
+
 protected:
   /*!
    * \brief mblock constructor.
@@ -89,8 +92,10 @@
    * mblock by invoking its init_fsm method.
    *
    * At this point the system is live.
+   *
+   * \param runtime  The runtime system to which this mblock belongs.
    */
-  mb_mblock();
+  mb_mblock(mb_runtime_sptr runtime);
 
   /*!
    * \brief Called by the runtime system to instruct this mblock to

Added: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.cc
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.cc         
                (rev 0)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.cc 
2006-08-23 02:18:16 UTC (rev 3380)
@@ -0,0 +1,36 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <mb_mblock_impl.h>
+
+mb_mblock_impl::mb_mblock_impl()
+{
+  // FIXME
+}
+
+mb_mblock_impl::~mb_mblock_impl()
+{
+  // FIXME
+}

Added: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.h
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.h          
                (rev 0)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.h  
2006-08-23 02:18:16 UTC (rev 3380)
@@ -0,0 +1,46 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_MB_MBLOCK_IMPL_H
+#define INCLUDED_MB_MBLOCK_IMPL_H
+
+#include <mb_common.h>
+
+/*!
+ * \brief The private implementation details of the mblock system.
+ */
+class mb_mblock_impl
+{
+private:
+
+  // NOT IMPLEMENTED
+  mb_mblock_impl(const mb_mblock_impl &rhs);            // no copy constructor
+  mb_mblock_impl &operator=(const mb_mblock_impl &rhs);  // no assignment 
operator
+
+  mb_mblock_impl();
+
+  friend class mb_mblock;
+
+public:
+  ~mb_mblock_impl();
+};
+
+
+#endif /* INCLUDED_MB_MBLOCK_IMPL_H */

Added: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime.cc
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime.cc             
                (rev 0)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime.cc     
2006-08-23 02:18:16 UTC (rev 3380)
@@ -0,0 +1,52 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <mb_runtime.h>
+#include <mb_runtime_impl.h>
+
+mb_runtime_sptr
+mb_make_runtime()
+{
+  return mb_runtime_sptr(new mb_runtime());
+}
+
+mb_runtime::mb_runtime()
+  : d_impl(mb_runtime_impl_sptr(new mb_runtime_impl()))
+{
+  // FIXME
+  
+}
+
+mb_runtime::~mb_runtime()
+{
+  // FIXME
+}
+
+bool
+mb_runtime::run()
+{
+  // FIXME
+  return true;
+}

Added: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime.h
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime.h              
                (rev 0)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime.h      
2006-08-23 02:18:16 UTC (rev 3380)
@@ -0,0 +1,67 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_MB_RUNTIME_H
+#define INCLUDED_MB_RUNTIME_H
+
+#include <mb_common.h>
+
+/*!
+ * \brief Public constructor for mb_runtime.
+ */
+mb_runtime_sptr mb_make_runtime();
+
+/*!
+ * \brief Runtime support for m-blocks
+ *
+ * There should generally be only a single instance of this class.
+ *
+ * It should be created by the top-level initialization code,
+ * and that instance should be passed into the constructor of the
+ * top-level mblock.
+ */
+class mb_runtime
+{
+private:
+  mb_runtime_impl_sptr         d_impl;           // implementation details
+
+  // NOT IMPLEMENTED
+  mb_runtime (const mb_runtime &rhs);            // no copy constructor
+  mb_runtime &operator= (const mb_runtime &rhs);  // no assignment operator
+
+  mb_runtime();
+
+  friend mb_runtime_sptr mb_make_runtime();
+
+public:
+  ~mb_runtime();
+
+  /*!
+   * \brief Run the mblocks...
+   *
+   * This routine turns into the m-block scheduler, and
+   * blocks until the system is shutdown.
+   *
+   * \returns true if the system ran successfully.
+   */
+  bool run();
+};
+
+#endif /* INCLUDED_MB_RUNTIME_H */

Added: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime_impl.cc
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime_impl.cc        
                        (rev 0)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime_impl.cc        
2006-08-23 02:18:16 UTC (rev 3380)
@@ -0,0 +1,36 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <mb_runtime_impl.h>
+
+mb_runtime_impl::mb_runtime_impl()
+{
+  // FIXME
+}
+
+mb_runtime_impl::~mb_runtime_impl()
+{
+  // FIXME
+}

Added: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime_impl.h
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime_impl.h         
                (rev 0)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_runtime_impl.h 
2006-08-23 02:18:16 UTC (rev 3380)
@@ -0,0 +1,46 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_MB_RUNTIME_IMPL_H
+#define INCLUDED_MB_RUNTIME_IMPL_H
+
+#include <mb_common.h>
+
+/*!
+ * \brief The private implementation details of the runtime system.
+ */
+class mb_runtime_impl
+{
+private:
+
+  // NOT IMPLEMENTED
+  mb_runtime_impl(const mb_runtime_impl &rhs);            // no copy 
constructor
+  mb_runtime_impl &operator=(const mb_runtime_impl &rhs);  // no assignment 
operator
+
+  mb_runtime_impl();
+
+  friend class mb_runtime;
+
+public:
+  ~mb_runtime_impl();
+};
+
+
+#endif /* INCLUDED_MB_RUNTIME_IMPL_H */





reply via email to

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