summaryrefslogtreecommitdiff
path: root/gruel
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-12-03 19:42:59 -0500
committerTom Rondeau <trondeau@vt.edu>2012-12-03 19:42:59 -0500
commit1fea3358fbb5796ca50475e55dd7f0d443f1cd73 (patch)
treee15b9b27a607c96df5f42f58e2ab578e6e27a34b /gruel
parent76906d9a6bab589abaa96e0dc115c45927f4570f (diff)
Merging ctrlport2 into next branch.
Diffstat (limited to 'gruel')
-rw-r--r--gruel/src/include/gruel/msg_producer.h51
-rw-r--r--gruel/src/lib/msg/msg_producer.cc36
2 files changed, 87 insertions, 0 deletions
diff --git a/gruel/src/include/gruel/msg_producer.h b/gruel/src/include/gruel/msg_producer.h
new file mode 100644
index 0000000000..cd753958ad
--- /dev/null
+++ b/gruel/src/include/gruel/msg_producer.h
@@ -0,0 +1,51 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 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_GRUEL_MSG_PRODUCER_H
+#define INCLUDED_GRUEL_MSG_PRODUCER_H
+
+#include <gruel/api.h>
+#include <gruel/pmt.h>
+#include <boost/shared_ptr.hpp>
+
+namespace gruel {
+
+ /*!
+ * \brief Virtual base class that produces messages
+ */
+ class GRUEL_API msg_producer
+ {
+ public:
+ msg_producer() {}
+ virtual ~msg_producer();
+
+ /*!
+ * \brief send \p msg to \p msg_producer
+ */
+ virtual pmt::pmt_t retrieve() = 0;
+ };
+
+ typedef boost::shared_ptr<msg_producer> msg_producer_sptr;
+
+} /* namespace gruel */
+
+#endif /* INCLUDED_GRUEL_MSG_PRODUCER_H */
+
diff --git a/gruel/src/lib/msg/msg_producer.cc b/gruel/src/lib/msg/msg_producer.cc
new file mode 100644
index 0000000000..3e8148763b
--- /dev/null
+++ b/gruel/src/lib/msg/msg_producer.cc
@@ -0,0 +1,36 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gruel/msg_producer.h>
+
+namespace gruel {
+
+ msg_producer::~msg_producer()
+ {
+ // NOP, required as virtual destructor
+ }
+
+} /* namespace gruel */