summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/io
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/lib/io')
-rw-r--r--gnuradio-core/src/lib/io/Makefile.am7
-rw-r--r--gnuradio-core/src/lib/io/gr_file_sink.cc90
-rw-r--r--gnuradio-core/src/lib/io/gr_file_sink.h24
-rw-r--r--gnuradio-core/src/lib/io/gr_file_sink.i2
-rw-r--r--gnuradio-core/src/lib/io/gr_file_sink_base.cc118
-rw-r--r--gnuradio-core/src/lib/io/gr_file_sink_base.h67
-rw-r--r--gnuradio-core/src/lib/io/gr_file_sink_base.i46
-rw-r--r--gnuradio-core/src/lib/io/gr_frame.h41
-rw-r--r--gnuradio-core/src/lib/io/gr_message_vector_source.cc97
-rw-r--r--gnuradio-core/src/lib/io/gr_message_vector_source.h63
-rw-r--r--gnuradio-core/src/lib/io/gr_message_vector_source.i36
-rw-r--r--gnuradio-core/src/lib/io/io.i3
12 files changed, 249 insertions, 345 deletions
diff --git a/gnuradio-core/src/lib/io/Makefile.am b/gnuradio-core/src/lib/io/Makefile.am
index 049e6984ab..4835c68c25 100644
--- a/gnuradio-core/src/lib/io/Makefile.am
+++ b/gnuradio-core/src/lib/io/Makefile.am
@@ -29,12 +29,12 @@ noinst_LTLIBRARIES = libio.la
libio_la_SOURCES = \
gr_file_sink.cc \
+ gr_file_sink_base.cc \
gr_file_source.cc \
gr_file_descriptor_sink.cc \
gr_file_descriptor_source.cc \
gr_message_sink.cc \
gr_message_source.cc \
- gr_message_vector_source.cc \
gr_oscope_guts.cc \
gr_oscope_sink_f.cc \
gr_oscope_sink_x.cc \
@@ -57,13 +57,12 @@ libio_la_SOURCES = \
grinclude_HEADERS = \
gr_file_sink.h \
+ gr_file_sink_base.h \
gr_file_source.h \
gr_file_descriptor_sink.h \
gr_file_descriptor_source.h \
- gr_frame.h \
gr_message_sink.h \
gr_message_source.h \
- gr_message_vector_source.h \
gr_oscope_guts.h \
gr_oscope_sink_f.h \
gr_oscope_sink_x.h \
@@ -90,12 +89,12 @@ grinclude_HEADERS = \
swiginclude_HEADERS = \
io.i \
gr_file_sink.i \
+ gr_file_sink_base.i \
gr_file_source.i \
gr_file_descriptor_sink.i \
gr_file_descriptor_source.i \
gr_message_sink.i \
gr_message_source.i \
- gr_message_vector_source.i \
gr_oscope_sink.i \
microtune_xxxx_eval_board.i \
microtune_4702_eval_board.i \
diff --git a/gnuradio-core/src/lib/io/gr_file_sink.cc b/gnuradio-core/src/lib/io/gr_file_sink.cc
index b7cf6c24e5..0994fd2ba9 100644
--- a/gnuradio-core/src/lib/io/gr_file_sink.cc
+++ b/gnuradio-core/src/lib/io/gr_file_sink.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2006 Free Software Foundation, Inc.
+ * Copyright 2004,2006,2007 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -26,91 +26,28 @@
#include <gr_file_sink.h>
#include <gr_io_signature.h>
-#include <cstdio>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
#include <stdexcept>
-// win32 (mingw/msvc) specific
-#ifdef HAVE_IO_H
-#include <io.h>
-#endif
-#ifdef O_BINARY
-#define OUR_O_BINARY O_BINARY
-#else
-#define OUR_O_BINARY 0
-#endif
-// should be handled via configure
-#ifdef O_LARGEFILE
-#define OUR_O_LARGEFILE O_LARGEFILE
-#else
-#define OUR_O_LARGEFILE 0
-#endif
+gr_file_sink_sptr
+gr_make_file_sink (size_t itemsize, const char *filename)
+{
+ return gr_file_sink_sptr (new gr_file_sink (itemsize, filename));
+}
gr_file_sink::gr_file_sink(size_t itemsize, const char *filename)
: gr_sync_block ("file_sink",
gr_make_io_signature(1, 1, itemsize),
gr_make_io_signature(0, 0, 0)),
- d_itemsize(itemsize), d_fp(0), d_new_fp(0), d_updated(false)
+ gr_file_sink_base(filename, true),
+ d_itemsize(itemsize)
{
if (!open(filename))
throw std::runtime_error ("can't open file");
}
-gr_file_sink_sptr
-gr_make_file_sink (size_t itemsize, const char *filename)
-{
- return gr_file_sink_sptr (new gr_file_sink (itemsize, filename));
-}
-
gr_file_sink::~gr_file_sink ()
{
- close();
- if (d_fp){
- fclose((FILE *) d_fp);
- d_fp = 0;
- }
-}
-
-bool
-gr_file_sink::open(const char *filename)
-{
- omni_mutex_lock l(d_mutex); // hold mutex for duration of this function
-
- // we use the open system call to get access to the O_LARGEFILE flag.
- int fd;
- if ((fd = ::open (filename,
- O_WRONLY|O_CREAT|O_TRUNC|OUR_O_LARGEFILE|OUR_O_BINARY, 0664)) < 0){
- perror (filename);
- return false;
- }
-
- if (d_new_fp){ // if we've already got a new one open, close it
- fclose((FILE *) d_new_fp);
- d_new_fp = 0;
- }
-
- if ((d_new_fp = fdopen (fd, "wb")) == NULL){
- perror (filename);
- ::close(fd); // don't leak file descriptor if fdopen fails.
- }
-
- d_updated = true;
- return d_new_fp != 0;
-}
-
-void
-gr_file_sink::close()
-{
- omni_mutex_lock l(d_mutex); // hold mutex for duration of this function
-
- if (d_new_fp){
- fclose((FILE *) d_new_fp);
- d_new_fp = 0;
- }
- d_updated = true;
}
int
@@ -121,20 +58,13 @@ gr_file_sink::work (int noutput_items,
char *inbuf = (char *) input_items[0];
int nwritten = 0;
- if (d_updated){
- omni_mutex_lock l(d_mutex); // hold mutex for duration of this block
- if (d_fp)
- fclose((FILE *)d_fp);
- d_fp = d_new_fp; // install new file pointer
- d_new_fp = 0;
- d_updated = false;
- }
+ do_update(); // update d_fp is reqd
if (!d_fp)
return noutput_items; // drop output on the floor
while (nwritten < noutput_items){
- int count = fwrite (inbuf, d_itemsize, noutput_items - nwritten, (FILE *) d_fp);
+ int count = fwrite (inbuf, d_itemsize, noutput_items - nwritten, d_fp);
if (count == 0) // FIXME add error handling
break;
nwritten += count;
diff --git a/gnuradio-core/src/lib/io/gr_file_sink.h b/gnuradio-core/src/lib/io/gr_file_sink.h
index c289a150c0..fd0cd6f621 100644
--- a/gnuradio-core/src/lib/io/gr_file_sink.h
+++ b/gnuradio-core/src/lib/io/gr_file_sink.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004,2007 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,7 +24,7 @@
#define INCLUDED_GR_FILE_SINK_H
#include <gr_sync_block.h>
-#include <omnithread.h>
+#include <gr_file_sink_base.h>
class gr_file_sink;
typedef boost::shared_ptr<gr_file_sink> gr_file_sink_sptr;
@@ -36,16 +36,12 @@ gr_file_sink_sptr gr_make_file_sink(size_t itemsize, const char *filename);
* \ingroup sink
*/
-class gr_file_sink : public gr_sync_block
+class gr_file_sink : public gr_sync_block, public gr_file_sink_base
{
friend gr_file_sink_sptr gr_make_file_sink(size_t itemsize, const char *filename);
private:
size_t d_itemsize;
- void *d_fp; // current FILE pointer
- void *d_new_fp; // new FILE pointer
- bool d_updated; // is there a new FILE pointer?
- omni_mutex d_mutex;
protected:
gr_file_sink(size_t itemsize, const char *filename);
@@ -53,23 +49,9 @@ class gr_file_sink : public gr_sync_block
public:
~gr_file_sink();
- /*!
- * \brief Open filename and begin output to it.
- */
- bool open(const char *filename);
-
- /*!
- * \brief Close current output file.
- *
- * Closes current output file and ignores any output until
- * open is called to connect to another file.
- */
- void close();
-
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
};
-
#endif /* INCLUDED_GR_FILE_SINK_H */
diff --git a/gnuradio-core/src/lib/io/gr_file_sink.i b/gnuradio-core/src/lib/io/gr_file_sink.i
index 80f869562e..202ab93172 100644
--- a/gnuradio-core/src/lib/io/gr_file_sink.i
+++ b/gnuradio-core/src/lib/io/gr_file_sink.i
@@ -25,7 +25,7 @@ GR_SWIG_BLOCK_MAGIC(gr,file_sink)
gr_file_sink_sptr
gr_make_file_sink (size_t itemsize, const char *filename);
-class gr_file_sink : public gr_sync_block
+class gr_file_sink : public gr_sync_block, public gr_file_sink_base
{
protected:
gr_file_sink (size_t itemsize, const char *filename);
diff --git a/gnuradio-core/src/lib/io/gr_file_sink_base.cc b/gnuradio-core/src/lib/io/gr_file_sink_base.cc
new file mode 100644
index 0000000000..44d01ba8dd
--- /dev/null
+++ b/gnuradio-core/src/lib/io/gr_file_sink_base.cc
@@ -0,0 +1,118 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gr_file_sink_base.h>
+#include <cstdio>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdexcept>
+
+// win32 (mingw/msvc) specific
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+#ifdef O_BINARY
+#define OUR_O_BINARY O_BINARY
+#else
+#define OUR_O_BINARY 0
+#endif
+
+// should be handled via configure
+#ifdef O_LARGEFILE
+#define OUR_O_LARGEFILE O_LARGEFILE
+#else
+#define OUR_O_LARGEFILE 0
+#endif
+
+gr_file_sink_base::gr_file_sink_base(const char *filename, bool is_binary)
+ : d_fp(0), d_new_fp(0), d_updated(false), d_is_binary(is_binary)
+{
+ if (!open(filename))
+ throw std::runtime_error ("can't open file");
+}
+
+gr_file_sink_base::~gr_file_sink_base ()
+{
+ close();
+ if (d_fp){
+ fclose(d_fp);
+ d_fp = 0;
+ }
+}
+
+bool
+gr_file_sink_base::open(const char *filename)
+{
+ omni_mutex_lock l(d_mutex); // hold mutex for duration of this function
+
+ // we use the open system call to get access to the O_LARGEFILE flag.
+ int fd;
+ if ((fd = ::open (filename,
+ O_WRONLY|O_CREAT|O_TRUNC|OUR_O_LARGEFILE|OUR_O_BINARY,
+ 0664)) < 0){
+ perror (filename);
+ return false;
+ }
+
+ if (d_new_fp){ // if we've already got a new one open, close it
+ fclose(d_new_fp);
+ d_new_fp = 0;
+ }
+
+ if ((d_new_fp = fdopen (fd, d_is_binary ? "wb" : "w")) == NULL){
+ perror (filename);
+ ::close(fd); // don't leak file descriptor if fdopen fails.
+ }
+
+ d_updated = true;
+ return d_new_fp != 0;
+}
+
+void
+gr_file_sink_base::close()
+{
+ omni_mutex_lock l(d_mutex); // hold mutex for duration of this function
+
+ if (d_new_fp){
+ fclose(d_new_fp);
+ d_new_fp = 0;
+ }
+ d_updated = true;
+}
+
+void
+gr_file_sink_base::do_update()
+{
+ if (d_updated){
+ omni_mutex_lock l(d_mutex); // hold mutex for duration of this block
+ if (d_fp)
+ fclose(d_fp);
+ d_fp = d_new_fp; // install new file pointer
+ d_new_fp = 0;
+ d_updated = false;
+ }
+}
diff --git a/gnuradio-core/src/lib/io/gr_file_sink_base.h b/gnuradio-core/src/lib/io/gr_file_sink_base.h
new file mode 100644
index 0000000000..98fc7b652b
--- /dev/null
+++ b/gnuradio-core/src/lib/io/gr_file_sink_base.h
@@ -0,0 +1,67 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GR_FILE_SINK_BASE_H
+#define INCLUDED_GR_FILE_SINK_BASE_H
+
+#include <omnithread.h>
+#include <cstdio>
+
+/*!
+ * \brief Common base class for file sinks
+ */
+class gr_file_sink_base
+{
+ protected:
+ FILE *d_fp; // current FILE pointer
+ FILE *d_new_fp; // new FILE pointer
+ bool d_updated; // is there a new FILE pointer?
+ bool d_is_binary;
+ omni_mutex d_mutex;
+
+ protected:
+ gr_file_sink_base(const char *filename, bool is_binary);
+
+ public:
+ ~gr_file_sink_base();
+
+ /*!
+ * \brief Open filename and begin output to it.
+ */
+ bool open(const char *filename);
+
+ /*!
+ * \brief Close current output file.
+ *
+ * Closes current output file and ignores any output until
+ * open is called to connect to another file.
+ */
+ void close();
+
+ /*!
+ * \brief if we've had an update, do it now.
+ */
+ void do_update();
+};
+
+
+#endif /* INCLUDED_GR_FILE_SINK_BASE_H */
diff --git a/gnuradio-core/src/lib/io/gr_file_sink_base.i b/gnuradio-core/src/lib/io/gr_file_sink_base.i
new file mode 100644
index 0000000000..b83f251e1e
--- /dev/null
+++ b/gnuradio-core/src/lib/io/gr_file_sink_base.i
@@ -0,0 +1,46 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+class gr_file_sink_base
+{
+ protected:
+ gr_file_sink_base(const char *filename, bool is_binary);
+
+ public:
+ ~gr_file_sink_base();
+
+ /*!
+ * \brief Open filename and begin output to it.
+ */
+ bool open(const char *filename);
+
+ /*!
+ * \brief Close current output file.
+ *
+ * Closes current output file and ignores any output until
+ * open is called to connect to another file.
+ */
+ void close();
+
+ /*!
+ * \brief if we've had an update, do it now.
+ */
+ void do_update();
+};
diff --git a/gnuradio-core/src/lib/io/gr_frame.h b/gnuradio-core/src/lib/io/gr_frame.h
deleted file mode 100644
index 07317e9df5..0000000000
--- a/gnuradio-core/src/lib/io/gr_frame.h
+++ /dev/null
@@ -1,41 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_FRAME_H
-#define INCLUDED_GR_FRAME_H
-
-#include <vector>
-
-class gr_frame
-{
- public:
- gr_frame(unsigned int mtu)
- : mtu(mtu), length(0)
- { }
-
- unsigned int mtu;
- unsigned int length;
- unsigned char data[];
-};
-
-#endif
-
diff --git a/gnuradio-core/src/lib/io/gr_message_vector_source.cc b/gnuradio-core/src/lib/io/gr_message_vector_source.cc
deleted file mode 100644
index 69e2bc8dff..0000000000
--- a/gnuradio-core/src/lib/io/gr_message_vector_source.cc
+++ /dev/null
@@ -1,97 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gr_message_vector_source.h>
-#include <gr_io_signature.h>
-#include <cstdio>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdexcept>
-
-
-// public constructor that returns a shared_ptr
-
-gr_message_vector_source_sptr
-gr_make_message_vector_source(size_t max_msg_size, int msgq_limit)
-{
- return gr_message_vector_source_sptr(new gr_message_vector_source(max_msg_size,msgq_limit));
-}
-
-gr_message_vector_source::gr_message_vector_source (size_t max_msg_size, int msgq_limit)
- : gr_sync_block("message_vector_source",
- gr_make_io_signature(0, 0, 0),
- gr_make_io_signature(1, 1, 2*sizeof(int) + max_msg_size * sizeof(char))), // Make room for length fields
- d_max_msg_size(max_msg_size), d_msgq(gr_make_msg_queue(msgq_limit)), d_eof(false)
-{
-}
-
-gr_message_vector_source::~gr_message_vector_source()
-{
-}
-
-int
-gr_message_vector_source::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
-{
- /*
- char *out = (char *) output_items[0];
-
- if (d_eof)
- return -1;
-
- gr_message_sptr msg = d_msgq->delete_head();
-
- if (msg->type() == 1) { // type == 1 sets EOF
- d_eof = true;
- }
-
- assert(msg->length() <= d_max_msg_size);
- memset((int*)out, msg->length(), 1);
- memcpy (&out[4], (msg->msg()), msg->length());
- */
-
- char *out = (char *) output_items[0];
- gr_frame *myframe = (gr_frame*)out;
-
- if (d_eof)
- return -1;
-
- gr_message_sptr msg = d_msgq->delete_head();
-
- if (msg->type() == 1) { // type == 1 sets EOF
- d_eof = true;
- }
-
- assert(msg->length() <= d_max_msg_size);
- myframe->length = msg->length();
- myframe->mtu = d_max_msg_size;
- memcpy (myframe->data, (msg->msg()), msg->length());
-
- return 1;
-}
diff --git a/gnuradio-core/src/lib/io/gr_message_vector_source.h b/gnuradio-core/src/lib/io/gr_message_vector_source.h
deleted file mode 100644
index 8b34653556..0000000000
--- a/gnuradio-core/src/lib/io/gr_message_vector_source.h
+++ /dev/null
@@ -1,63 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_MESSAGE_VECTOR_SOURCE_H
-#define INCLUDED_GR_MESSAGE_VECTOR_SOURCE_H
-
-#include <gr_sync_block.h>
-#include <gr_message.h>
-#include <gr_msg_queue.h>
-#include <gr_frame.h>
-
-class gr_message_vector_source;
-typedef boost::shared_ptr<gr_message_vector_source> gr_message_vector_source_sptr;
-
-gr_message_vector_source_sptr gr_make_message_vector_source (size_t max_msg_size, int msgq_limit=0);
-
-/*!
- * \brief Turn received messages into vectors
- * \ingroup source
- */
-class gr_message_vector_source : public gr_sync_block
-{
- private:
- size_t d_max_msg_size;
- gr_msg_queue_sptr d_msgq;
- bool d_eof;
-
- friend gr_message_vector_source_sptr
- gr_make_message_vector_source(size_t max_msg_size, int msgq_limit);
-
- protected:
- gr_message_vector_source (size_t max_msg_size, int msgq_limit);
-
- public:
- ~gr_message_vector_source ();
-
- gr_msg_queue_sptr msgq() const { return d_msgq; }
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif /* INCLUDED_GR_MESSAGE_VECTOR_SOURCE_H */
diff --git a/gnuradio-core/src/lib/io/gr_message_vector_source.i b/gnuradio-core/src/lib/io/gr_message_vector_source.i
deleted file mode 100644
index ff8bd5de56..0000000000
--- a/gnuradio-core/src/lib/io/gr_message_vector_source.i
+++ /dev/null
@@ -1,36 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-GR_SWIG_BLOCK_MAGIC(gr,message_vector_source);
-
-gr_message_vector_source_sptr gr_make_message_vector_source (size_t max_msg_size, int msgq_limit=0);
-
-class gr_message_vector_source : public gr_sync_block
-{
- protected:
- gr_message_vector_source (size_t itemsize, int msgq_limit);
-
- public:
- ~gr_message_vector_source ();
-
- gr_msg_queue_sptr msgq() const;
-};
diff --git a/gnuradio-core/src/lib/io/io.i b/gnuradio-core/src/lib/io/io.i
index 806e83e1f8..c6344051e0 100644
--- a/gnuradio-core/src/lib/io/io.i
+++ b/gnuradio-core/src/lib/io/io.i
@@ -34,12 +34,12 @@
#include <ppio.h>
#include <gr_message_source.h>
#include <gr_message_sink.h>
-#include <gr_message_vector_source.h>
#include <gr_udp_sink.h>
#include <gr_udp_source.h>
%}
+%include "gr_file_sink_base.i"
%include "gr_file_sink.i"
%include "gr_file_source.i"
%include "gr_file_descriptor_sink.i"
@@ -51,7 +51,6 @@
%include "gr_oscope_sink.i"
%include "ppio.i"
%include "gr_message_source.i"
-%include "gr_message_vector_source.i"
%include "gr_message_sink.i"
%include "gr_udp_sink.i"
%include "gr_udp_source.i"