summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-blocks/grc/blocks_block_tree.xml2
-rw-r--r--gr-blocks/grc/blocks_message_sink.xml72
-rw-r--r--gr-blocks/grc/blocks_message_source.xml58
-rw-r--r--gr-blocks/include/gnuradio/blocks/CMakeLists.txt2
-rw-r--r--gr-blocks/include/gnuradio/blocks/message_sink.h52
-rw-r--r--gr-blocks/include/gnuradio/blocks/message_source.h54
-rw-r--r--gr-blocks/lib/CMakeLists.txt2
-rw-r--r--gr-blocks/lib/message_sink_impl.cc132
-rw-r--r--gr-blocks/lib/message_sink_impl.h56
-rw-r--r--gr-blocks/lib/message_source_impl.cc151
-rw-r--r--gr-blocks/lib/message_source_impl.h62
-rwxr-xr-xgr-blocks/python/blocks/qa_message.py31
-rw-r--r--gr-blocks/python/blocks/qa_message_tags.py27
-rw-r--r--gr-blocks/swig/blocks_swig0.i6
14 files changed, 1 insertions, 706 deletions
diff --git a/gr-blocks/grc/blocks_block_tree.xml b/gr-blocks/grc/blocks_block_tree.xml
index 6bd72be2fd..56a2b9f163 100644
--- a/gr-blocks/grc/blocks_block_tree.xml
+++ b/gr-blocks/grc/blocks_block_tree.xml
@@ -122,8 +122,6 @@
</cat>
<cat>
<name>Message Tools</name>
- <block>blocks_message_source</block>
- <block>blocks_message_sink</block>
<block>blocks_message_burst_source</block>
<block>blocks_message_strobe</block>
<block>blocks_message_strobe_random</block>
diff --git a/gr-blocks/grc/blocks_message_sink.xml b/gr-blocks/grc/blocks_message_sink.xml
deleted file mode 100644
index c1f21f6521..0000000000
--- a/gr-blocks/grc/blocks_message_sink.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Message Sink (the source port is a message)
-###################################################
- -->
-<block>
- <name>Message Sink</name>
- <key>blocks_message_sink</key>
- <import>from gnuradio import blocks</import>
- <make>blocks.message_sink($type.size*$vlen, $(id)_msgq_out, $dont_block)</make>
- <param>
- <name>Input Type</name>
- <key>type</key>
- <type>enum</type>
- <option>
- <name>Complex</name>
- <key>complex</key>
- <opt>size:gr.sizeof_gr_complex</opt>
- </option>
- <option>
- <name>Float</name>
- <key>float</key>
- <opt>size:gr.sizeof_float</opt>
- </option>
- <option>
- <name>Int</name>
- <key>int</key>
- <opt>size:gr.sizeof_int</opt>
- </option>
- <option>
- <name>Short</name>
- <key>short</key>
- <opt>size:gr.sizeof_short</opt>
- </option>
- <option>
- <name>Byte</name>
- <key>byte</key>
- <opt>size:gr.sizeof_char</opt>
- </option>
- </param>
- <param>
- <name>Don't Block</name>
- <key>dont_block</key>
- <value>False</value>
- <type>enum</type>
- <option>
- <name>Don't Block</name>
- <key>True</key>
- </option>
- <option>
- <name>Block</name>
- <key>False</key>
- </option>
- </param>
- <param>
- <name>Vec Length</name>
- <key>vlen</key>
- <value>1</value>
- <type>int</type>
- </param>
- <check>$vlen &gt; 0</check>
- <sink>
- <name>in</name>
- <type>$type</type>
- <vlen>$vlen</vlen>
- </sink>
- <source>
- <name>out</name>
- <type>msg</type>
- </source>
-</block>
diff --git a/gr-blocks/grc/blocks_message_source.xml b/gr-blocks/grc/blocks_message_source.xml
deleted file mode 100644
index 12c6569606..0000000000
--- a/gr-blocks/grc/blocks_message_source.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Message Source (the sink port is a message)
-###################################################
- -->
-<block>
- <name>Message Source</name>
- <key>blocks_message_source</key>
- <import>from gnuradio import blocks</import>
- <make>blocks.message_source($type.size*$vlen, $(id)_msgq_in)</make>
- <param>
- <name>Output Type</name>
- <key>type</key>
- <type>enum</type>
- <option>
- <name>Complex</name>
- <key>complex</key>
- <opt>size:gr.sizeof_gr_complex</opt>
- </option>
- <option>
- <name>Float</name>
- <key>float</key>
- <opt>size:gr.sizeof_float</opt>
- </option>
- <option>
- <name>Int</name>
- <key>int</key>
- <opt>size:gr.sizeof_int</opt>
- </option>
- <option>
- <name>Short</name>
- <key>short</key>
- <opt>size:gr.sizeof_short</opt>
- </option>
- <option>
- <name>Byte</name>
- <key>byte</key>
- <opt>size:gr.sizeof_char</opt>
- </option>
- </param>
- <param>
- <name>Vec Length</name>
- <key>vlen</key>
- <value>1</value>
- <type>int</type>
- </param>
- <check>$vlen &gt; 0</check>
- <sink>
- <name>in</name>
- <type>msg</type>
- </sink>
- <source>
- <name>out</name>
- <type>$type</type>
- <vlen>$vlen</vlen>
- </source>
-</block>
diff --git a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
index 5a748acc19..9a8c96aa59 100644
--- a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
+++ b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
@@ -120,8 +120,6 @@ install(FILES
keep_one_in_n.h
lfsr_32k_source_s.h
message_debug.h
- message_sink.h
- message_source.h
message_strobe.h
message_strobe_random.h
message_burst_source.h
diff --git a/gr-blocks/include/gnuradio/blocks/message_sink.h b/gr-blocks/include/gnuradio/blocks/message_sink.h
deleted file mode 100644
index 541ad6eaa1..0000000000
--- a/gr-blocks/include/gnuradio/blocks/message_sink.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2013 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.
- */
-
-#ifndef INCLUDED_GR_MESSAGE_SINK_H
-#define INCLUDED_GR_MESSAGE_SINK_H
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-#include <gnuradio/msg_queue.h>
-
-namespace gr {
- namespace blocks {
-
- /*!
- * \brief Gather received items into messages and insert into msgq
- * \ingroup message_tools_blk
- */
- class BLOCKS_API message_sink : virtual public sync_block
- {
- public:
- // gr::blocks::message_sink::sptr
- typedef boost::shared_ptr<message_sink> sptr;
-
- static sptr make(size_t itemsize, gr::msg_queue::sptr msgq, bool dont_block);
- static sptr make(size_t itemsize, gr::msg_queue::sptr msgq, bool dont_block,
- const std::string& lengthtagname);
-
- };
-
- } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_MESSAGE_SINK_H */
diff --git a/gr-blocks/include/gnuradio/blocks/message_source.h b/gr-blocks/include/gnuradio/blocks/message_source.h
deleted file mode 100644
index d85c07cf2c..0000000000
--- a/gr-blocks/include/gnuradio/blocks/message_source.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2013 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.
- */
-
-#ifndef INCLUDED_GR_MESSAGE_SOURCE_H
-#define INCLUDED_GR_MESSAGE_SOURCE_H
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-#include <gnuradio/msg_queue.h>
-
-namespace gr {
- namespace blocks {
-
- /*!
- * \brief Turn received messages into a stream
- * \ingroup message_tools_blk
- */
- class BLOCKS_API message_source : virtual public sync_block
- {
- public:
- // gr::blocks::message_source::sptr
- typedef boost::shared_ptr<message_source> sptr;
-
- static sptr make(size_t itemsize, int msgq_limit=0);
- static sptr make(size_t itemsize, gr::msg_queue::sptr msgq);
- static sptr make(size_t itemsize, gr::msg_queue::sptr msgq,
- const std::string& lengthtagname);
-
- virtual gr::msg_queue::sptr msgq() const = 0;
- };
-
- } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_MESSAGE_SOURCE_H */
diff --git a/gr-blocks/lib/CMakeLists.txt b/gr-blocks/lib/CMakeLists.txt
index da6bc9bf89..96fe7c0258 100644
--- a/gr-blocks/lib/CMakeLists.txt
+++ b/gr-blocks/lib/CMakeLists.txt
@@ -140,8 +140,6 @@ list(APPEND gr_blocks_sources
keep_one_in_n_impl.cc
lfsr_32k_source_s_impl.cc
message_debug_impl.cc
- message_sink_impl.cc
- message_source_impl.cc
message_strobe_impl.cc
message_strobe_random_impl.cc
message_burst_source_impl.cc
diff --git a/gr-blocks/lib/message_sink_impl.cc b/gr-blocks/lib/message_sink_impl.cc
deleted file mode 100644
index 3dc4102c48..0000000000
--- a/gr-blocks/lib/message_sink_impl.cc
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2010,2013 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 "message_sink_impl.h"
-#include <gnuradio/io_signature.h>
-#include <cstdio>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdexcept>
-#include <string.h>
-
-namespace gr {
- namespace blocks {
-
- message_sink::sptr
- message_sink::make(size_t itemsize, msg_queue::sptr msgq, bool dont_block)
- {
- return gnuradio::get_initial_sptr
- (new message_sink_impl(itemsize, msgq, dont_block));
- }
-
- message_sink::sptr
- message_sink::make(size_t itemsize, msg_queue::sptr msgq, bool dont_block,
- const std::string& lengthtagname)
- {
- return gnuradio::get_initial_sptr
- (new message_sink_impl(itemsize, msgq, dont_block, lengthtagname));
- }
-
- message_sink_impl::message_sink_impl(size_t itemsize, msg_queue::sptr msgq, bool dont_block)
- : sync_block("message_sink",
- io_signature::make(1, 1, itemsize),
- io_signature::make(0, 0, 0)),
- d_itemsize(itemsize), d_msgq(msgq), d_dont_block(dont_block),
- d_tags(false), d_items_read(0)
- {
- }
-
- message_sink_impl::message_sink_impl(size_t itemsize, msg_queue::sptr msgq, bool dont_block,
- const std::string& lengthtagname)
- : sync_block("message_sink",
- io_signature::make(1, 1, itemsize),
- io_signature::make(0, 0, 0)),
- d_itemsize(itemsize), d_msgq(msgq), d_dont_block(dont_block),
- d_tags(true), d_lengthtagname(lengthtagname), d_items_read(0)
- {
- }
-
- message_sink_impl::~message_sink_impl()
- {
- }
-
- int
- message_sink_impl::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
- {
- const char *in = (const char *) input_items[0];
-
- if (d_tags) {
- long packet_length = 0;
- std::vector<tag_t> tags;
- this->get_tags_in_range(tags, 0, d_items_read, d_items_read+1);
- //const size_t ninput_items = noutput_items; //assumption for sync block, this can change
- for (unsigned int i = 0; i < tags.size(); i++) {
- if (pmt::symbol_to_string(tags[i].key) == d_lengthtagname) {
- packet_length = pmt::to_long(tags[i].value);
- }
- }
- assert(packet_length != 0);
-
- // FIXME run this multiple times if input_items >= N * packet_length
- if (noutput_items >= packet_length ) {
- // If the message queue is full we drop the packet.
- if (!d_msgq->full_p()) {
- message::sptr msg = message::make(0, // msg type
- d_itemsize, // arg1 for other end
- packet_length, // arg2 for other end (redundant)
- packet_length * d_itemsize); // len of msg
- memcpy(msg->msg(), in, packet_length * d_itemsize);
- d_msgq->handle(msg); // send it
- }
- d_items_read += packet_length;
- return packet_length;
- } else {
- return 0;
- }
- } else {
- // If the queue if full we drop all the data we got.
- if (!d_msgq->full_p()) {
- // build a message to hold whatever we've got
- message::sptr msg = message::make(0, // msg type
- d_itemsize, // arg1 for other end
- noutput_items, // arg2 for other end (redundant)
- noutput_items * d_itemsize); // len of msg
- memcpy(msg->msg(), in, noutput_items * d_itemsize);
-
- d_msgq->handle(msg); // send it
- }
-
- return noutput_items;
- }
- }
-
- } /* namespace blocks */
-} /* namespace gr */
-
diff --git a/gr-blocks/lib/message_sink_impl.h b/gr-blocks/lib/message_sink_impl.h
deleted file mode 100644
index e0ae3d00c0..0000000000
--- a/gr-blocks/lib/message_sink_impl.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2013 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.
- */
-
-#ifndef INCLUDED_GR_MESSAGE_SINK_IMPL_H
-#define INCLUDED_GR_MESSAGE_SINK_IMPL_H
-
-#include <gnuradio/blocks/message_sink.h>
-
-namespace gr {
- namespace blocks {
-
- class message_sink_impl : public message_sink
- {
- private:
- size_t d_itemsize;
- msg_queue::sptr d_msgq;
- bool d_dont_block;
- bool d_tags;
- std::string d_lengthtagname;
- uint64_t d_items_read;
-
- public:
- message_sink_impl(size_t itemsize, msg_queue::sptr msgq, bool dont_block);
- message_sink_impl(size_t itemsize, msg_queue::sptr msgq, bool dont_block,
- const std::string& lengthtagname);
-
- ~message_sink_impl();
-
- int work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
- };
-
- } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_MESSAGE_SINK_IMPL_H */
diff --git a/gr-blocks/lib/message_source_impl.cc b/gr-blocks/lib/message_source_impl.cc
deleted file mode 100644
index b4e9ba6ed7..0000000000
--- a/gr-blocks/lib/message_source_impl.cc
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2010,2013 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 "message_source_impl.h"
-#include <gnuradio/io_signature.h>
-#include <cstdio>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdexcept>
-#include <string.h>
-
-namespace gr {
- namespace blocks {
-
- message_source::sptr
- message_source::make(size_t itemsize, int msgq_limit)
- {
- return gnuradio::get_initial_sptr
- (new message_source_impl(itemsize, msgq_limit));
- }
-
- message_source::sptr
- message_source::make(size_t itemsize, msg_queue::sptr msgq)
- {
- return gnuradio::get_initial_sptr
- (new message_source_impl(itemsize, msgq));
- }
-
- message_source::sptr
- message_source::make(size_t itemsize, msg_queue::sptr msgq,
- const std::string& lengthtagname)
- {
- return gnuradio::get_initial_sptr
- (new message_source_impl(itemsize, msgq, lengthtagname));
- }
-
- message_source_impl::message_source_impl(size_t itemsize, int msgq_limit)
- : sync_block("message_source",
- io_signature::make(0, 0, 0),
- io_signature::make(1, 1, itemsize)),
- d_itemsize(itemsize), d_msgq(msg_queue::make(msgq_limit)),
- d_msg_offset(0), d_eof(false), d_tags(false)
- {
- }
-
- message_source_impl::message_source_impl(size_t itemsize, msg_queue::sptr msgq)
- : sync_block("message_source",
- io_signature::make(0, 0, 0),
- io_signature::make(1, 1, itemsize)),
- d_itemsize(itemsize), d_msgq(msgq),
- d_msg_offset(0), d_eof(false), d_tags(false)
- {
- }
-
- message_source_impl::message_source_impl(size_t itemsize, msg_queue::sptr msgq,
- const std::string& lengthtagname)
- : sync_block("message_source",
- io_signature::make(0, 0, 0),
- io_signature::make(1, 1, itemsize)),
- d_itemsize(itemsize), d_msgq(msgq), d_msg_offset(0), d_eof(false),
- d_tags(true), d_lengthtagname(lengthtagname)
- {
- }
-
- message_source_impl::~message_source_impl()
- {
- }
-
- int
- message_source_impl::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
- {
- char *out = (char*)output_items[0];
- int nn = 0;
-
- while(nn < noutput_items) {
- if (d_msg){
- //
- // Consume whatever we can from the current message
- //
- int mm = std::min(noutput_items - nn, (int)((d_msg->length() - d_msg_offset) / d_itemsize));
- memcpy (out, &(d_msg->msg()[d_msg_offset]), mm * d_itemsize);
-
- if (d_tags && (d_msg_offset == 0)) {
- const uint64_t offset = this->nitems_written(0) + nn;
- pmt::pmt_t key = pmt::string_to_symbol(d_lengthtagname);
- pmt::pmt_t value = pmt::from_long(d_msg->length());
- this->add_item_tag(0, offset, key, value);
- }
- nn += mm;
- out += mm * d_itemsize;
- d_msg_offset += mm * d_itemsize;
- assert(d_msg_offset <= d_msg->length());
-
- if (d_msg_offset == d_msg->length()){
- if (d_msg->type() == 1) // type == 1 sets EOF
- d_eof = true;
- d_msg.reset();
- }
- }
- else {
- //
- // No current message
- //
- if (d_msgq->empty_p() && nn > 0){ // no more messages in the queue, return what we've got
- break;
- }
-
- if (d_eof)
- return -1;
-
- d_msg = d_msgq->delete_head(); // block, waiting for a message
- d_msg_offset = 0;
-
- if ((d_msg->length() % d_itemsize) != 0)
- throw std::runtime_error("msg length is not a multiple of d_itemsize");
- }
-
- }
-
- return nn;
- }
-
- } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/message_source_impl.h b/gr-blocks/lib/message_source_impl.h
deleted file mode 100644
index bbc8f728d5..0000000000
--- a/gr-blocks/lib/message_source_impl.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2013 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.
- */
-
-#ifndef INCLUDED_GR_MESSAGE_SOURCE_IMPL_H
-#define INCLUDED_GR_MESSAGE_SOURCE_IMPL_H
-
-#include <gnuradio/blocks/message_source.h>
-#include <gnuradio/message.h>
-
-namespace gr {
- namespace blocks {
-
- class message_source_impl : public message_source
- {
- private:
- size_t d_itemsize;
- msg_queue::sptr d_msgq;
- message::sptr d_msg;
- unsigned d_msg_offset;
- bool d_eof;
- bool d_tags;
- // FIXME: Is this adequate tagname length.
- std::string d_lengthtagname;
-
- public:
- message_source_impl(size_t itemsize, int msgq_limit);
- message_source_impl(size_t itemsize, msg_queue::sptr msgq);
- message_source_impl(size_t itemsize, msg_queue::sptr msgq,
- const std::string& lengthtagname);
-
- ~message_source_impl();
-
- 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);
- };
-
- } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_MESSAGE_SOURCE_IMPL_H */
diff --git a/gr-blocks/python/blocks/qa_message.py b/gr-blocks/python/blocks/qa_message.py
index 1d677007b4..1d0380d44c 100755
--- a/gr-blocks/python/blocks/qa_message.py
+++ b/gr-blocks/python/blocks/qa_message.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2004,2010,2013 Free Software Foundation, Inc.
+# Copyright 2004,2010,2013,2016 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -100,35 +100,6 @@ class test_message(gr_unittest.TestCase):
tb.run()
self.assertEquals(input_data, dst.data())
- def test_301(self):
- # Use itemsize, limit constructor
- src = blocks.message_source(gr.sizeof_char)
- dst = blocks.vector_sink_b()
- tb = gr.top_block()
- tb.connect(src, dst)
- src.msgq().insert_tail(gr.message_from_string('01234'))
- src.msgq().insert_tail(gr.message_from_string('5'))
- src.msgq().insert_tail(gr.message_from_string(''))
- src.msgq().insert_tail(gr.message_from_string('6789'))
- src.msgq().insert_tail(gr.message(1)) # send EOF
- tb.run()
- self.assertEquals(tuple(map(ord, '0123456789')), dst.data())
-
- def test_302(self):
- # Use itemsize, msgq constructor
- msgq = gr.msg_queue()
- src = blocks.message_source(gr.sizeof_char, msgq)
- dst = blocks.vector_sink_b()
- tb = gr.top_block()
- tb.connect(src, dst)
- src.msgq().insert_tail(gr.message_from_string('01234'))
- src.msgq().insert_tail(gr.message_from_string('5'))
- src.msgq().insert_tail(gr.message_from_string(''))
- src.msgq().insert_tail(gr.message_from_string('6789'))
- src.msgq().insert_tail(gr.message(1)) # send EOF
- tb.run()
- self.assertEquals(tuple(map(ord, '0123456789')), dst.data())
-
def test_debug_401(self):
msg = pmt.intern("TESTING")
src = blocks.message_strobe(msg, 500)
diff --git a/gr-blocks/python/blocks/qa_message_tags.py b/gr-blocks/python/blocks/qa_message_tags.py
deleted file mode 100644
index 0d4f77bf9f..0000000000
--- a/gr-blocks/python/blocks/qa_message_tags.py
+++ /dev/null
@@ -1,27 +0,0 @@
-import time
-
-from gnuradio import gr, gr_unittest, blocks
-
-class test_message_tags (gr_unittest.TestCase):
-
- def test_1 (self):
- data = ('hello', 'you', 'there')
- tx_msgq = gr.msg_queue()
- rx_msgq = gr.msg_queue()
- for d in data:
- tx_msgq.insert_tail(gr.message_from_string(d))
- tx_msgq.insert_tail(gr.message(1)) # send EOF
- tb = gr.top_block()
- src = blocks.message_source(gr.sizeof_char, tx_msgq, "packet_length")
- snk = blocks.message_sink(gr.sizeof_char, rx_msgq, False, "packet_length")
- tb.connect(src, snk)
- tb.start()
- time.sleep(1)
- tb.stop()
- for d in data:
- msg = rx_msgq.delete_head()
- contents = msg.to_string()
- self.assertEqual(d, contents)
-
-if __name__ == '__main__':
- gr_unittest.run(test_message_tags, "test_message_tags.xml")
diff --git a/gr-blocks/swig/blocks_swig0.i b/gr-blocks/swig/blocks_swig0.i
index 37b8ef6b0b..25ce2faea7 100644
--- a/gr-blocks/swig/blocks_swig0.i
+++ b/gr-blocks/swig/blocks_swig0.i
@@ -43,8 +43,6 @@
#include "gnuradio/blocks/file_meta_source.h"
#include "gnuradio/blocks/head.h"
#include "gnuradio/blocks/message_debug.h"
-#include "gnuradio/blocks/message_sink.h"
-#include "gnuradio/blocks/message_source.h"
#include "gnuradio/blocks/message_strobe.h"
#include "gnuradio/blocks/message_strobe_random.h"
#include "gnuradio/blocks/message_burst_source.h"
@@ -69,8 +67,6 @@
%include "gnuradio/blocks/file_meta_source.h"
%include "gnuradio/blocks/head.h"
%include "gnuradio/blocks/message_debug.h"
-%include "gnuradio/blocks/message_sink.h"
-%include "gnuradio/blocks/message_source.h"
%include "gnuradio/blocks/message_strobe.h"
%include "gnuradio/blocks/message_strobe_random.h"
%include "gnuradio/blocks/message_burst_source.h"
@@ -92,8 +88,6 @@ GR_SWIG_BLOCK_MAGIC2(blocks, file_meta_sink);
GR_SWIG_BLOCK_MAGIC2(blocks, file_meta_source);
GR_SWIG_BLOCK_MAGIC2(blocks, head);
GR_SWIG_BLOCK_MAGIC2(blocks, message_debug);
-GR_SWIG_BLOCK_MAGIC2(blocks, message_sink);
-GR_SWIG_BLOCK_MAGIC2(blocks, message_source);
GR_SWIG_BLOCK_MAGIC2(blocks, message_strobe);
GR_SWIG_BLOCK_MAGIC2(blocks, message_strobe_random);
GR_SWIG_BLOCK_MAGIC2(blocks, message_burst_source);