merged in mblock work-in-progress
authoreb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Thu, 17 Aug 2006 01:10:20 +0000 (01:10 +0000)
committereb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Thu, 17 Aug 2006 01:10:20 +0000 (01:10 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3331 221aa14e-8319-0410-a670-987f0aec2ac5

17 files changed:
Makefile.common
config/Makefile.am
config/grc_mblock.m4 [new file with mode: 0644]
configure.ac
mblock/AUTHORS [new file with mode: 0644]
mblock/ChangeLog [new file with mode: 0644]
mblock/Makefile.am [new file with mode: 0644]
mblock/README [new file with mode: 0644]
mblock/doc/Makefile.am [new file with mode: 0644]
mblock/src/Makefile.am [new file with mode: 0644]
mblock/src/lib/Makefile.am [new file with mode: 0644]
mblock/src/lib/mb_common.h [new file with mode: 0644]
mblock/src/lib/mb_mblock.h [new file with mode: 0644]
mblock/src/lib/mb_message.cc [new file with mode: 0644]
mblock/src/lib/mb_message.h [new file with mode: 0644]
mblock/src/lib/mb_protocol_class.cc [new file with mode: 0644]
mblock/src/lib/mb_protocol_class.h [new file with mode: 0644]

index 3bf752f98f74bd06d520b7aa2d857e258f11fa33..4ce123befed26bc1b1b4e66fb5f8f9d1380364c1 100644 (file)
@@ -68,6 +68,9 @@ USRP_INCLUDES = -I$(top_srcdir)/usrp/host/lib \
 USRP_LIBS = -L$(top_builddir)/usrp/host/lib \
            -lusrp
 
+PMT_INCLUDES = -I$(top_srcdir)/pmt/src/lib
+PMT_LIBS = -L$(top_builddir)/pmt/src/lib -lpmt
+
 # This used to be set in configure.ac but is now defined here for all 
 # Makefiles when this fragment is included.
 STD_DEFINES_AND_INCLUDES=$(DEFINES) $(GNURADIO_INCLUDES) $(BOOST_CFLAGS)
index 53d80708d8792a3df95c785ccab2e2704bc52751..f2ad470e124b0f7cc437b881c8379148837cac33 100644 (file)
@@ -49,6 +49,7 @@ m4macros = \
        grc_gr_usrp.m4 \
        grc_gr_video_sdl.m4 \
        grc_gr_wxgui.m4 \
+       grc_mblock.m4 \
        gr_check_createfilemapping.m4 \
        gr_check_mc4020.m4 \
        gr_check_shm_open.m4 \
diff --git a/config/grc_mblock.m4 b/config/grc_mblock.m4
new file mode 100644 (file)
index 0000000..b98fb79
--- /dev/null
@@ -0,0 +1,34 @@
+dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl 
+dnl This file is part of GNU Radio
+dnl 
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2, or (at your option)
+dnl any later version.
+dnl 
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING.  If not, write to
+dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+dnl Boston, MA 02111-1307, USA.
+
+AC_DEFUN([GRC_MBLOCK],[
+    AC_CONFIG_SRCDIR([mblock/src/lib/mb_mblock.h])
+
+    AC_CONFIG_FILES([\
+       mblock/Makefile \
+       mblock/doc/Makefile \
+       mblock/src/Makefile \
+       mblock/src/lib/Makefile
+    ])
+
+    dnl run_tests is created from run_tests.in.  Make it executable.
+    dnl AC_CONFIG_COMMANDS([run_tests_mblock], [chmod +x mblock/src/python/run_tests])
+
+    subdirs="$subdirs mblock"
+])
index 4af5d06d2fd2f38eb610efa9dc6bf24bba846aa5..3e3a0e16392668bde739d098200b6ae9c997a6f4 100644 (file)
@@ -169,6 +169,7 @@ GRC_GR_RADIO_ASTRONOMY
 GRC_GR_VIDEO_SDL
 GRC_GR_WXGUI
 GRC_PMT
+GRC_MBLOCK                     dnl this must come after GRC_PMT
 GRC_GR_TRELLIS
 dnl GRC_EZDOP                  dnl disable until grc_ezdop.m4 fixed
 dnl GRC_GR_EZDOP               dnl this must come after GRC_EZDOP
diff --git a/mblock/AUTHORS b/mblock/AUTHORS
new file mode 100644 (file)
index 0000000..ee4560a
--- /dev/null
@@ -0,0 +1 @@
+Eric Blossom <eb@comsec.com>
diff --git a/mblock/ChangeLog b/mblock/ChangeLog
new file mode 100644 (file)
index 0000000..385dbc6
--- /dev/null
@@ -0,0 +1,20 @@
+#
+# Copyright 2006 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+# 
diff --git a/mblock/Makefile.am b/mblock/Makefile.am
new file mode 100644 (file)
index 0000000..d16c469
--- /dev/null
@@ -0,0 +1,25 @@
+#
+# Copyright 2004 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+# 
+
+include $(top_srcdir)/Makefile.common
+
+SUBDIRS = src
+DIST_SUBDIRS = src doc
diff --git a/mblock/README b/mblock/README
new file mode 100644 (file)
index 0000000..cfb0beb
--- /dev/null
@@ -0,0 +1,22 @@
+#
+# Copyright 2006 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+# 
+
+The "Message block" implementation.
diff --git a/mblock/doc/Makefile.am b/mblock/doc/Makefile.am
new file mode 100644 (file)
index 0000000..2774a84
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Copyright 2004,2005,2006 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+# 
+
+TARGETS = 
+
+
+# To avoid build problems for folks who don't have xmlto installed, we
+# don't build the docs by default.
+
+# html: $(TARGETS)
+all: $(TARGETS)
+
+
+EXTRA_DIST =                           
+
+BUILT_XML_FILES =                      
+
+
+# ----------------------------------------------------------------
+
+clean:
+       -rm -f $(TARGETS) $(BUILT_XML_FILES)
+
+%.html : %.xml
+       xmlto html-nochunks $<
diff --git a/mblock/src/Makefile.am b/mblock/src/Makefile.am
new file mode 100644 (file)
index 0000000..8b32a22
--- /dev/null
@@ -0,0 +1,22 @@
+#
+# Copyright 2004,2006 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+# 
+
+SUBDIRS = lib
diff --git a/mblock/src/lib/Makefile.am b/mblock/src/lib/Makefile.am
new file mode 100644 (file)
index 0000000..74f1311
--- /dev/null
@@ -0,0 +1,82 @@
+#
+# Copyright 2006 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+# 
+
+include $(top_srcdir)/Makefile.common
+
+INCLUDES = $(PMT_INCLUDES) $(BOOST_CFLAGS) $(CPPUNIT_INCLUDES)
+
+# TESTS = test_mblock
+
+lib_LTLIBRARIES = libmblock.la libmblock-qa.la
+
+EXTRA_DIST =                           
+
+
+# These are the source files that go into the mblock shared library
+libmblock_la_SOURCES =                 \
+       mb_message.cc                   \
+       mb_protocol_class.cc            
+
+
+# magic flags
+libmblock_la_LDFLAGS = $(NO_UNDEFINED) -avoid-version
+
+# link the library against the c++ standard library
+libmblock_la_LIBADD =                  \
+       $(PMT_LIBS)                     \
+       -lstdc++                        
+
+include_HEADERS =                      \
+       mb_mblock.h                     \
+       mb_common.h                     \
+       mb_message.h                    \
+       mb_protocol_class.h             
+
+noinst_HEADERS =                       
+
+
+# Build the qa code into its own library
+
+libmblock_qa_la_SOURCES =              
+
+
+# magic flags
+libmblock_qa_la_LDFLAGS = $(NO_UNDEFINED) -avoid-version
+
+# link the library against the c++ standard library
+libmblock_qa_la_LIBADD =                       \
+       libmblock.la                            \
+       $(CPPUNIT_LIBS)                         \
+       -lstdc++                        
+
+
+#noinst_PROGRAMS       =                       \
+#      test_mblock
+
+
+LIBMBLOCK   = libmblock.la
+LIBMBLOCKQA = libmblock-qa.la $(LIBMBLOCK)
+
+#test_mblock_SOURCES = test_mblock.cc
+#test_mblock_LDADD   = $(LIBMBLOCKQA)
+
+
+CLEANFILES = $(BUILT_SOURCES) *.pyc
diff --git a/mblock/src/lib/mb_common.h b/mblock/src/lib/mb_common.h
new file mode 100644 (file)
index 0000000..abeb065
--- /dev/null
@@ -0,0 +1,29 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_MB_COMMON_H
+#define INCLUDED_MB_COMMON_H
+
+#include <pmt.h>
+
+typedef unsigned int   mb_pri_t;
+static const mb_pri_t  MB_PRI_DEFAULT = 5;
+
+#endif /* INCLUDED_MB_COMMON_H */
diff --git a/mblock/src/lib/mb_mblock.h b/mblock/src/lib/mb_mblock.h
new file mode 100644 (file)
index 0000000..db9d0a3
--- /dev/null
@@ -0,0 +1,26 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_MB_MBLOCK_H
+#define INCLUDED_MB_MBLOCK_H
+
+#include <mb_common.h>
+
+#endif /* INCLUDED_MB_MBLOCK_H */
diff --git a/mblock/src/lib/mb_message.cc b/mblock/src/lib/mb_message.cc
new file mode 100644 (file)
index 0000000..f494201
--- /dev/null
@@ -0,0 +1,41 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <mb_message.h>
+
+mb_message_sptr
+mb_make_message(pmt_t signal, pmt_t data, pmt_t metadata, mb_pri_t priority)
+{
+  return mb_message_sptr(new mb_message(signal, data, metadata, priority));
+}
+
+mb_message::mb_message(pmt_t signal, pmt_t data, pmt_t metadata, mb_pri_t priority)
+  : d_signal(signal), d_data(data), d_metadata(metadata), d_priority(priority)
+{
+}
+
+mb_message::~mb_message()
+{
+  // NOP
+}
diff --git a/mblock/src/lib/mb_message.h b/mblock/src/lib/mb_message.h
new file mode 100644 (file)
index 0000000..ee88d79
--- /dev/null
@@ -0,0 +1,66 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_MB_MESSAGE_H
+#define INCLUDED_MB_MESSAGE_H
+
+#include <mb_common.h>
+
+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 {
+  pmt_t                d_signal;
+  pmt_t                d_data;
+  pmt_t                d_metadata;
+  mb_pri_t     d_priority;
+  // foo       d_rcvd_port_id;
+
+  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; }
+  // foo rcvd_port_id const { return d_rcvd_port_id; }
+};
+
+#endif /* INCLUDED_MB_MESSAGE_H */
diff --git a/mblock/src/lib/mb_protocol_class.cc b/mblock/src/lib/mb_protocol_class.cc
new file mode 100644 (file)
index 0000000..a34f073
--- /dev/null
@@ -0,0 +1,44 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <mb_protocol_class.h>
+
+
+mb_protocol_class_sptr 
+mb_make_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing)
+{
+  return mb_protocol_class_sptr(new mb_protocol_class(name, incoming, outgoing));
+}
+
+mb_protocol_class::mb_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing)
+  : d_name(name), d_incoming(incoming), d_outgoing(outgoing)
+{
+}
+
+mb_protocol_class_sptr
+mb_protocol_class::conj() const
+{
+  return mb_make_protocol_class(name(), outgoing(), incoming());
+}
diff --git a/mblock/src/lib/mb_protocol_class.h b/mblock/src/lib/mb_protocol_class.h
new file mode 100644 (file)
index 0000000..771a63e
--- /dev/null
@@ -0,0 +1,62 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_MB_PROTOCOL_CLASS_H
+#define INCLUDED_MB_PROTOCOL_CLASS_H
+
+#include <mb_common.h>
+
+// FIXME maybe this should just be a pmt_t aggregate???
+
+class mb_protocol_class;
+typedef boost::shared_ptr<mb_protocol_class> mb_protocol_class_sptr;
+
+/*!
+ * \brief construct a protocol_class and return boost::shared_ptr
+ *
+ * \param name         the name of the class (symbol)
+ * \param incoming     incoming message set (dict: keys are message types)
+ * \param outgoing     outgoing message set (dict: keys are message types)
+ */
+mb_protocol_class_sptr 
+mb_make_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing);
+
+class mb_protocol_class {
+  pmt_t                d_name;
+  pmt_t                d_incoming;
+  pmt_t                d_outgoing;
+
+  friend mb_protocol_class_sptr
+  mb_make_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing);
+
+  // private constructor
+  mb_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing);
+
+public:
+  ~mb_protocol_class();
+
+  pmt_t name() const { return d_name; }
+  pmt_t incoming() const { return d_incoming; }
+  pmt_t outgoing() const { return d_outgoing; }
+
+  mb_protocol_class_sptr conj() const; // return the conjugate of this protocol class
+};
+
+#endif /* INCLUDED_MB_PROTOCOL_CLASS_H */