Move mblock library include files into separate library. Updates to usrp in-band...
authorjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 20 Dec 2008 20:54:52 +0000 (20:54 +0000)
committerjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 20 Dec 2008 20:54:52 +0000 (20:54 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10144 221aa14e-8319-0410-a670-987f0aec2ac5

87 files changed:
config/grc_mblock.m4
mblock/src/Makefile.am
mblock/src/include/Makefile.am [new file with mode: 0644]
mblock/src/include/mblock/Makefile.am [new file with mode: 0644]
mblock/src/include/mblock/class_registry.h [new file with mode: 0644]
mblock/src/include/mblock/common.h [new file with mode: 0644]
mblock/src/include/mblock/exception.h [new file with mode: 0644]
mblock/src/include/mblock/mblock.h [new file with mode: 0644]
mblock/src/include/mblock/message.h [new file with mode: 0644]
mblock/src/include/mblock/msg_accepter.h [new file with mode: 0644]
mblock/src/include/mblock/msg_queue.h [new file with mode: 0644]
mblock/src/include/mblock/port.h [new file with mode: 0644]
mblock/src/include/mblock/protocol_class.h [new file with mode: 0644]
mblock/src/include/mblock/runtime.h [new file with mode: 0644]
mblock/src/include/mblock/time.h [new file with mode: 0644]
mblock/src/lib/Makefile.am
mblock/src/lib/benchmark_send.cc
mblock/src/lib/mb_class_registry.cc
mblock/src/lib/mb_class_registry.h [deleted file]
mblock/src/lib/mb_common.h [deleted file]
mblock/src/lib/mb_endpoint.h
mblock/src/lib/mb_exception.cc
mblock/src/lib/mb_exception.h [deleted file]
mblock/src/lib/mb_mblock.cc
mblock/src/lib/mb_mblock.h [deleted file]
mblock/src/lib/mb_mblock_impl.cc
mblock/src/lib/mb_mblock_impl.h
mblock/src/lib/mb_message.cc
mblock/src/lib/mb_message.h [deleted file]
mblock/src/lib/mb_msg_accepter.cc
mblock/src/lib/mb_msg_accepter.h [deleted file]
mblock/src/lib/mb_msg_accepter_msgq.cc
mblock/src/lib/mb_msg_accepter_msgq.h
mblock/src/lib/mb_msg_accepter_smp.cc
mblock/src/lib/mb_msg_accepter_smp.h
mblock/src/lib/mb_msg_queue.cc
mblock/src/lib/mb_msg_queue.h [deleted file]
mblock/src/lib/mb_port.cc
mblock/src/lib/mb_port.h [deleted file]
mblock/src/lib/mb_port_simple.cc
mblock/src/lib/mb_port_simple.h
mblock/src/lib/mb_protocol_class.cc
mblock/src/lib/mb_protocol_class.h [deleted file]
mblock/src/lib/mb_runtime.cc
mblock/src/lib/mb_runtime.h [deleted file]
mblock/src/lib/mb_runtime_base.cc
mblock/src/lib/mb_runtime_base.h
mblock/src/lib/mb_runtime_nop.cc
mblock/src/lib/mb_runtime_thread_per_block.cc
mblock/src/lib/mb_runtime_thread_per_block.h
mblock/src/lib/mb_time.h [deleted file]
mblock/src/lib/mb_timer_queue.h
mblock/src/lib/mb_worker.cc
mblock/src/lib/mb_worker.h
mblock/src/lib/mbi_runtime_lock.h
mblock/src/lib/qa_bitset.cc
mblock/src/lib/qa_disconnect.cc
mblock/src/lib/qa_mblock_prims.cc
mblock/src/lib/qa_mblock_send.cc
mblock/src/lib/qa_mblock_sys.cc
mblock/src/lib/qa_timeouts.cc
mblock/src/scheme/gnuradio/compile-mbh.scm
usrp/host/apps-inband/Makefile.am
usrp/host/apps-inband/read_packets.cc
usrp/host/apps-inband/test_usrp_inband_2rx.cc
usrp/host/apps-inband/test_usrp_inband_2tx.cc
usrp/host/apps-inband/test_usrp_inband_overrun.cc
usrp/host/apps-inband/test_usrp_inband_ping.cc
usrp/host/apps-inband/test_usrp_inband_registers.cc
usrp/host/apps-inband/test_usrp_inband_rx.cc
usrp/host/apps-inband/test_usrp_inband_timestamps.cc
usrp/host/apps-inband/test_usrp_inband_tx.cc
usrp/host/apps-inband/test_usrp_inband_underrun.cc
usrp/host/lib/inband/qa_inband_usrp_server.cc
usrp/host/lib/inband/usrp_inband_usb_packet.h
usrp/host/lib/inband/usrp_rx.cc
usrp/host/lib/inband/usrp_rx.h
usrp/host/lib/inband/usrp_rx_stub.cc
usrp/host/lib/inband/usrp_rx_stub.h
usrp/host/lib/inband/usrp_server.cc
usrp/host/lib/inband/usrp_server.h
usrp/host/lib/inband/usrp_tx.cc
usrp/host/lib/inband/usrp_tx.h
usrp/host/lib/inband/usrp_tx_stub.cc
usrp/host/lib/inband/usrp_tx_stub.h
usrp/host/lib/inband/usrp_usb_interface.cc
usrp/host/lib/inband/usrp_usb_interface.h

index e262f25b8613d79ce9528c622b5064b5501fac97..e3ae1817f10966882e4b0ffd7e1837048d53d0a9 100644 (file)
@@ -36,7 +36,7 @@ AC_DEFUN([GRC_MBLOCK],[
     fi
     if test $passed != with; then
        dnl how and where to find INCLUDES and LA
-       mblock_INCLUDES="-I\${abs_top_srcdir}/mblock/src/lib"
+       mblock_INCLUDES="-I\${abs_top_srcdir}/mblock/src/include"
         mblock_LA="\${abs_top_builddir}/mblock/src/lib/libmblock.la"
     fi
 
@@ -45,6 +45,8 @@ AC_DEFUN([GRC_MBLOCK],[
         mblock/mblock.pc \
         mblock/doc/Makefile \
         mblock/src/Makefile \
+       mblock/src/include/Makefile \
+       mblock/src/include/mblock/Makefile \
         mblock/src/lib/Makefile \
         mblock/src/scheme/Makefile \
         mblock/src/scheme/gnuradio/Makefile \
index 52f60f47640c21dd0f70ed8e489d3bd0aeea3ac3..60995c9720e6e219f723d0c3e072b611d7db461d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2006 Free Software Foundation, Inc.
+# Copyright 2004,2006,2008 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -19,4 +19,4 @@
 # Boston, MA 02110-1301, USA.
 # 
 
-SUBDIRS = lib scheme
+SUBDIRS = include lib scheme
diff --git a/mblock/src/include/Makefile.am b/mblock/src/include/Makefile.am
new file mode 100644 (file)
index 0000000..d567298
--- /dev/null
@@ -0,0 +1,24 @@
+#
+# Copyright 2008 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 3, 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 GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+include $(top_srcdir)/Makefile.common
+
+SUBDIRS = mblock
diff --git a/mblock/src/include/mblock/Makefile.am b/mblock/src/include/mblock/Makefile.am
new file mode 100644 (file)
index 0000000..e36215a
--- /dev/null
@@ -0,0 +1,37 @@
+#
+# Copyright 2008 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 3, 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 GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+include $(top_srcdir)/Makefile.common
+
+mbincludedir = $(includedir)/mblock
+
+mbinclude_HEADERS = \
+       common.h \
+       class_registry.h \
+       exception.h \
+       mblock.h \
+       message.h \
+       msg_accepter.h \
+       msg_queue.h \
+       port.h \
+       protocol_class.h \
+       runtime.h \
+       time.h
diff --git a/mblock/src/include/mblock/class_registry.h b/mblock/src/include/mblock/class_registry.h
new file mode 100644 (file)
index 0000000..b94a7cb
--- /dev/null
@@ -0,0 +1,51 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2008 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 3, 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_CLASS_REGISTRY_H
+#define INCLUDED_MB_CLASS_REGISTRY_H
+
+#include <mblock/common.h>
+
+//! conceptually, pointer to constructor
+typedef mb_mblock_sptr (*mb_mblock_maker_t)(mb_runtime *runtime,
+                                           const std::string &instance_name,
+                                           pmt_t user_arg);
+
+/*
+ * \brief Maintain mapping between mblock class_name and factory (maker)
+ */
+class mb_class_registry : public boost::noncopyable {
+public:
+  static bool register_maker(const std::string &name, mb_mblock_maker_t maker);
+  static bool lookup_maker(const std::string &name, mb_mblock_maker_t *maker);
+};
+
+template<class mblock>
+mb_mblock_sptr mb_mblock_maker(mb_runtime *runtime,
+                              const std::string &instance_name,
+                              pmt_t user_arg)
+{
+  return mb_mblock_sptr(new mblock(runtime, instance_name, user_arg));
+}
+
+#define REGISTER_MBLOCK_CLASS(name) \
+  bool __RBC__ ## name = mb_class_registry::register_maker(#name, &mb_mblock_maker<name>)
+
+#endif /* INCLUDED_MB_CLASS_REGISTRY_H */
diff --git a/mblock/src/include/mblock/common.h b/mblock/src/include/mblock/common.h
new file mode 100644 (file)
index 0000000..2507d05
--- /dev/null
@@ -0,0 +1,94 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2007,2008 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 3, 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_COMMON_H
+#define INCLUDED_MB_COMMON_H
+
+#include <pmt.h>
+#include <vector>
+#include <stdexcept>
+#include <boost/utility.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/weak_ptr.hpp>
+
+/*
+ * The priority type and valid range
+ */
+typedef unsigned int   mb_pri_t;
+static const mb_pri_t  MB_PRI_BEST    = 0;
+static const mb_pri_t  MB_PRI_DEFAULT = 4; 
+static const mb_pri_t   MB_PRI_WORST   = 7;
+static const mb_pri_t  MB_NPRI = MB_PRI_WORST + 1;       // number of valid priorities 
+
+/*!
+ * \brief return true iff priority a is better than priority b
+ */
+inline static bool
+mb_pri_better(mb_pri_t a, mb_pri_t b)
+{
+  return a < b;
+}
+
+/*!
+ * \brief return true iff priority a is worse than priority b
+ */
+inline static bool
+mb_pri_worse(mb_pri_t a, mb_pri_t b)
+{
+  return a > b;
+}
+
+/*!
+ * \brief ensure that pri is valid
+ */
+inline static mb_pri_t
+mb_pri_clamp(mb_pri_t p)
+{
+  return p < MB_NPRI ? p : MB_NPRI - 1;
+}
+
+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;
+typedef boost::shared_ptr<mb_port> mb_port_sptr;
+
+//class mb_port_detail;
+//typedef boost::shared_ptr<mb_port_detail> mb_port_detail_sptr;
+
+class mb_msg_accepter;
+typedef boost::shared_ptr<mb_msg_accepter> mb_msg_accepter_sptr;
+
+class mb_message;
+typedef boost::shared_ptr<mb_message> mb_message_sptr;
+
+class mb_msg_queue;
+typedef boost::shared_ptr<mb_msg_queue> mb_msg_queue_sptr;
+
+#endif /* INCLUDED_MB_COMMON_H */
diff --git a/mblock/src/include/mblock/exception.h b/mblock/src/include/mblock/exception.h
new file mode 100644 (file)
index 0000000..6cc4566
--- /dev/null
@@ -0,0 +1,118 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2008 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 3, 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_EXCEPTION_H
+#define INCLUDED_MB_EXCEPTION_H
+
+#include <stdexcept>
+
+class mb_mblock;
+
+
+class mbe_base : public std::logic_error
+{
+public:
+  mbe_base(mb_mblock *mb, const std::string &msg);
+};
+
+class mbe_not_implemented : public mbe_base
+{
+public:
+  mbe_not_implemented(mb_mblock *mb, const std::string &msg);
+};
+
+class mbe_no_such_class : public mbe_base
+{
+public:
+  mbe_no_such_class(mb_mblock *, const std::string &class_name);
+};
+
+class mbe_no_such_component : public mbe_base
+{
+public:
+  mbe_no_such_component(mb_mblock *, const std::string &component_name);
+};
+
+class mbe_duplicate_component : public mbe_base
+{
+public:
+  mbe_duplicate_component(mb_mblock *, const std::string &component_name);
+};
+
+class mbe_no_such_port : public mbe_base
+{
+public:
+  mbe_no_such_port(mb_mblock *, const std::string &port_name);
+};
+
+
+class mbe_duplicate_port : public mbe_base
+{
+public:
+  mbe_duplicate_port(mb_mblock *, const std::string &port_name);
+};
+
+class mbe_already_connected : public mbe_base
+{
+public:
+  mbe_already_connected(mb_mblock *, const std::string &comp_name,
+                       const std::string &port_name);
+};
+
+class mbe_incompatible_ports : public mbe_base
+{
+public:
+  mbe_incompatible_ports(mb_mblock *,
+                        const std::string &comp1_name,
+                        const std::string &port1_name,
+                        const std::string &comp2_name,
+                        const std::string &port2_name);
+};
+
+class mbe_invalid_port_type : public mbe_base
+{
+public:
+  mbe_invalid_port_type(mb_mblock *, const std::string &comp_name,
+                       const std::string &port_name);
+};
+
+class mbe_mblock_failed : public mbe_base
+{
+public:
+  mbe_mblock_failed(mb_mblock *, const std::string &msg);
+};
+
+
+
+// not derived from mbe_base to simplify try/catch
+class mbe_terminate
+{
+public:
+  mbe_terminate();
+};
+
+// not derived from mbe_base to simplify try/catch
+class mbe_exit
+{
+public:
+  mbe_exit();
+};
+
+#endif /* INCLUDED_MB_EXCEPTION_H */
diff --git a/mblock/src/include/mblock/mblock.h b/mblock/src/include/mblock/mblock.h
new file mode 100644 (file)
index 0000000..14517ff
--- /dev/null
@@ -0,0 +1,318 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2008 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 3, 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_H
+#define INCLUDED_MB_MBLOCK_H
+
+#include <mblock/common.h>
+#include <mblock/message.h>
+#include <mblock/port.h>
+#include <mblock/time.h>
+
+
+/*!
+ * Abstract class implementing visitor pattern
+ * \ingroup internal
+ */
+class mb_visitor
+{
+public:
+  virtual ~mb_visitor();
+  virtual bool operator()(mb_mblock *mblock) = 0;
+};
+
+// ----------------------------------------------------------------------
+
+/*!
+ * \brief Parent class for all message passing blocks
+ *
+ * Subclass this to define your mblocks.
+ */
+class mb_mblock : boost::noncopyable,
+                 public boost::enable_shared_from_this<mb_mblock>
+{
+private:
+  mb_mblock_impl_sptr          d_impl;         // implementation details
+
+  friend class mb_runtime;
+  friend class mb_mblock_impl;
+  friend class mb_worker;
+
+protected:
+  /*!
+   * \brief mblock constructor.
+   *
+   * Initializing all mblocks in the system is a 3 step procedure.
+   *
+   * The top level mblock's constructor is run.  That constructor 
+   * (a) registers all of its ports using define_port, (b) registers any
+   * subcomponents it may have via the define_component method, and
+   * then (c) issues connect calls to wire its subcomponents together.
+   *
+   * \param runtime the runtime associated with this mblock
+   * \param instance_name specify the name of this instance
+   *        (for debugging, NUMA mapping, etc)
+   * \param user_arg argument passed by user to constructor
+   *        (ignored by the mb_mblock base class)
+   */
+  mb_mblock(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
+
+public:
+  /*!
+   * \brief Called by the runtime system to execute the initial
+   * transition of the finite state machine.
+   *
+   * This method is called by the runtime after all blocks are
+   * constructed and before the first message is delivered.  Override
+   * this to initialize your finite state machine.
+   */
+  virtual void initial_transition();
+
+protected:
+  /*!
+   * \brief Called by the runtime system when there's a message to handle.
+   *
+   * Override this to define your behavior.
+   *
+   * Do not issue any potentially blocking calls in this method.  This
+   * includes things such reads or writes on sockets, pipes or slow
+   * i/o devices.
+   */
+  virtual void handle_message(mb_message_sptr msg);
+
+  /*!
+   * \brief Define a port.
+   *
+   * EXTERNAL and RELAY ports are part of our peer interface.
+   * INTERNAL ports are used to talk to sub-components.
+   *
+   * \param port_name    The name of the port (must be unique within this mblock).
+   * \param protocol_class_name        The name of the protocol class associated with
+   *                           this port.  It must already be defined.
+   * \param conjugated   Are the incoming and outgoing message sets swapped?
+   * \param port_type    INTERNAL, EXTERNAL or RELAY.
+   */
+  mb_port_sptr
+  define_port(const std::string &port_name,
+             const std::string &protocol_class_name,
+             bool conjugated,
+             mb_port::port_type_t port_type);
+
+  /*!
+   * \brief Define a subcomponent by name.
+   *
+   * Called within the constructor to tell the system the
+   * names and identities of our sub-component mblocks.
+   *
+   * \param component_name  The name of the sub-component (must be unique with this mblock).
+   * \param class_name      The class of the instance that is to be created.
+   * \param user_arg The argument to pass to the constructor of the component.
+   */
+  void
+  define_component(const std::string &component_name,
+                  const std::string &class_name,
+                  pmt_t user_arg = PMT_NIL);
+
+  /*!
+   * \brief connect endpoint_1 to endpoint_2
+   *
+   * \param comp_name1  component on one end of the connection
+   * \param port_name1  the name of the port on comp1
+   * \param comp_name2  component on the other end of the connection
+   * \param port_name2  the name of the port on comp2
+   *
+   * An endpoint is specified by the component's local name (given as
+   * component_name in the call to register_component) and the name of
+   * the port on that component.
+   *
+   * To connect an internal or relay port, use "self" as the component name.
+   */
+  void
+  connect(const std::string &comp_name1, const std::string &port_name1,
+         const std::string &comp_name2, const std::string &port_name2);
+
+  /*!
+   * \brief disconnect endpoint_1 from endpoint_2
+   *
+   * \param comp_name1  component on one end of the connection
+   * \param port_name1  the name of the port on comp1
+   * \param comp_name2  component on the other end of the connection
+   * \param port_name2  the name of the port on comp2
+   *
+   * An endpoint is specified by the component's local name (given as
+   * component_name in the call to register_component) and the name of
+   * the port on that component.
+   *
+   * To disconnect an internal or relay port, use "self" as the component name.
+   */
+  void
+  disconnect(const std::string &comp_name1, const std::string &port_name1,
+            const std::string &comp_name2, const std::string &port_name2);
+
+  /*!
+   * \brief disconnect all connections to specified component
+   * \param component_name component to disconnect
+   */
+  void
+  disconnect_component(const std::string &component_name);
+
+  /*!
+   * \brief disconnect all connections to all components
+   */
+  void
+  disconnect_all();
+
+  /*!
+   * \brief Return number of connections (QA mostly)
+   */
+  int
+  nconnections() const;
+
+  //! Set the class name
+  void set_class_name(const std::string &name);
+
+  /*!
+   * \brief Tell runtime that we are done.
+   *
+   * This method does not return.
+   */
+  void exit();
+
+  /*!
+   * \brief Ask runtime to execute the shutdown procedure for all blocks.
+   * 
+   * \param result sets value of \p result output argument of runtime->run(...)
+   *
+   * The runtime first sends a maximum priority %shutdown message to
+   * all blocks.  All blocks should handle the %shutdown message,
+   * perform whatever clean up is required, and call this->exit();
+   *
+   * After a period of time (~100ms), any blocks which haven't yet
+   * called this->exit() are sent a maximum priority %halt message.
+   * %halt is detected in main_loop, and this->exit() is called.
+   *
+   * After an additional period of time (~100ms), any blocks which
+   * still haven't yet called this->exit() are sent a SIG<FOO> (TBD)
+   * signal, which will blow them out of any blocking system calls and
+   * raise an mbe_terminate exception.  The default top-level
+   * runtime-provided exception handler will call this->exit() to
+   * finish the process.
+   *
+   * runtime->run(...) returns when all blocks have called exit.
+   */
+  void shutdown_all(pmt_t result);
+
+  /*!
+   * \brief main event dispatching loop
+   *
+   * Although it is possible to override this, the default implementation
+   * should work for virtually all cases.
+   */
+  virtual void main_loop();
+  
+public:
+  virtual ~mb_mblock();
+
+  //! Return instance name of this block
+  std::string instance_name() const;
+
+  //! Return the class name of this block
+  std::string class_name() const;
+
+  //! Set the instance name of this block.
+  void set_instance_name(const std::string &name);
+  
+  //! Return the parent of this mblock, or 0 if we're the top-level block.
+  mb_mblock *parent() const;
+
+  /*!
+   * \brief Schedule a "one shot" timeout.
+   *
+   * \param abs_time the absolute time at which the timeout should fire
+   * \param user_data the data passed in the %timeout message.
+   *
+   * When the timeout fires, a message will be sent to the mblock.
+   *
+   * The message will have port_id = %sys-port, signal = %timeout,
+   * data = user_data, metadata = the handle returned from
+   * schedule_one_shot_timeout, pri = MB_PRI_BEST.
+   *
+   * \returns a handle that can be used in cancel_timeout, and is passed
+   * as the metadata field of the generated %timeout message.
+   *
+   * To cancel a pending timeout, call cancel_timeout.
+   */
+  pmt_t
+  schedule_one_shot_timeout(const mb_time &abs_time, pmt_t user_data);
+
+  /*!
+   * \brief Schedule a periodic timeout.
+   *
+   * \param first_abs_time The absolute time at which the first timeout should fire.
+   * \param delta_time The relative delay between the first and successive timeouts.
+   * \param user_data the data passed in the %timeout message.
+   *
+   * When the timeout fires, a message will be sent to the mblock, and a
+   * new timeout will be scheduled for previous absolute time + delta_time.
+   *
+   * The message will have port_id = %sys-port, signal = %timeout,
+   * data = user_data, metadata = the handle returned from
+   * schedule_one_shot_timeout, pri = MB_PRI_BEST.
+   *
+   * \returns a handle that can be used in cancel_timeout, and is passed
+   * as the metadata field of the generated %timeout message.
+   *
+   * To cancel a pending timeout, call cancel_timeout.
+   */
+  pmt_t
+  schedule_periodic_timeout(const mb_time &first_abs_time,
+                           const mb_time &delta_time,
+                           pmt_t user_data);
+
+  /*!
+   * \brief Attempt to cancel a pending timeout.
+   *
+   * Note that this only stops a future timeout from firing.  It is
+   * possible that a timeout may have already fired and enqueued a
+   * %timeout message, but that that message has not yet been seen by
+   * handle_message.
+   *
+   * \param handle returned from schedule_one_shot_timeout or schedule_periodic_timeout.
+   */
+  void cancel_timeout(pmt_t handle);
+
+  /*!
+   * \brief Perform a pre-order depth-first traversal of the hierarchy.
+   *
+   * The traversal stops and returns false if any call to visitor returns false.
+   */
+  bool
+  walk_tree(mb_visitor *visitor);
+
+
+  //! \implementation
+  // internal use only
+  mb_mblock_impl_sptr
+  impl() const { return d_impl; }
+
+};
+
+
+#endif /* INCLUDED_MB_MBLOCK_H */
diff --git a/mblock/src/include/mblock/message.h b/mblock/src/include/mblock/message.h
new file mode 100644 (file)
index 0000000..8fbee2f
--- /dev/null
@@ -0,0 +1,88 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2007,2008 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 3, 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_MESSAGE_H
+#define INCLUDED_MB_MESSAGE_H
+
+#include <mblock/common.h>
+#include <iosfwd>
+
+#define MB_MESSAGE_LOCAL_ALLOCATOR 0   // define to 0 or 1
+
+class mb_message;
+typedef boost::shared_ptr<mb_message> mb_message_sptr;
+
+/*!
+ * \brief construct a message and return boost::shared_ptr
+ *
+ * \param signal       identifier of the message
+ * \param data         the data to be operated on
+ * \param metadata     information about the data
+ * \param priority     urgency
+ */
+mb_message_sptr
+mb_make_message(pmt_t signal,
+               pmt_t data = PMT_NIL,
+               pmt_t metadata = PMT_NIL,
+               mb_pri_t priority = MB_PRI_DEFAULT);
+
+class mb_message {
+  mb_message_sptr d_next;              // link field for msg queue
+  pmt_t                  d_signal;
+  pmt_t                  d_data;
+  pmt_t                  d_metadata;
+  mb_pri_t       d_priority;
+  pmt_t                  d_port_id;            // name of port msg was rcvd on (symbol)
+
+  friend class mb_msg_queue;
+
+  friend mb_message_sptr
+  mb_make_message(pmt_t signal, pmt_t data, pmt_t metadata, mb_pri_t priority);
+
+  // private constructor
+  mb_message(pmt_t signal, pmt_t data, pmt_t metadata, mb_pri_t priority);
+
+public:
+  ~mb_message();
+
+  pmt_t signal() const { return d_signal; }
+  pmt_t data() const { return d_data; }
+  pmt_t metadata() const { return d_metadata; }
+  mb_pri_t priority() const { return d_priority; }
+  pmt_t port_id() const { return d_port_id; }
+
+  void set_port_id(pmt_t port_id){ d_port_id = port_id; }
+
+#if (MB_MESSAGE_LOCAL_ALLOCATOR)
+  void *operator new(size_t);
+  void operator delete(void *, size_t);
+#endif
+};
+
+std::ostream& operator<<(std::ostream& os, const mb_message &msg);
+
+inline
+std::ostream& operator<<(std::ostream& os, const mb_message_sptr msg)
+{
+  os << *(msg.get());
+  return os;
+}
+
+#endif /* INCLUDED_MB_MESSAGE_H */
diff --git a/mblock/src/include/mblock/msg_accepter.h b/mblock/src/include/mblock/msg_accepter.h
new file mode 100644 (file)
index 0000000..69be131
--- /dev/null
@@ -0,0 +1,48 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2008 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 3, 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_MSG_ACCEPTER_H
+#define INCLUDED_MB_MSG_ACCEPTER_H
+
+#include <mblock/common.h>
+
+/*!
+ * \brief Abstract class that accepts messages
+ *
+ * The mb_port::send method ultimately resolves the (local)
+ * destination of a send to an object of this type.  The resulting 
+ * object is called to deliver the message.
+ *
+ * Expect derived classes such as these:
+ *
+ *  smp      : target is visible in this address space
+ *  mpi             : target is on the other end of an MPI link
+ *  ppe->spe : sending from Cell PPE to Cell SPE
+ *  spe->ppe : sending from Cell SPE to Cell PPE
+ */
+class mb_msg_accepter {
+public:
+  mb_msg_accepter(){};
+  virtual ~mb_msg_accepter();
+
+  virtual void operator()(pmt_t signal, pmt_t data, pmt_t metadata, mb_pri_t priority) = 0;
+};
+
+#endif /* INCLUDED_MB_MSG_ACCEPTER_H */
diff --git a/mblock/src/include/mblock/msg_queue.h b/mblock/src/include/mblock/msg_queue.h
new file mode 100644 (file)
index 0000000..31ff65a
--- /dev/null
@@ -0,0 +1,82 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2008 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 3, 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_MSG_QUEUE_H
+#define INCLUDED_MB_MSG_QUEUE_H
+
+#include <mblock/common.h>
+#include <omnithread.h>
+#include <mblock/time.h>
+
+/*!
+ * \brief priority queue for mblock messages
+ */
+class mb_msg_queue : boost::noncopyable
+{
+  // When empty both head and tail are zero.
+  struct subq {
+    mb_message_sptr    head;
+    mb_message_sptr    tail;
+
+    bool empty_p() const { return head == 0; }
+  };
+
+  omni_mutex    d_mutex;
+  omni_condition d_not_empty;  // reader waits on this
+
+  // FIXME add bitmap to indicate which queues are non-empty.
+  subq          d_queue[MB_NPRI];
+
+  mb_message_sptr get_highest_pri_msg_helper();
+
+public:
+  mb_msg_queue();
+  ~mb_msg_queue();
+
+  //! Insert \p msg into priority queue.
+  void insert(mb_message_sptr msg);
+
+  /*
+   * \brief Delete highest pri message from the queue and return it.
+   * Returns equivalent of zero pointer if queue is empty.
+   */
+  mb_message_sptr get_highest_pri_msg_nowait();
+
+  /*
+   * \brief Delete highest pri message from the queue and return it.
+   * If the queue is empty, this call blocks until it can return a message.
+   */
+  mb_message_sptr get_highest_pri_msg();
+
+  /*
+   * \brief Delete highest pri message from the queue and return it.
+   * If the queue is empty, this call blocks until it can return a message
+   * or real-time exceeds the absolute time, abs_time.
+   *
+   * \param abs_time specifies the latest absolute time to wait until.
+   * \sa mb_time::time
+   *
+   * \returns a valid mb_message_sptr, or the equivalent of a zero pointer
+   * if the call timed out while waiting.
+   */
+  mb_message_sptr get_highest_pri_msg_timedwait(const mb_time &abs_time);
+};
+
+#endif /* INCLUDED_MB_MSG_QUEUE_H */
diff --git a/mblock/src/include/mblock/port.h b/mblock/src/include/mblock/port.h
new file mode 100644 (file)
index 0000000..892a1dd
--- /dev/null
@@ -0,0 +1,93 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2008 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 3, 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_PORT_H
+#define INCLUDED_MB_PORT_H
+
+#include <mblock/common.h>
+
+/*!
+ * \brief Abstract port characteristics
+ */
+class mb_port : boost::noncopyable
+{
+public:
+
+  //! port classification
+  enum port_type_t {
+    EXTERNAL,  //< Externally visible
+    RELAY,     //< Externally visible but really connected to a sub-component
+    INTERNAL   //< Visible to self only
+  };
+
+private:
+
+  std::string          d_port_name;
+  pmt_t                        d_port_symbol;          // the port_name as a pmt symbol
+  pmt_t                        d_protocol_class;
+  bool                 d_conjugated;
+  port_type_t          d_port_type;
+
+protected:
+  mb_mblock           *d_mblock;  // mblock we're defined in
+
+  // protected constructor
+  mb_port(mb_mblock *mblock,
+         const std::string &port_name,
+         const std::string &protocol_class_name,
+         bool conjugated,
+         mb_port::port_type_t port_type);
+
+  mb_mblock *mblock() const { return d_mblock; }
+
+public:
+  std::string  port_name() const { return d_port_name; }
+  pmt_t                port_symbol() const { return d_port_symbol; }
+  pmt_t                protocol_class() const { return d_protocol_class; }
+  bool          conjugated() const { return d_conjugated; }
+  port_type_t  port_type() const { return d_port_type; }
+
+  pmt_t                incoming_message_set() const;
+  pmt_t                outgoing_message_set() const;
+
+  virtual ~mb_port();
+
+  /*!
+   * \brief send a message
+   *
+   * \param signal     the event name
+   * \param data       optional data
+   * \param metadata   optional metadata
+   * \param priority   the urgency at which the message is sent
+   */
+  virtual void
+  send(pmt_t signal,
+       pmt_t data = PMT_F,
+       pmt_t metadata = PMT_F,
+       mb_pri_t priority = MB_PRI_DEFAULT) = 0;
+
+  /*
+   * \brief Invalidate any cached peer resolutions
+   * \implementation
+   */
+  virtual void invalidate_cache() = 0;
+};
+
+#endif /* INCLUDED_MB_PORT_H */
diff --git a/mblock/src/include/mblock/protocol_class.h b/mblock/src/include/mblock/protocol_class.h
new file mode 100644 (file)
index 0000000..33c5d71
--- /dev/null
@@ -0,0 +1,52 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2008 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 3, 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_PROTOCOL_CLASS_H
+#define INCLUDED_MB_PROTOCOL_CLASS_H
+
+#include <mblock/common.h>
+
+/*!
+ * \brief construct a protocol_class
+ *
+ * \param name         the name of the class (symbol)
+ * \param incoming     incoming message set (list of symbols)
+ * \param outgoing     outgoing message set (list of symbols)
+ */
+pmt_t mb_make_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing);
+
+// Accessors
+pmt_t mb_protocol_class_name(pmt_t pc);                //< return name of protocol class
+pmt_t mb_protocol_class_incoming(pmt_t pc);    //< return incoming message set
+pmt_t mb_protocol_class_outgoing(pmt_t pc);    //< return outgoing message set
+
+pmt_t mb_protocol_class_lookup(pmt_t name);    //< lookup an existing protocol class by name
+
+
+/*!
+ * \brief Initialize one or more protocol class from a serialized description.
+ * Used by machine generated code.
+ */
+class mb_protocol_class_init {
+public:
+  mb_protocol_class_init(const char *data, size_t len);
+};
+
+#endif /* INCLUDED_MB_PROTOCOL_CLASS_H */
diff --git a/mblock/src/include/mblock/runtime.h b/mblock/src/include/mblock/runtime.h
new file mode 100644 (file)
index 0000000..4236e34
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2008 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 3, 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 <mblock/common.h>
+#include <omnithread.h>
+
+/*!
+ * \brief Public constructor (factory) for mb_runtime objects.
+ */
+mb_runtime_sptr mb_make_runtime();
+
+/*!
+ * \brief Abstract runtime support for m-blocks
+ *
+ * There should generally be only a single instance of this class.
+ */
+class mb_runtime : boost::noncopyable,
+                  public boost::enable_shared_from_this<mb_runtime>
+{
+protected:  
+  mb_mblock_sptr       d_top;
+
+public:
+  mb_runtime(){}
+  virtual ~mb_runtime();
+
+  /*!
+   * \brief Construct and run the specified mblock hierarchy.
+   *
+   * This routine turns into the m-block scheduler, and
+   * blocks until the system is shutdown.
+   *
+   * \param name name of the top-level mblock (conventionally "top")
+   * \param class_name The class of the top-level mblock to create.
+   * \param user_arg The argument to pass to the top-level mblock constructor
+   *
+   * \returns true if the system ran successfully.
+   */
+  virtual bool run(const std::string &instance_name,
+                  const std::string &class_name,
+                  pmt_t user_arg,
+                  pmt_t *result = 0) = 0;
+
+  // QA only...
+  mb_mblock_sptr top() { return d_top; }
+};
+
+#endif /* INCLUDED_MB_RUNTIME_H */
diff --git a/mblock/src/include/mblock/time.h b/mblock/src/include/mblock/time.h
new file mode 100644 (file)
index 0000000..cba6be7
--- /dev/null
@@ -0,0 +1,27 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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 3, 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_TIME_H
+#define INCLUDED_MB_TIME_H
+
+#include <omni_time.h>
+typedef omni_time mb_time;
+
+#endif /* INCLUDED_MB_TIME_H */
index e8e5f59af22d7d215a8146f43c78c932550280a8..269c8ae22849498d592ec6b3f828739aeaf13eb5 100644 (file)
@@ -22,7 +22,8 @@
 include $(top_srcdir)/Makefile.common
 
 AM_CPPFLAGS = $(DEFINES) $(OMNITHREAD_INCLUDES) $(PMT_INCLUDES) \
-       $(BOOST_CPPFLAGS) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
+       $(BOOST_CPPFLAGS) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) \
+       $(MBLOCK_INCLUDES)
 
 # disable test until we fix ticket:180
 # TESTS = test_mblock
@@ -75,25 +76,11 @@ libmblock_la_LIBADD =                       \
        $(PMT_LA)                       \
        -lstdc++                        
 
-include_HEADERS =                      \
-       mb_class_registry.h             \
-       mb_common.h                     \
-       mb_exception.h                  \
+noinst_HEADERS =                       \
        mb_gettid.h                     \
-       mb_mblock.h                     \
-       mb_message.h                    \
-       mb_msg_accepter.h               \
        mb_msg_accepter_msgq.h          \
-       mb_msg_queue.h                  \
-       mb_port.h                       \
        mb_port_simple.h                \
-       mb_protocol_class.h             \
-       mb_runtime.h                    \
-       mb_time.h                       \
-       mb_util.h                       
-
-
-noinst_HEADERS =                       \
+       mb_util.h                       \
        mb_connection.h                 \
        mb_endpoint.h                   \
        mb_mblock_impl.h                \
index 7b8f7cb766f175add49a198d1dffe35ba5c56b5e..fe873a69a10f9b1eaa4210600d413ec5dc57a062 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -19,7 +19,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include <mb_runtime.h>
+#include <mblock/runtime.h>
 #include <iostream>
 
 int
index 77cec8de6b9e2a5dc54ae4d9b2310542e524016e..7ccee2969f65dd6cfb5169c4e6dcb0d8a006eaf1 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -22,7 +22,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <mb_class_registry.h>
+#include <mblock/class_registry.h>
 #include <map>
 
 static std::map<std::string, mb_mblock_maker_t>        s_registry;
diff --git a/mblock/src/lib/mb_class_registry.h b/mblock/src/lib/mb_class_registry.h
deleted file mode 100644 (file)
index 713cc1e..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 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 3, 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_CLASS_REGISTRY_H
-#define INCLUDED_MB_CLASS_REGISTRY_H
-
-#include <mb_common.h>
-
-//! conceptually, pointer to constructor
-typedef mb_mblock_sptr (*mb_mblock_maker_t)(mb_runtime *runtime,
-                                           const std::string &instance_name,
-                                           pmt_t user_arg);
-
-/*
- * \brief Maintain mapping between mblock class_name and factory (maker)
- */
-class mb_class_registry : public boost::noncopyable {
-public:
-  static bool register_maker(const std::string &name, mb_mblock_maker_t maker);
-  static bool lookup_maker(const std::string &name, mb_mblock_maker_t *maker);
-};
-
-template<class mblock>
-mb_mblock_sptr mb_mblock_maker(mb_runtime *runtime,
-                              const std::string &instance_name,
-                              pmt_t user_arg)
-{
-  return mb_mblock_sptr(new mblock(runtime, instance_name, user_arg));
-}
-
-#define REGISTER_MBLOCK_CLASS(name) \
-  bool __RBC__ ## name = mb_class_registry::register_maker(#name, &mb_mblock_maker<name>)
-
-#endif /* INCLUDED_MB_CLASS_REGISTRY_H */
diff --git a/mblock/src/lib/mb_common.h b/mblock/src/lib/mb_common.h
deleted file mode 100644 (file)
index 1f78d5a..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2007 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 3, 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_COMMON_H
-#define INCLUDED_MB_COMMON_H
-
-#include <pmt.h>
-#include <vector>
-#include <stdexcept>
-#include <boost/utility.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/weak_ptr.hpp>
-
-/*
- * The priority type and valid range
- */
-typedef unsigned int   mb_pri_t;
-static const mb_pri_t  MB_PRI_BEST    = 0;
-static const mb_pri_t  MB_PRI_DEFAULT = 4; 
-static const mb_pri_t   MB_PRI_WORST   = 7;
-static const mb_pri_t  MB_NPRI = MB_PRI_WORST + 1;       // number of valid priorities 
-
-/*!
- * \brief return true iff priority a is better than priority b
- */
-inline static bool
-mb_pri_better(mb_pri_t a, mb_pri_t b)
-{
-  return a < b;
-}
-
-/*!
- * \brief return true iff priority a is worse than priority b
- */
-inline static bool
-mb_pri_worse(mb_pri_t a, mb_pri_t b)
-{
-  return a > b;
-}
-
-/*!
- * \brief ensure that pri is valid
- */
-inline static mb_pri_t
-mb_pri_clamp(mb_pri_t p)
-{
-  return p < MB_NPRI ? p : MB_NPRI - 1;
-}
-
-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;
-typedef boost::shared_ptr<mb_port> mb_port_sptr;
-
-//class mb_port_detail;
-//typedef boost::shared_ptr<mb_port_detail> mb_port_detail_sptr;
-
-class mb_msg_accepter;
-typedef boost::shared_ptr<mb_msg_accepter> mb_msg_accepter_sptr;
-
-class mb_message;
-typedef boost::shared_ptr<mb_message> mb_message_sptr;
-
-class mb_msg_queue;
-typedef boost::shared_ptr<mb_msg_queue> mb_msg_queue_sptr;
-
-#endif /* INCLUDED_MB_COMMON_H */
index db55b3f4490463e02dc1832eeb1e581e10149d93..aae376a5d5d612b3082c76721c19ded0909873c9 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -23,7 +23,7 @@
 #define INCLUDED_MB_ENDPOINT_H
 
 #include <string>
-#include <mb_port.h>
+#include <mblock/port.h>
 
 /*!
  * \brief Endpoint specification for connection
index 3c08a01d048a459f00f5569b92ff0b927869f598..810131840defe30bc371a1f4b2efe6bbe5121166 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -23,8 +23,8 @@
 #include <config.h>
 #endif
 
-#include <mb_exception.h>
-#include <mb_mblock.h>
+#include <mblock/exception.h>
+#include <mblock/mblock.h>
 #include <mb_util.h>
 
 
diff --git a/mblock/src/lib/mb_exception.h b/mblock/src/lib/mb_exception.h
deleted file mode 100644 (file)
index 837e49f..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- 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 3, 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_EXCEPTION_H
-#define INCLUDED_MB_EXCEPTION_H
-
-#include <stdexcept>
-
-class mb_mblock;
-
-
-class mbe_base : public std::logic_error
-{
-public:
-  mbe_base(mb_mblock *mb, const std::string &msg);
-};
-
-class mbe_not_implemented : public mbe_base
-{
-public:
-  mbe_not_implemented(mb_mblock *mb, const std::string &msg);
-};
-
-class mbe_no_such_class : public mbe_base
-{
-public:
-  mbe_no_such_class(mb_mblock *, const std::string &class_name);
-};
-
-class mbe_no_such_component : public mbe_base
-{
-public:
-  mbe_no_such_component(mb_mblock *, const std::string &component_name);
-};
-
-class mbe_duplicate_component : public mbe_base
-{
-public:
-  mbe_duplicate_component(mb_mblock *, const std::string &component_name);
-};
-
-class mbe_no_such_port : public mbe_base
-{
-public:
-  mbe_no_such_port(mb_mblock *, const std::string &port_name);
-};
-
-
-class mbe_duplicate_port : public mbe_base
-{
-public:
-  mbe_duplicate_port(mb_mblock *, const std::string &port_name);
-};
-
-class mbe_already_connected : public mbe_base
-{
-public:
-  mbe_already_connected(mb_mblock *, const std::string &comp_name,
-                       const std::string &port_name);
-};
-
-class mbe_incompatible_ports : public mbe_base
-{
-public:
-  mbe_incompatible_ports(mb_mblock *,
-                        const std::string &comp1_name,
-                        const std::string &port1_name,
-                        const std::string &comp2_name,
-                        const std::string &port2_name);
-};
-
-class mbe_invalid_port_type : public mbe_base
-{
-public:
-  mbe_invalid_port_type(mb_mblock *, const std::string &comp_name,
-                       const std::string &port_name);
-};
-
-class mbe_mblock_failed : public mbe_base
-{
-public:
-  mbe_mblock_failed(mb_mblock *, const std::string &msg);
-};
-
-
-
-// not derived from mbe_base to simplify try/catch
-class mbe_terminate
-{
-public:
-  mbe_terminate();
-};
-
-// not derived from mbe_base to simplify try/catch
-class mbe_exit
-{
-public:
-  mbe_exit();
-};
-
-#endif /* INCLUDED_MB_EXCEPTION_H */
index 38d216ad4762b904902f6291915589aaa9148001..b2f763623cb370aa01df41fae10c63ea706615b3 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <config.h>
 #endif
 
-#include <mb_mblock.h>
+#include <mblock/mblock.h>
 #include <mb_mblock_impl.h>
-#include <mb_runtime.h>
-#include <mb_exception.h>
+#include <mblock/runtime.h>
+#include <mblock/exception.h>
 #include <iostream>
 
 
diff --git a/mblock/src/lib/mb_mblock.h b/mblock/src/lib/mb_mblock.h
deleted file mode 100644 (file)
index 146e280..0000000
+++ /dev/null
@@ -1,318 +0,0 @@
-/* -*- 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 3, 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_H
-#define INCLUDED_MB_MBLOCK_H
-
-#include <mb_common.h>
-#include <mb_message.h>
-#include <mb_port.h>
-#include <mb_time.h>
-
-
-/*!
- * Abstract class implementing visitor pattern
- * \ingroup internal
- */
-class mb_visitor
-{
-public:
-  virtual ~mb_visitor();
-  virtual bool operator()(mb_mblock *mblock) = 0;
-};
-
-// ----------------------------------------------------------------------
-
-/*!
- * \brief Parent class for all message passing blocks
- *
- * Subclass this to define your mblocks.
- */
-class mb_mblock : boost::noncopyable,
-                 public boost::enable_shared_from_this<mb_mblock>
-{
-private:
-  mb_mblock_impl_sptr          d_impl;         // implementation details
-
-  friend class mb_runtime;
-  friend class mb_mblock_impl;
-  friend class mb_worker;
-
-protected:
-  /*!
-   * \brief mblock constructor.
-   *
-   * Initializing all mblocks in the system is a 3 step procedure.
-   *
-   * The top level mblock's constructor is run.  That constructor 
-   * (a) registers all of its ports using define_port, (b) registers any
-   * subcomponents it may have via the define_component method, and
-   * then (c) issues connect calls to wire its subcomponents together.
-   *
-   * \param runtime the runtime associated with this mblock
-   * \param instance_name specify the name of this instance
-   *        (for debugging, NUMA mapping, etc)
-   * \param user_arg argument passed by user to constructor
-   *        (ignored by the mb_mblock base class)
-   */
-  mb_mblock(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
-
-public:
-  /*!
-   * \brief Called by the runtime system to execute the initial
-   * transition of the finite state machine.
-   *
-   * This method is called by the runtime after all blocks are
-   * constructed and before the first message is delivered.  Override
-   * this to initialize your finite state machine.
-   */
-  virtual void initial_transition();
-
-protected:
-  /*!
-   * \brief Called by the runtime system when there's a message to handle.
-   *
-   * Override this to define your behavior.
-   *
-   * Do not issue any potentially blocking calls in this method.  This
-   * includes things such reads or writes on sockets, pipes or slow
-   * i/o devices.
-   */
-  virtual void handle_message(mb_message_sptr msg);
-
-  /*!
-   * \brief Define a port.
-   *
-   * EXTERNAL and RELAY ports are part of our peer interface.
-   * INTERNAL ports are used to talk to sub-components.
-   *
-   * \param port_name    The name of the port (must be unique within this mblock).
-   * \param protocol_class_name        The name of the protocol class associated with
-   *                           this port.  It must already be defined.
-   * \param conjugated   Are the incoming and outgoing message sets swapped?
-   * \param port_type    INTERNAL, EXTERNAL or RELAY.
-   */
-  mb_port_sptr
-  define_port(const std::string &port_name,
-             const std::string &protocol_class_name,
-             bool conjugated,
-             mb_port::port_type_t port_type);
-
-  /*!
-   * \brief Define a subcomponent by name.
-   *
-   * Called within the constructor to tell the system the
-   * names and identities of our sub-component mblocks.
-   *
-   * \param component_name  The name of the sub-component (must be unique with this mblock).
-   * \param class_name      The class of the instance that is to be created.
-   * \param user_arg The argument to pass to the constructor of the component.
-   */
-  void
-  define_component(const std::string &component_name,
-                  const std::string &class_name,
-                  pmt_t user_arg = PMT_NIL);
-
-  /*!
-   * \brief connect endpoint_1 to endpoint_2
-   *
-   * \param comp_name1  component on one end of the connection
-   * \param port_name1  the name of the port on comp1
-   * \param comp_name2  component on the other end of the connection
-   * \param port_name2  the name of the port on comp2
-   *
-   * An endpoint is specified by the component's local name (given as
-   * component_name in the call to register_component) and the name of
-   * the port on that component.
-   *
-   * To connect an internal or relay port, use "self" as the component name.
-   */
-  void
-  connect(const std::string &comp_name1, const std::string &port_name1,
-         const std::string &comp_name2, const std::string &port_name2);
-
-  /*!
-   * \brief disconnect endpoint_1 from endpoint_2
-   *
-   * \param comp_name1  component on one end of the connection
-   * \param port_name1  the name of the port on comp1
-   * \param comp_name2  component on the other end of the connection
-   * \param port_name2  the name of the port on comp2
-   *
-   * An endpoint is specified by the component's local name (given as
-   * component_name in the call to register_component) and the name of
-   * the port on that component.
-   *
-   * To disconnect an internal or relay port, use "self" as the component name.
-   */
-  void
-  disconnect(const std::string &comp_name1, const std::string &port_name1,
-            const std::string &comp_name2, const std::string &port_name2);
-
-  /*!
-   * \brief disconnect all connections to specified component
-   * \param component_name component to disconnect
-   */
-  void
-  disconnect_component(const std::string &component_name);
-
-  /*!
-   * \brief disconnect all connections to all components
-   */
-  void
-  disconnect_all();
-
-  /*!
-   * \brief Return number of connections (QA mostly)
-   */
-  int
-  nconnections() const;
-
-  //! Set the class name
-  void set_class_name(const std::string &name);
-
-  /*!
-   * \brief Tell runtime that we are done.
-   *
-   * This method does not return.
-   */
-  void exit();
-
-  /*!
-   * \brief Ask runtime to execute the shutdown procedure for all blocks.
-   * 
-   * \param result sets value of \p result output argument of runtime->run(...)
-   *
-   * The runtime first sends a maximum priority %shutdown message to
-   * all blocks.  All blocks should handle the %shutdown message,
-   * perform whatever clean up is required, and call this->exit();
-   *
-   * After a period of time (~100ms), any blocks which haven't yet
-   * called this->exit() are sent a maximum priority %halt message.
-   * %halt is detected in main_loop, and this->exit() is called.
-   *
-   * After an additional period of time (~100ms), any blocks which
-   * still haven't yet called this->exit() are sent a SIG<FOO> (TBD)
-   * signal, which will blow them out of any blocking system calls and
-   * raise an mbe_terminate exception.  The default top-level
-   * runtime-provided exception handler will call this->exit() to
-   * finish the process.
-   *
-   * runtime->run(...) returns when all blocks have called exit.
-   */
-  void shutdown_all(pmt_t result);
-
-  /*!
-   * \brief main event dispatching loop
-   *
-   * Although it is possible to override this, the default implementation
-   * should work for virtually all cases.
-   */
-  virtual void main_loop();
-  
-public:
-  virtual ~mb_mblock();
-
-  //! Return instance name of this block
-  std::string instance_name() const;
-
-  //! Return the class name of this block
-  std::string class_name() const;
-
-  //! Set the instance name of this block.
-  void set_instance_name(const std::string &name);
-  
-  //! Return the parent of this mblock, or 0 if we're the top-level block.
-  mb_mblock *parent() const;
-
-  /*!
-   * \brief Schedule a "one shot" timeout.
-   *
-   * \param abs_time the absolute time at which the timeout should fire
-   * \param user_data the data passed in the %timeout message.
-   *
-   * When the timeout fires, a message will be sent to the mblock.
-   *
-   * The message will have port_id = %sys-port, signal = %timeout,
-   * data = user_data, metadata = the handle returned from
-   * schedule_one_shot_timeout, pri = MB_PRI_BEST.
-   *
-   * \returns a handle that can be used in cancel_timeout, and is passed
-   * as the metadata field of the generated %timeout message.
-   *
-   * To cancel a pending timeout, call cancel_timeout.
-   */
-  pmt_t
-  schedule_one_shot_timeout(const mb_time &abs_time, pmt_t user_data);
-
-  /*!
-   * \brief Schedule a periodic timeout.
-   *
-   * \param first_abs_time The absolute time at which the first timeout should fire.
-   * \param delta_time The relative delay between the first and successive timeouts.
-   * \param user_data the data passed in the %timeout message.
-   *
-   * When the timeout fires, a message will be sent to the mblock, and a
-   * new timeout will be scheduled for previous absolute time + delta_time.
-   *
-   * The message will have port_id = %sys-port, signal = %timeout,
-   * data = user_data, metadata = the handle returned from
-   * schedule_one_shot_timeout, pri = MB_PRI_BEST.
-   *
-   * \returns a handle that can be used in cancel_timeout, and is passed
-   * as the metadata field of the generated %timeout message.
-   *
-   * To cancel a pending timeout, call cancel_timeout.
-   */
-  pmt_t
-  schedule_periodic_timeout(const mb_time &first_abs_time,
-                           const mb_time &delta_time,
-                           pmt_t user_data);
-
-  /*!
-   * \brief Attempt to cancel a pending timeout.
-   *
-   * Note that this only stops a future timeout from firing.  It is
-   * possible that a timeout may have already fired and enqueued a
-   * %timeout message, but that that message has not yet been seen by
-   * handle_message.
-   *
-   * \param handle returned from schedule_one_shot_timeout or schedule_periodic_timeout.
-   */
-  void cancel_timeout(pmt_t handle);
-
-  /*!
-   * \brief Perform a pre-order depth-first traversal of the hierarchy.
-   *
-   * The traversal stops and returns false if any call to visitor returns false.
-   */
-  bool
-  walk_tree(mb_visitor *visitor);
-
-
-  //! \implementation
-  // internal use only
-  mb_mblock_impl_sptr
-  impl() const { return d_impl; }
-
-};
-
-
-#endif /* INCLUDED_MB_MBLOCK_H */
index 90868cf4c5ecc4850c56bd2b73977dc2cc2cc515..e11b0089834a6ddec9d5dd5ad24640aff5a35d45 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <config.h>
 #endif
 #include <mb_mblock_impl.h>
-#include <mb_mblock.h>
-#include <mb_protocol_class.h>
-#include <mb_port.h>
+#include <mblock/mblock.h>
+#include <mblock/protocol_class.h>
+#include <mblock/port.h>
 #include <mb_port_simple.h>
-#include <mb_exception.h>
+#include <mblock/exception.h>
 #include <mb_util.h>
 #include <mb_msg_accepter_smp.h>
 #include <mbi_runtime_lock.h>
index 374ee8fe0ea641f4b938dda1d75675e31fb6a60e..ed8059b00825ef6d403011f04c5aff96ffe0e7d1 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006,2007 Free Software Foundation, Inc.
+ * Copyright 2006,2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #ifndef INCLUDED_MB_MBLOCK_IMPL_H
 #define INCLUDED_MB_MBLOCK_IMPL_H
 
-#include <mb_mblock.h>
+#include <mblock/mblock.h>
 #include <mb_runtime_base.h>
 #include <mb_connection.h>
-#include <mb_msg_queue.h>
+#include <mblock/msg_queue.h>
 #include <list>
 #include <map>
 
index ce98a931e3ac5de1769bdb96e321b7f071fe8ba4..664e369fa5f512d2120ffa5db6657fabd2bb13b7 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -22,7 +22,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <mb_message.h>
+#include <mblock/message.h>
 #include <stdio.h>
 #include <pmt_pool.h>
 
diff --git a/mblock/src/lib/mb_message.h b/mblock/src/lib/mb_message.h
deleted file mode 100644 (file)
index f5e4655..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2007 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 3, 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_MESSAGE_H
-#define INCLUDED_MB_MESSAGE_H
-
-#include <mb_common.h>
-#include <iosfwd>
-
-#define MB_MESSAGE_LOCAL_ALLOCATOR 0   // define to 0 or 1
-
-class mb_message;
-typedef boost::shared_ptr<mb_message> mb_message_sptr;
-
-/*!
- * \brief construct a message and return boost::shared_ptr
- *
- * \param signal       identifier of the message
- * \param data         the data to be operated on
- * \param metadata     information about the data
- * \param priority     urgency
- */
-mb_message_sptr
-mb_make_message(pmt_t signal,
-               pmt_t data = PMT_NIL,
-               pmt_t metadata = PMT_NIL,
-               mb_pri_t priority = MB_PRI_DEFAULT);
-
-class mb_message {
-  mb_message_sptr d_next;              // link field for msg queue
-  pmt_t                  d_signal;
-  pmt_t                  d_data;
-  pmt_t                  d_metadata;
-  mb_pri_t       d_priority;
-  pmt_t                  d_port_id;            // name of port msg was rcvd on (symbol)
-
-  friend class mb_msg_queue;
-
-  friend mb_message_sptr
-  mb_make_message(pmt_t signal, pmt_t data, pmt_t metadata, mb_pri_t priority);
-
-  // private constructor
-  mb_message(pmt_t signal, pmt_t data, pmt_t metadata, mb_pri_t priority);
-
-public:
-  ~mb_message();
-
-  pmt_t signal() const { return d_signal; }
-  pmt_t data() const { return d_data; }
-  pmt_t metadata() const { return d_metadata; }
-  mb_pri_t priority() const { return d_priority; }
-  pmt_t port_id() const { return d_port_id; }
-
-  void set_port_id(pmt_t port_id){ d_port_id = port_id; }
-
-#if (MB_MESSAGE_LOCAL_ALLOCATOR)
-  void *operator new(size_t);
-  void operator delete(void *, size_t);
-#endif
-};
-
-std::ostream& operator<<(std::ostream& os, const mb_message &msg);
-
-inline
-std::ostream& operator<<(std::ostream& os, const mb_message_sptr msg)
-{
-  os << *(msg.get());
-  return os;
-}
-
-#endif /* INCLUDED_MB_MESSAGE_H */
index 001b1f11ea5b9d6494bedb96101250545806cb02..88b92394c4f8e8693420c0686752ce4beee86f31 100644 (file)
@@ -23,7 +23,7 @@
 #include <config.h>
 #endif
 
-#include <mb_msg_accepter.h>
+#include <mblock/msg_accepter.h>
 
 mb_msg_accepter::~mb_msg_accepter()
 {
diff --git a/mblock/src/lib/mb_msg_accepter.h b/mblock/src/lib/mb_msg_accepter.h
deleted file mode 100644 (file)
index 254b3b0..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 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 3, 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_MSG_ACCEPTER_H
-#define INCLUDED_MB_MSG_ACCEPTER_H
-
-#include <mb_common.h>
-
-/*!
- * \brief Abstract class that accepts messages
- *
- * The mb_port::send method ultimately resolves the (local)
- * destination of a send to an object of this type.  The resulting 
- * object is called to deliver the message.
- *
- * Expect derived classes such as these:
- *
- *  smp      : target is visible in this address space
- *  mpi             : target is on the other end of an MPI link
- *  ppe->spe : sending from Cell PPE to Cell SPE
- *  spe->ppe : sending from Cell SPE to Cell PPE
- */
-class mb_msg_accepter {
-public:
-  mb_msg_accepter(){};
-  virtual ~mb_msg_accepter();
-
-  virtual void operator()(pmt_t signal, pmt_t data, pmt_t metadata, mb_pri_t priority) = 0;
-};
-
-#endif /* INCLUDED_MB_MSG_ACCEPTER_H */
index 8220dbfee43456a418f46d537c37114136b57167..fb97914e5b76bec779179cc26bbbdb3f14ab8b0a 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -23,7 +23,7 @@
 #include <config.h>
 #endif
 #include <mb_msg_accepter_msgq.h>
-#include <mb_message.h>
+#include <mblock/message.h>
 
 pmt_t s_sys_port = pmt_intern("%sys-port");
 
index 1436e8c04a66cc73d170495c305a2c1f2069bfb1..6c743bb4ba0084aa50e8f3a9036672f7bc7cf08c 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -21,8 +21,8 @@
 #ifndef INCLUDED_MB_MSG_ACCEPTER_MSGQ_H
 #define INCLUDED_MB_MSG_ACCEPTER_MSGQ_H
 
-#include <mb_msg_accepter.h>
-#include <mb_msg_queue.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/msg_queue.h>
 
 /*!
  * \brief Concrete class that accepts messages and inserts them into a message queue.
index ac3b4cfdb89cff5762d00b812de13bbd8f7c1f1e..3b392a8c1b9c9ebaa9258d495b00c97f3bad0116 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <config.h>
 #endif
 #include <mb_msg_accepter_smp.h>
-#include <mb_common.h>
-#include <mb_mblock.h>
+#include <mblock/common.h>
+#include <mblock/mblock.h>
 #include <mb_mblock_impl.h>
-#include <mb_message.h>
+#include <mblock/message.h>
 
 mb_msg_accepter_smp::mb_msg_accepter_smp(mb_mblock_sptr mblock, pmt_t port_name)
   : d_mb(mblock), d_port_name(port_name)
index 39eedf8f03d18a59ba7338163cf43dd8d611ce77..0e0cd7c643ee96f165126b523041dc27d94dfbc5 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef INCLUDED_MB_MSG_ACCEPTER_SMP_H
 #define INCLUDED_MB_MSG_ACCEPTER_SMP_H
 
-#include <mb_msg_accepter.h>
+#include <mblock/msg_accepter.h>
 
 /*!
  * \brief Concrete message acceptor that does an mb_msg_queue insertion
index c5dd72fb564e40baf341a5666815eceb90e6610a..c68c5fd64bd2f9045104988d29ba56ef93885483 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -22,8 +22,8 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <mb_msg_queue.h>
-#include <mb_message.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
 
 
 mb_msg_queue::mb_msg_queue()
diff --git a/mblock/src/lib/mb_msg_queue.h b/mblock/src/lib/mb_msg_queue.h
deleted file mode 100644 (file)
index a1cd43f..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 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 3, 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_MSG_QUEUE_H
-#define INCLUDED_MB_MSG_QUEUE_H
-
-#include <mb_common.h>
-#include <omnithread.h>
-#include <mb_time.h>
-
-/*!
- * \brief priority queue for mblock messages
- */
-class mb_msg_queue : boost::noncopyable
-{
-  // When empty both head and tail are zero.
-  struct subq {
-    mb_message_sptr    head;
-    mb_message_sptr    tail;
-
-    bool empty_p() const { return head == 0; }
-  };
-
-  omni_mutex    d_mutex;
-  omni_condition d_not_empty;  // reader waits on this
-
-  // FIXME add bitmap to indicate which queues are non-empty.
-  subq          d_queue[MB_NPRI];
-
-  mb_message_sptr get_highest_pri_msg_helper();
-
-public:
-  mb_msg_queue();
-  ~mb_msg_queue();
-
-  //! Insert \p msg into priority queue.
-  void insert(mb_message_sptr msg);
-
-  /*
-   * \brief Delete highest pri message from the queue and return it.
-   * Returns equivalent of zero pointer if queue is empty.
-   */
-  mb_message_sptr get_highest_pri_msg_nowait();
-
-  /*
-   * \brief Delete highest pri message from the queue and return it.
-   * If the queue is empty, this call blocks until it can return a message.
-   */
-  mb_message_sptr get_highest_pri_msg();
-
-  /*
-   * \brief Delete highest pri message from the queue and return it.
-   * If the queue is empty, this call blocks until it can return a message
-   * or real-time exceeds the absolute time, abs_time.
-   *
-   * \param abs_time specifies the latest absolute time to wait until.
-   * \sa mb_time::time
-   *
-   * \returns a valid mb_message_sptr, or the equivalent of a zero pointer
-   * if the call timed out while waiting.
-   */
-  mb_message_sptr get_highest_pri_msg_timedwait(const mb_time &abs_time);
-};
-
-#endif /* INCLUDED_MB_MSG_QUEUE_H */
index 959e89c72bca1efaf5221f7e5bd739ba68331620..a13f49f2c6cf1ecad96b3e7ba9b952673dc0f979 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -23,8 +23,8 @@
 #include <config.h>
 #endif
 
-#include <mb_port.h>
-#include <mb_protocol_class.h>
+#include <mblock/port.h>
+#include <mblock/protocol_class.h>
 
 mb_port::mb_port(mb_mblock *mblock,
                 const std::string &port_name,
diff --git a/mblock/src/lib/mb_port.h b/mblock/src/lib/mb_port.h
deleted file mode 100644 (file)
index 0e9898b..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- 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 3, 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_PORT_H
-#define INCLUDED_MB_PORT_H
-
-#include <mb_common.h>
-
-/*!
- * \brief Abstract port characteristics
- */
-class mb_port : boost::noncopyable
-{
-public:
-
-  //! port classification
-  enum port_type_t {
-    EXTERNAL,  //< Externally visible
-    RELAY,     //< Externally visible but really connected to a sub-component
-    INTERNAL   //< Visible to self only
-  };
-
-private:
-
-  std::string          d_port_name;
-  pmt_t                        d_port_symbol;          // the port_name as a pmt symbol
-  pmt_t                        d_protocol_class;
-  bool                 d_conjugated;
-  port_type_t          d_port_type;
-
-protected:
-  mb_mblock           *d_mblock;  // mblock we're defined in
-
-  // protected constructor
-  mb_port(mb_mblock *mblock,
-         const std::string &port_name,
-         const std::string &protocol_class_name,
-         bool conjugated,
-         mb_port::port_type_t port_type);
-
-  mb_mblock *mblock() const { return d_mblock; }
-
-public:
-  std::string  port_name() const { return d_port_name; }
-  pmt_t                port_symbol() const { return d_port_symbol; }
-  pmt_t                protocol_class() const { return d_protocol_class; }
-  bool          conjugated() const { return d_conjugated; }
-  port_type_t  port_type() const { return d_port_type; }
-
-  pmt_t                incoming_message_set() const;
-  pmt_t                outgoing_message_set() const;
-
-  virtual ~mb_port();
-
-  /*!
-   * \brief send a message
-   *
-   * \param signal     the event name
-   * \param data       optional data
-   * \param metadata   optional metadata
-   * \param priority   the urgency at which the message is sent
-   */
-  virtual void
-  send(pmt_t signal,
-       pmt_t data = PMT_F,
-       pmt_t metadata = PMT_F,
-       mb_pri_t priority = MB_PRI_DEFAULT) = 0;
-
-  /*
-   * \brief Invalidate any cached peer resolutions
-   * \implementation
-   */
-  virtual void invalidate_cache() = 0;
-};
-
-#endif /* INCLUDED_MB_PORT_H */
index 24a01b562899e7b60b83e7b82007b5fff5e4330f..1b4b35cbf11b4415a00463472d24ef8146898962 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -24,9 +24,9 @@
 #endif
 
 #include <mb_port_simple.h>
-#include <mb_msg_accepter.h>
-#include <mb_exception.h>
-#include <mb_mblock.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/exception.h>
+#include <mblock/mblock.h>
 #include <mb_mblock_impl.h>
 #include <assert.h>
 #include <mbi_runtime_lock.h>
index db9e226e68e0d9de2ffb8dcea89c49da6710950a..3041239adfdd08e2b0317b1adfca505356e44f58 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -21,7 +21,7 @@
 #ifndef INCLUDED_MB_PORT_SIMPLE_H
 #define INCLUDED_MB_PORT_SIMPLE_H
 
-#include <mb_port.h>
+#include <mblock/port.h>
 
 /*!
  * \brief Concrete port realization
index fb1f6531c082722b4df125e0f194864d1d75c04a..f076909e1ce8c0661ac38803ae78584a67f7deb2 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -23,7 +23,7 @@
 #include <config.h>
 #endif
 
-#include <mb_protocol_class.h>
+#include <mblock/protocol_class.h>
 #include <iostream>
 
 static pmt_t s_ALL_PROTOCOL_CLASSES = PMT_NIL;
diff --git a/mblock/src/lib/mb_protocol_class.h b/mblock/src/lib/mb_protocol_class.h
deleted file mode 100644 (file)
index 7a1d9af..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- 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 3, 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_PROTOCOL_CLASS_H
-#define INCLUDED_MB_PROTOCOL_CLASS_H
-
-#include <mb_common.h>
-
-/*!
- * \brief construct a protocol_class
- *
- * \param name         the name of the class (symbol)
- * \param incoming     incoming message set (list of symbols)
- * \param outgoing     outgoing message set (list of symbols)
- */
-pmt_t mb_make_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing);
-
-// Accessors
-pmt_t mb_protocol_class_name(pmt_t pc);                //< return name of protocol class
-pmt_t mb_protocol_class_incoming(pmt_t pc);    //< return incoming message set
-pmt_t mb_protocol_class_outgoing(pmt_t pc);    //< return outgoing message set
-
-pmt_t mb_protocol_class_lookup(pmt_t name);    //< lookup an existing protocol class by name
-
-
-/*!
- * \brief Initialize one or more protocol class from a serialized description.
- * Used by machine generated code.
- */
-class mb_protocol_class_init {
-public:
-  mb_protocol_class_init(const char *data, size_t len);
-};
-
-#endif /* INCLUDED_MB_PROTOCOL_CLASS_H */
index 56ae2869c8927454dd4737a5e963e510f3bb39b3..57a05c416f576ad2d5af370d3014ca9601a7293a 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -23,7 +23,7 @@
 #include <config.h>
 #endif
 
-#include <mb_runtime.h>
+#include <mblock/runtime.h>
 #include <mb_runtime_thread_per_block.h>
 
 mb_runtime_sptr
diff --git a/mblock/src/lib/mb_runtime.h b/mblock/src/lib/mb_runtime.h
deleted file mode 100644 (file)
index 1c9ebca..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- 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 3, 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>
-#include <omnithread.h>
-
-/*!
- * \brief Public constructor (factory) for mb_runtime objects.
- */
-mb_runtime_sptr mb_make_runtime();
-
-/*!
- * \brief Abstract runtime support for m-blocks
- *
- * There should generally be only a single instance of this class.
- */
-class mb_runtime : boost::noncopyable,
-                  public boost::enable_shared_from_this<mb_runtime>
-{
-protected:  
-  mb_mblock_sptr       d_top;
-
-public:
-  mb_runtime(){}
-  virtual ~mb_runtime();
-
-  /*!
-   * \brief Construct and run the specified mblock hierarchy.
-   *
-   * This routine turns into the m-block scheduler, and
-   * blocks until the system is shutdown.
-   *
-   * \param name name of the top-level mblock (conventionally "top")
-   * \param class_name The class of the top-level mblock to create.
-   * \param user_arg The argument to pass to the top-level mblock constructor
-   *
-   * \returns true if the system ran successfully.
-   */
-  virtual bool run(const std::string &instance_name,
-                  const std::string &class_name,
-                  pmt_t user_arg,
-                  pmt_t *result = 0) = 0;
-
-  // QA only...
-  mb_mblock_sptr top() { return d_top; }
-};
-
-#endif /* INCLUDED_MB_RUNTIME_H */
index c10c3168a7ad300dec20e2c3ad88e1b1b3f59dba..1dea4d46ecfb3392b4c054f9ee73318e6155ad66 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
index 4872bd81ea89911529a98d31a66c26d4874727a8..019662bc2252aef6d10dc35d4aa4db975f6971b2 100644 (file)
@@ -22,9 +22,9 @@
 #ifndef INCLUDED_MB_RUNTIME_BASE_H
 #define INCLUDED_MB_RUNTIME_BASE_H
 
-#include <mb_runtime.h>
+#include <mblock/runtime.h>
 #include <omnithread.h>
-#include <mb_time.h>
+#include <mblock/time.h>
 
 /*
  * \brief This is the runtime class used by the implementation.
index 78bc0a1aa01b8bb14cc11c5a72f410417877dd4c..603d5addb101ac40c9e8986f6413e8e1f7e950a2 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -23,9 +23,9 @@
 #include <config.h>
 #endif
 #include <mb_runtime_nop.h>
-#include <mb_mblock.h>
-#include <mb_class_registry.h>
-#include <mb_exception.h>
+#include <mblock/mblock.h>
+#include <mblock/class_registry.h>
+#include <mblock/exception.h>
 
 mb_runtime_sptr 
 mb_make_runtime_nop()
index f1e4d10af08906561bdfac368b9ddca7279193fc..d12014a16e4d54bac6749a926be946084728f441 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <config.h>
 #endif
 #include <mb_runtime_thread_per_block.h>
-#include <mb_mblock.h>
+#include <mblock/mblock.h>
 #include <mb_mblock_impl.h>
-#include <mb_class_registry.h>
-#include <mb_exception.h>
+#include <mblock/class_registry.h>
+#include <mblock/exception.h>
 #include <mb_worker.h>
 #include <omnithread.h>
 #include <iostream>
index ed2dc046cb06ab356e8777dbc0ff86b2a14dd2a6..ef962911e1d7e4409df5ff8b8cef16c98d154950 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <mb_runtime_base.h>
 #include <mb_worker.h>
-#include <mb_msg_queue.h>
+#include <mblock/msg_queue.h>
 #include <mb_timer_queue.h>
 
 /*!
diff --git a/mblock/src/lib/mb_time.h b/mblock/src/lib/mb_time.h
deleted file mode 100644 (file)
index cba6be7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008 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 3, 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_TIME_H
-#define INCLUDED_MB_TIME_H
-
-#include <omni_time.h>
-typedef omni_time mb_time;
-
-#endif /* INCLUDED_MB_TIME_H */
index 208e37d51b2c2fe8500ce68263ff49806441e93f..e8b8e1b641d5a6ce2737b0cfe6b936b789da93dd 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #ifndef INCLUDED_MB_TIMER_QUEUE_H
 #define INCLUDED_MB_TIMER_QUEUE_H
 
-#include <mb_time.h>
+#include <mblock/time.h>
 #include <vector>
 #include <queue>
 #include <pmt.h>
-#include <mb_msg_accepter.h>
+#include <mblock/msg_accepter.h>
 
 class mb_timeout {
 public:
index 4ac161e9dddae9cdfdfffeba77e6c0614fc9b0c2..e7ac6a9b4486f5d9aefd5def619d11b0f32bab57 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #endif
 #include <mb_worker.h>
 #include <mb_runtime_thread_per_block.h>
-#include <mb_exception.h>
-#include <mb_mblock.h>
+#include <mblock/exception.h>
+#include <mblock/mblock.h>
 #include <mb_gettid.h>
-#include <mb_msg_accepter.h>
+#include <mblock/msg_accepter.h>
 #include <iostream>
 #ifdef HAVE_SCHED_H
 #include <sched.h>
index d5937144c43ad139818027b54d2a0c330b71b95d..b840ae557ecb3c24603dface638c15af0600a626 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -23,8 +23,8 @@
 #define INCLUDED_MB_WORKER_H
 
 #include <omnithread.h>
-#include <mb_common.h>
-#include <mb_class_registry.h>
+#include <mblock/common.h>
+#include <mblock/class_registry.h>
 
 
 class mb_worker;
index a4dec76f5c78c96bed1f430862f394baf02caee0..020cd733cec8fe240f33ae78c550e48eb6cc2072 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_MBI_RUNTIME_LOCK_H
 #define INCLUDED_MBI_RUNTIME_LOCK_H
 
-#include <mb_runtime.h>
+#include <mblock/runtime.h>
 #include <mb_mblock_impl.h>
 #include <boost/utility.hpp>
 
index 85f388fc25ac43d91b2002758e28a243bb44abc5..bc42ac8b045fd62656a14f2371716c75c272380e 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <mb_mblock.h>
-#include <mb_protocol_class.h>
-#include <mb_message.h>
-#include <mb_class_registry.h>
+#include <mblock/mblock.h>
+#include <mblock/protocol_class.h>
+#include <mblock/message.h>
+#include <mblock/class_registry.h>
 #include <iostream>
 #include <sstream>
 #include <bitset>
index ff263da84c34f7508682357899c1905794c441a9..e098e8b29e935e92b7de0033d57821434f02fb69 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-#include <mb_mblock.h>
-#include <mb_protocol_class.h>
-#include <mb_message.h>
-#include <mb_class_registry.h>
+#include <mblock/mblock.h>
+#include <mblock/protocol_class.h>
+#include <mblock/message.h>
+#include <mblock/class_registry.h>
 #include <iostream>
 #include <sstream>
 #include <bitset>
index 6802986fadd84813d0ec6f1c153b694f6c81089e..2eed3afde3979771bf195b3301c4cf805a3fc297 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006,2007 Free Software Foundation, Inc.
+ * Copyright 2006,2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 
 #include <qa_mblock_prims.h>
 #include <cppunit/TestAssert.h>
-#include <mb_mblock.h>
-#include <mb_runtime.h>
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
 #include <mb_mblock_impl.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <stdio.h>
 
 static pmt_t s_cs = pmt_intern("cs");
index b9db971c705f9283d68c225cda8b14d78b57dae5..114dbdc4eb8721ba1acc6936dcfa6b4077b599dc 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006,2007 Free Software Foundation, Inc.
+ * Copyright 2006,2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 
 #include <qa_mblock_send.h>
 #include <cppunit/TestAssert.h>
-#include <mb_mblock.h>
-#include <mb_runtime.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
 #include <mb_runtime_nop.h>            // QA only
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
 #include <mb_mblock_impl.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <stdio.h>
 
 static pmt_t s_data    = pmt_intern("data");
index 5991b7ffcc3dd54460c3966a11dd91c098e3ae2c..58e48f715fbea71ccfb2d7820e45da2311cc322e 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006,2007 Free Software Foundation, Inc.
+ * Copyright 2006,2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 
 #include <qa_mblock_sys.h>
 #include <cppunit/TestAssert.h>
-#include <mb_mblock.h>
-#include <mb_runtime.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
 #include <mb_runtime_nop.h>            // QA only
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
 #include <mb_mblock_impl.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <stdio.h>
 #include <string.h>
 #include <iostream>
index 4f1eb46eef2815939909b1e765db7a943e594c31..2505635c1ded396e7e52f109c7f1f00fab87dce4 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #endif
 #include <qa_timeouts.h>
 #include <cppunit/TestAssert.h>
-#include <mb_mblock.h>
-#include <mb_runtime.h>
-#include <mb_protocol_class.h>
-#include <mb_message.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
+#include <mblock/protocol_class.h>
+#include <mblock/message.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <mb_timer_queue.h>
 #include <string.h>
 #include <iostream>
index a16e14c585be74719b16995a2f9b196ab6f76b6b..30085340f90c77900fbcf67b5020f2690ba61bf8 100755 (executable)
@@ -3,7 +3,7 @@
 !#
 ;; -*-scheme-*-
 ;;
-;; Copyright 2007 Free Software Foundation, Inc.
+;; Copyright 2007,2008 Free Software Foundation, Inc.
 ;; 
 ;; This file is part of GNU Radio
 ;; 
                  (format o-port "// protocol-classes: ~{~a ~}~%" (map car protocol-classes))
                  (format o-port "//~%")
 
-                 (format o-port "#include <mb_protocol_class.h>~%")
+                 (format o-port "#include <mblock/protocol_class.h>~%")
                  (format o-port "#include <unistd.h>~%")
                  (format o-port
                          "static const char~%protocol_class_init_data[~d] = {~%  "
index 663a861ed4379eec48d683a6c02fe2092e678e60..0a44d81124b09f81db9821547e494b09f6d07a98 100644 (file)
@@ -24,7 +24,7 @@ include $(top_srcdir)/Makefile.common
 AM_CPPFLAGS =  \
        $(DEFINES) $(OMNITHREAD_INCLUDES) $(PMT_INCLUDES) $(MBLOCK_INCLUDES) \
        $(USRP_INCLUDES) $(USRP_INBAND_INCLUDES) $(BOOST_CPPFLAGS) \
-       $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
+       $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) -I$(top_srcdir)/mblock/src/lib
 
 
 bin_PROGRAMS =                         
index 3d112d98fd90b5aab8ab9f216e6ed9ceefa363cb..24a1e88b5cc0148522e2724cf354c99aff1a2349 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -25,7 +25,7 @@
 
 #include <iostream>
 #include <usrp_inband_usb_packet.h>
-#include <mb_class_registry.h>
+#include <mblock/class_registry.h>
 #include <vector>
 #include <usrp_usb_interface.h>
 #include <fstream>
index da8d7271c364371a49ad91631215de379062d9e0..c210f196a9366532a860f77594361ad470749673 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <config.h>
 #endif
 
-#include <mb_mblock.h>
-#include <mb_runtime.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
 #include <mb_runtime_nop.h>            // QA only
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
 #include <mb_mblock_impl.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <pmt.h>
 #include <stdio.h>
 #include <string.h>
index 942f6df0789c8b680596a5be21eec678d677010a..caa7803390988713017142423bf75f0c4702b79d 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <config.h>
 #endif
 
-#include <mb_mblock.h>
-#include <mb_runtime.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
 #include <mb_runtime_nop.h>            // QA only
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
 #include <mb_mblock_impl.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <pmt.h>
 #include <stdio.h>
 #include <string.h>
index 107668b894907918d85a9331e326ab523cef26f3..cd0fa525a3726347cdf6b9c81db7c75bfc792c6d 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <config.h>
 #endif
 
-#include <mb_mblock.h>
-#include <mb_runtime.h>
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <pmt.h>
 #include <stdio.h>
 #include <string.h>
index 6b1347ccca2b68137051e08b36e00614873f941d..d779c9a6442d734c95894ed171063bde3475146c 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <config.h>
 #endif
 
-#include <mb_mblock.h>
-#include <mb_runtime.h>
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <pmt.h>
 #include <stdio.h>
 #include <string.h>
index a1d9cc14175499f2a51c6272319c879e6208b267..d9bd2db1712d6b7874bd5a8369ecce2a6aa4dcbd 100644 (file)
 #include <config.h>
 #endif
 
-#include <mb_mblock.h>
-#include <mb_runtime.h>
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
 //#include <mb_mblock_impl.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <pmt.h>
 #include <stdio.h>
 #include <string.h>
index cff2aa723c84403854631a3f05a905a5179b9b4a..dcb87a7c9ef774957d9856e383bfd1a76e274d1c 100644 (file)
 #include <config.h>
 #endif
 
-#include <mb_mblock.h>
-#include <mb_runtime.h>
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <pmt.h>
 #include <stdio.h>
 #include <string.h>
index 43d0c46a0f1a9fce79982aaacdb9682bb1eb449f..3b874d1a5bd7ccba44449fda37cba287d30992fc 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <config.h>
 #endif
 
-#include <mb_mblock.h>
-#include <mb_runtime.h>
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <pmt.h>
 #include <stdio.h>
 #include <string.h>
index 9cdb92c2878a1c4f0cfd9e70bfbcfeec2a0eded1..7ce38c2e401d0527de472e6a6e083f8915026025 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <config.h>
 #endif
 
-#include <mb_mblock.h>
-#include <mb_runtime.h>
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <pmt.h>
 #include <stdio.h>
 #include <string.h>
index e9f85d31337f5663500033ebcd5f5d2013e60f99..11babb0481bb3a05f0f9d35ac41f1be39e08e283 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <config.h>
 #endif
 
-#include <mb_mblock.h>
-#include <mb_runtime.h>
-#include <mb_protocol_class.h>
-#include <mb_exception.h>
-#include <mb_msg_queue.h>
-#include <mb_message.h>
-#include <mb_msg_accepter.h>
-#include <mb_class_registry.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
+#include <mblock/protocol_class.h>
+#include <mblock/exception.h>
+#include <mblock/msg_queue.h>
+#include <mblock/message.h>
+#include <mblock/msg_accepter.h>
+#include <mblock/class_registry.h>
 #include <pmt.h>
 #include <stdio.h>
 #include <string.h>
index e457e8d64c3846ecd40acb8a861d57b4d47bf0e0..c66418392af39340e0a55d6f35c3ab435c551818 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
 #include <cppunit/TestAssert.h>
 #include <stdio.h>
 #include <usrp_server.h>
-#include <mb_mblock.h>
-#include <mb_runtime.h>
-#include <mb_protocol_class.h>
-#include <mb_class_registry.h>
+#include <mblock/mblock.h>
+#include <mblock/runtime.h>
+#include <mblock/protocol_class.h>
+#include <mblock/class_registry.h>
 #include <vector>
 #include <iostream>
 #include <pmt.h>
index 8f59d1b656cc735ba1cd8cd8bf9cf4d762650a8a..6f1a3feb3e376bd5c35c50814e945a0c795c6507 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -23,7 +23,7 @@
 #define INCLUDED_USRP_INBAND_USB_PACKET_H_
 
 #include <usrp_bytesex.h>
-#include <mb_mblock.h>
+#include <mblock/mblock.h>
 #include <pmt.h>
 #include <iostream>
 
index b1f9f7b9b5b8cd69a3695dff294faa76cdf3ea0a..45d41bed76fa4c2c6aae0cd6a7c64b7a93b547df 100644 (file)
@@ -29,7 +29,7 @@
 #include <iostream>
 #include <vector>
 #include <usb.h>
-#include <mb_class_registry.h>
+#include <mblock/class_registry.h>
 #include <usrp_inband_usb_packet.h>
 #include <fpga_regs_common.h>
 #include <stdio.h>
index 10104bd665acddb6bab51028a647e3adde0f71c5..9496b27d9b4d5bfc89b4c95017d253845a89493e 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -21,7 +21,7 @@
 #ifndef INCLUDED_USRP_RX_H
 #define INCLUDED_USRP_RX_H
 
-#include <mb_mblock.h>
+#include <mblock/mblock.h>
 #include <fstream>
 
 class usrp_standard_rx;
index 8be7095334d1fcad02b8326cb83b34cda38ae8e7..e5c454d24b99e72134206d00a789b0876be8bfab 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -28,7 +28,7 @@
 #include <iostream>
 #include <vector>
 #include <usb.h>
-#include <mb_class_registry.h>
+#include <mblock/class_registry.h>
 #include <usrp_inband_usb_packet.h>
 #include <fpga_regs_common.h>
 #include "usrp_standard.h"
index 9cf308a99206ede776b9ee24577cd74de12a119e..238b4568f6b6d7f44a73640ed9ebfe002fa68bc2 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -21,7 +21,7 @@
 #ifndef INCLUDED_USRP_RX_STUB_H
 #define INCLUDED_USRP_RX_STUB_H
 
-#include <mb_mblock.h>
+#include <mblock/mblock.h>
 #include <vector>
 #include "usrp_standard.h"
 #include <ui_nco.h>
index 9f92e2afe960fd7c543708b031060032316e980a..ac26363088b8db09326e00023817a17f56902e92 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -25,7 +25,7 @@
 #include <usrp_server.h>
 #include <iostream>
 #include <usrp_inband_usb_packet.h>
-#include <mb_class_registry.h>
+#include <mblock/class_registry.h>
 #include <vector>
 #include <usrp_usb_interface.h>
 #include <string.h>
index 09c82faac446571dce8897dc35d4409af011a5d5..dd1825d571805ea2f05d20158bc84b583e9b60f0 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -21,7 +21,7 @@
 #ifndef INCLUDED_USRP_SERVER_H
 #define INCLUDED_USRP_SERVER_H
 
-#include <mb_mblock.h>
+#include <mblock/mblock.h>
 #include <vector>
 #include <queue>
 #include <fstream>
index 5c0a8c307ae18d47a961dfc6acf120f66af5ae40..cf7976bcac5734e858e7385fa0dee7a631441f8b 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -26,7 +26,7 @@
 #include <usrp_tx.h>
 #include <iostream>
 #include <usb.h>
-#include <mb_class_registry.h>
+#include <mblock/class_registry.h>
 #include <usrp_inband_usb_packet.h>
 #include <fpga_regs_common.h>
 #include <usrp_standard.h>
index 546a26afc307e815d81a0a748c73c78f6691f650..823d5ceaa80c2e83f51d3ae79e4d537e4382835c 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -21,7 +21,7 @@
 #ifndef INCLUDED_USRP_TX_H
 #define INCLUDED_USRP_TX_H
 
-#include <mb_mblock.h>
+#include <mblock/mblock.h>
 #include <fstream>
 
 class usrp_standard_tx;
index 8d47f8152d45edb41e73bfb3a46e0598aa0a1b2c..c78b1a7b89dacefcef123168517cb5ed2d953a25 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -26,7 +26,7 @@
 #include <iostream>
 #include <vector>
 #include <usb.h>
-#include <mb_class_registry.h>
+#include <mblock/class_registry.h>
 #include <usrp_tx_stub.h>
 #include <usrp_inband_usb_packet.h>
 #include <fpga_regs_common.h>
index 52294beec439ee0d4d2881e70a881237f0dbfccb..b81037ad71ea84ecb4f3eb2b6991402910e92bdd 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -21,7 +21,7 @@
 #ifndef INCLUDED_USRP_TX_STUB_H
 #define INCLUDED_USRP_TX_STUB_H
 
-#include <mb_mblock.h>
+#include <mblock/mblock.h>
 #include <vector>
 #include "usrp_standard.h"
 #include <fstream>
index 51b6d4646c04e7c4cbda7ec1fc364d36c0f5d838..c69eb0b00570e7693686f7fcaf567d17744f07ed 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -28,7 +28,7 @@
 #include <iostream>
 #include <vector>
 #include <usb.h>
-#include <mb_class_registry.h>
+#include <mblock/class_registry.h>
 #include <usrp_inband_usb_packet.h>
 #include <fpga_regs_common.h>
 #include "usrp_rx.h"
index 6c2c157680023a294bf89b7e46219ef51d543e2e..5151f155c11ad1849e1c407ec898d392650bca77 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef INCLUDED_USRP_USB_INTERFACE_H
 #define INCLUDED_USRP_USB_INTERFACE_H
 
-#include <mb_mblock.h>
+#include <mblock/mblock.h>
 #include <vector>
 #include "usrp_standard.h"