commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 14/46: zeromq: renamed source_pushpull to p


From: git
Subject: [Commit-gnuradio] [gnuradio] 14/46: zeromq: renamed source_pushpull to pull_source
Date: Fri, 16 May 2014 19:37:14 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 9833f3fb80c788d740dc1328899d50165cfdfa90
Author: Johnathan Corgan <address@hidden>
Date:   Mon Apr 21 11:27:54 2014 -0700

    zeromq: renamed source_pushpull to pull_source
---
 gr-zeromq/examples/client.py                       |  2 +-
 gr-zeromq/examples/loop.py                         |  2 +-
 gr-zeromq/grc/CMakeLists.txt                       |  4 ++--
 ..._source_pushpull.xml => zeromq_pull_source.xml} |  6 +++---
 gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt   |  5 +++--
 .../zeromq/{source_pushpull.h => pull_source.h}    | 14 +++++++-------
 gr-zeromq/lib/CMakeLists.txt                       |  2 +-
 ...source_pushpull_impl.cc => pull_source_impl.cc} | 20 ++++++++++----------
 .../{source_pushpull_impl.h => pull_source_impl.h} | 14 +++++++-------
 gr-zeromq/lib/push_sink_impl.cc                    | 22 +++++++++++-----------
 gr-zeromq/lib/push_sink_impl.h                     | 14 +++++++-------
 gr-zeromq/swig/zeromq_swig.i                       |  6 +++---
 12 files changed, 56 insertions(+), 55 deletions(-)

diff --git a/gr-zeromq/examples/client.py b/gr-zeromq/examples/client.py
index 2abb7dc..ceb3959 100755
--- a/gr-zeromq/examples/client.py
+++ b/gr-zeromq/examples/client.py
@@ -54,7 +54,7 @@ class top_block(gr.top_block):
         # blocks
         #self.zmq_source = 
zeromq.source_reqrep_nopoll(gr.sizeof_float,source_adr)
         self.zmq_source = zeromq.source_reqrep(gr.sizeof_float,source_adr)
-        #self.zmq_source = zeromq.source_pushpull(gr.sizeof_float,source_adr)
+        #self.zmq_source = zeromq.pull_source(gr.sizeof_float,source_adr)
         #self.zmq_probe = zeromq.push_sink(gr.sizeof_float,probe_adr)
         self.zmq_probe = zeromq.sink_pubsub(gr.sizeof_float,probe_adr)
 
diff --git a/gr-zeromq/examples/loop.py b/gr-zeromq/examples/loop.py
index 1f76b47..6b9a3d1 100755
--- a/gr-zeromq/examples/loop.py
+++ b/gr-zeromq/examples/loop.py
@@ -71,7 +71,7 @@ class top_block(gr.top_block):
         self.gr_sig_source = analog.sig_source_f(samp_rate, analog.GR_SIN_WAVE 
, 1000, 1, 0)
         self.null_source = blocks.null_source(gr.sizeof_float)
         self.throttle = blocks.throttle(gr.sizeof_float, samp_rate)
-        self.zmq_source = 
zeromq.source_pushpull_feedback(gr.sizeof_float,source_adr)
+        self.zmq_source = 
zeromq.pull_source_feedback(gr.sizeof_float,source_adr)
         self.mult_a = blocks.multiply_const_ff(1)
         self.mult_b = blocks.multiply_const_ff(0.5)
         self.add = blocks.add_ff(1)
diff --git a/gr-zeromq/grc/CMakeLists.txt b/gr-zeromq/grc/CMakeLists.txt
index 4bb5140..ba4a931 100644
--- a/gr-zeromq/grc/CMakeLists.txt
+++ b/gr-zeromq/grc/CMakeLists.txt
@@ -20,7 +20,7 @@
 install(FILES
     zeromq_sink_pubsub.xml
     zeromq_push_sink.xml
-    zeromq_source_pushpull.xml
+    zeromq_pull_source.xml
 
     DESTINATION share/gnuradio/grc/blocks
 )
@@ -28,5 +28,5 @@ install(FILES
 #    zeromq_source_reqrep.xml
 #    zeromq_sink_reqrep_nopoll.xml
 #    zeromq_source_reqrep_nopoll.xml
-#    zeromq_source_pushpull.xml
+#    zeromq_pull_source.xml
 #    zeromq_source_pushpull_feedback.xml
diff --git a/gr-zeromq/grc/zeromq_source_pushpull.xml 
b/gr-zeromq/grc/zeromq_pull_source.xml
similarity index 88%
rename from gr-zeromq/grc/zeromq_source_pushpull.xml
rename to gr-zeromq/grc/zeromq_pull_source.xml
index 500bf21..7ca14fc 100644
--- a/gr-zeromq/grc/zeromq_source_pushpull.xml
+++ b/gr-zeromq/grc/zeromq_pull_source.xml
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 <block>
-  <name>ZMQ PUSH/PULL Source</name>
-  <key>zeromq_source_pushpull</key>
+  <name>ZMQ PULL Source</name>
+  <key>zeromq_pull_source</key>
   <category>ZeroMQ Interfaces</category>
   <import>from gnuradio import zeromq</import>
-  <make>zeromq.source_pushpull($type.itemsize, $address, $timeout)</make>
+  <make>zeromq.pull_source($type.itemsize, $address, $timeout)</make>
 
   <param>
     <name>IO Type</name>
diff --git a/gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt 
b/gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt
index 767a547..9cad546 100644
--- a/gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt
+++ b/gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt
@@ -22,14 +22,15 @@
 ########################################################################
 install(FILES
   api.h
-  sink_pubsub.h
+  pull_source.h
   push_sink.h
+  sink_pubsub.h
   sink_reqrep.h
   sink_reqrep_nopoll.h
   source_pushpull_feedback.h
-  source_pushpull.h
   source_reqrep.h
   source_reqrep_nopoll.h
+
   DESTINATION ${GR_INCLUDE_DIR}/gnuradio/zeromq
   COMPONENT "zeromq_devel"
 )
diff --git a/gr-zeromq/include/gnuradio/zeromq/source_pushpull.h 
b/gr-zeromq/include/gnuradio/zeromq/pull_source.h
similarity index 82%
rename from gr-zeromq/include/gnuradio/zeromq/source_pushpull.h
rename to gr-zeromq/include/gnuradio/zeromq/pull_source.h
index 51367c1..46d861b 100644
--- a/gr-zeromq/include/gnuradio/zeromq/source_pushpull.h
+++ b/gr-zeromq/include/gnuradio/zeromq/pull_source.h
@@ -20,8 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef INCLUDED_ZEROMQ_SOURCE_PUSHPULL_H
-#define INCLUDED_ZEROMQ_SOURCE_PUSHPULL_H
+#ifndef INCLUDED_ZEROMQ_PULL_SOURCE_H
+#define INCLUDED_ZEROMQ_PULL_SOURCE_H
 
 #include <gnuradio/zeromq/api.h>
 #include <gnuradio/sync_block.h>
@@ -34,16 +34,16 @@ namespace gr {
      * \ingroup zeromq
      *
      * \details
-     * This block will connect to a ZMQ PUSH socket, then produce all
+     * This block will connect to a ZMQ PULL socket, then produce all
      * incoming messages as streaming output.
      */
-    class ZEROMQ_API source_pushpull : virtual public gr::sync_block
+    class ZEROMQ_API pull_source : virtual public gr::sync_block
     {
     public:
-      typedef boost::shared_ptr<source_pushpull> sptr;
+      typedef boost::shared_ptr<pull_source> sptr;
 
       /*!
-       * \brief Return a shared_ptr to a new instance of 
gr::zeromq::source_pushpull.
+       * \brief Return a shared_ptr to a new instance of 
gr::zeromq::pull_source.
        *
        * \param itemsize Size of a stream item in bytes
        * \param address  ZMQ socket address specifier
@@ -56,4 +56,4 @@ namespace gr {
   } // namespace zeromq
 } // namespace gr
 
-#endif /* INCLUDED_ZEROMQ_SOURCE_PUSHPULL_H */
+#endif /* INCLUDED_ZEROMQ_PULL_SOURCE_H */
diff --git a/gr-zeromq/lib/CMakeLists.txt b/gr-zeromq/lib/CMakeLists.txt
index a285bea..4142723 100644
--- a/gr-zeromq/lib/CMakeLists.txt
+++ b/gr-zeromq/lib/CMakeLists.txt
@@ -39,11 +39,11 @@ endif(ENABLE_GR_CTRLPORT)
 ########################################################################
 list(APPEND zeromq_sources
   sink_pubsub_impl.cc
+  pull_source_impl.cc
   push_sink_impl.cc
   sink_reqrep_impl.cc
   sink_reqrep_nopoll_impl.cc
   source_pushpull_feedback_impl.cc
-  source_pushpull_impl.cc
   source_reqrep_impl.cc
   source_reqrep_nopoll_impl.cc
 )
diff --git a/gr-zeromq/lib/source_pushpull_impl.cc 
b/gr-zeromq/lib/pull_source_impl.cc
similarity index 79%
rename from gr-zeromq/lib/source_pushpull_impl.cc
rename to gr-zeromq/lib/pull_source_impl.cc
index db99f27..637b529 100644
--- a/gr-zeromq/lib/source_pushpull_impl.cc
+++ b/gr-zeromq/lib/pull_source_impl.cc
@@ -25,20 +25,20 @@
 #endif
 
 #include <gnuradio/io_signature.h>
-#include "source_pushpull_impl.h"
+#include "pull_source_impl.h"
 
 namespace gr {
   namespace zeromq {
 
-    source_pushpull::sptr
-    source_pushpull::make(size_t itemsize, char *address, float timeout)
+    pull_source::sptr
+    pull_source::make(size_t itemsize, char *address, float timeout)
     {
       return gnuradio::get_initial_sptr
-        (new source_pushpull_impl(itemsize, address, timeout));
+        (new pull_source_impl(itemsize, address, timeout));
     }
 
-    source_pushpull_impl::source_pushpull_impl(size_t itemsize, char *address, 
float timeout)
-      : gr::sync_block("source_pushpull",
+    pull_source_impl::pull_source_impl(size_t itemsize, char *address, float 
timeout)
+      : gr::sync_block("pull_source",
                        gr::io_signature::make(0, 0, 0),
                        gr::io_signature::make(1, 1, itemsize)),
         d_itemsize(itemsize)
@@ -52,16 +52,16 @@ namespace gr {
     /*
      * Our virtual destructor.
      */
-    source_pushpull_impl::~source_pushpull_impl()
+    pull_source_impl::~pull_source_impl()
     {
       delete d_socket;
       delete d_context;
     }
 
     int
-    source_pushpull_impl::work(int noutput_items,
-                               gr_vector_const_void_star &input_items,
-                               gr_vector_void_star &output_items)
+    pull_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];
 
diff --git a/gr-zeromq/lib/source_pushpull_impl.h 
b/gr-zeromq/lib/pull_source_impl.h
similarity index 77%
rename from gr-zeromq/lib/source_pushpull_impl.h
rename to gr-zeromq/lib/pull_source_impl.h
index da2afbb..ff15e19 100644
--- a/gr-zeromq/lib/source_pushpull_impl.h
+++ b/gr-zeromq/lib/pull_source_impl.h
@@ -20,16 +20,16 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef INCLUDED_ZMQBLOCKS_SOURCE_PUSHPULL_IMPL_H
-#define INCLUDED_ZMQBLOCKS_SOURCE_PUSHPULL_IMPL_H
+#ifndef INCLUDED_ZMQBLOCKS_PULL_SOURCE_IMPL_H
+#define INCLUDED_ZMQBLOCKS_PULL_SOURCE_IMPL_H
 
-#include <gnuradio/zeromq/source_pushpull.h>
+#include <gnuradio/zeromq/pull_source.h>
 #include <zmq.hpp>
 
 namespace gr {
   namespace zeromq {
 
-    class source_pushpull_impl : public source_pushpull
+    class pull_source_impl : public pull_source
     {
     private:
       size_t          d_itemsize;
@@ -38,8 +38,8 @@ namespace gr {
       zmq::socket_t   *d_socket;
 
     public:
-      source_pushpull_impl(size_t itemsize, char *address, float timeout);
-      ~source_pushpull_impl();
+      pull_source_impl(size_t itemsize, char *address, float timeout);
+      ~pull_source_impl();
 
       int work(int noutput_items,
                gr_vector_const_void_star &input_items,
@@ -49,4 +49,4 @@ namespace gr {
   } // namespace zeromq
 } // namespace gr
 
-#endif /* INCLUDED_ZMQBLOCKS_SOURCE_PUSHPULL_IMPL_H */
+#endif /* INCLUDED_ZMQBLOCKS_PULL_SOURCE_IMPL_H */
diff --git a/gr-zeromq/lib/push_sink_impl.cc b/gr-zeromq/lib/push_sink_impl.cc
index 784b4e3..461ed6f 100644
--- a/gr-zeromq/lib/push_sink_impl.cc
+++ b/gr-zeromq/lib/push_sink_impl.cc
@@ -25,20 +25,20 @@
 #endif
 
 #include <gnuradio/io_signature.h>
-#include "sink_pushpull_impl.h"
+#include "push_sink_impl.h"
 
 namespace gr {
   namespace zeromq {
 
-    sink_pushpull::sptr
-    sink_pushpull::make(size_t itemsize, char *address, bool blocking)
+    push_sink::sptr
+    push_sink::make(size_t itemsize, char *address, bool blocking)
     {
       return gnuradio::get_initial_sptr
-        (new sink_pushpull_impl(itemsize, address, blocking));
+        (new push_sink_impl(itemsize, address, blocking));
     }
 
-    sink_pushpull_impl::sink_pushpull_impl(size_t itemsize, char *address, 
bool blocking)
-      : gr::sync_block("sink_pushpull",
+    push_sink_impl::push_sink_impl(size_t itemsize, char *address, bool 
blocking)
+      : gr::sync_block("push_sink",
                        gr::io_signature::make(1, 1, itemsize),
                        gr::io_signature::make(0, 0, 0)),
         d_itemsize(itemsize)
@@ -49,21 +49,21 @@ namespace gr {
       d_socket->bind (address);
     }
 
-    sink_pushpull_impl::~sink_pushpull_impl()
+    push_sink_impl::~push_sink_impl()
     {
       delete(d_socket);
       delete(d_context);
     }
 
     int
-    sink_pushpull_impl::work(int noutput_items,
-                             gr_vector_const_void_star &input_items,
-                             gr_vector_void_star &output_items)
+    push_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];
 
       // create message copy and send
-      zmq::message_t msg(d_itemsize*noutput_items); // FIXME: make blocking 
optional
+      zmq::message_t msg(d_itemsize*noutput_items);
       memcpy((void *)msg.data(), in, d_itemsize*noutput_items);
       d_socket->send(msg, d_blocking ? 0 : ZMQ_NOBLOCK);
 
diff --git a/gr-zeromq/lib/push_sink_impl.h b/gr-zeromq/lib/push_sink_impl.h
index 1a84a94..0102618 100644
--- a/gr-zeromq/lib/push_sink_impl.h
+++ b/gr-zeromq/lib/push_sink_impl.h
@@ -20,16 +20,16 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef INCLUDED_ZMQBLOCKS_SINK_PUSHPULL_IMPL_H
-#define INCLUDED_ZMQBLOCKS_SINK_PUSHPULL_IMPL_H
+#ifndef INCLUDED_ZMQBLOCKS_PUSH_SINK_IMPL_H
+#define INCLUDED_ZMQBLOCKS_PUSH_SINK_IMPL_H
 
-#include <gnuradio/zeromq/sink_pushpull.h>
+#include <gnuradio/zeromq/push_sink.h>
 #include <zmq.hpp>
 
 namespace gr {
   namespace zeromq {
 
-    class sink_pushpull_impl : public sink_pushpull
+    class push_sink_impl : public push_sink
     {
     private:
       size_t          d_itemsize;
@@ -38,8 +38,8 @@ namespace gr {
       zmq::socket_t   *d_socket;
 
     public:
-      sink_pushpull_impl(size_t itemsize, char *address, bool blocking);
-      ~sink_pushpull_impl();
+      push_sink_impl(size_t itemsize, char *address, bool blocking);
+      ~push_sink_impl();
 
       int work(int noutput_items,
               gr_vector_const_void_star &input_items,
@@ -49,4 +49,4 @@ namespace gr {
   } // namespace zeromq
 } // namespace gr
 
-#endif /* INCLUDED_ZMQBLOCKS_ZMQ_SINK_PUSHPULL_IMPL_H */
+#endif /* INCLUDED_ZMQBLOCKS_ZMQ_PUSH_SINK_IMPL_H */
diff --git a/gr-zeromq/swig/zeromq_swig.i b/gr-zeromq/swig/zeromq_swig.i
index 1c4d925..1e43399 100644
--- a/gr-zeromq/swig/zeromq_swig.i
+++ b/gr-zeromq/swig/zeromq_swig.i
@@ -33,7 +33,7 @@
 #include "gnuradio/zeromq/sink_reqrep.h"
 #include "gnuradio/zeromq/sink_reqrep_nopoll.h"
 #include "gnuradio/zeromq/source_pushpull_feedback.h"
-#include "gnuradio/zeromq/source_pushpull.h"
+#include "gnuradio/zeromq/pull_source.h"
 #include "gnuradio/zeromq/source_reqrep.h"
 #include "gnuradio/zeromq/source_reqrep_nopoll.h"
 %}
@@ -43,7 +43,7 @@
 %include "gnuradio/zeromq/sink_reqrep.h"
 %include "gnuradio/zeromq/sink_reqrep_nopoll.h"
 %include "gnuradio/zeromq/source_pushpull_feedback.h"
-%include "gnuradio/zeromq/source_pushpull.h"
+%include "gnuradio/zeromq/pull_source.h"
 %include "gnuradio/zeromq/source_reqrep.h"
 %include "gnuradio/zeromq/source_reqrep_nopoll.h"
 
@@ -52,6 +52,6 @@ GR_SWIG_BLOCK_MAGIC2(zeromq, push_sink);
 GR_SWIG_BLOCK_MAGIC2(zeromq, sink_reqrep);
 GR_SWIG_BLOCK_MAGIC2(zeromq, sink_reqrep_nopoll);
 GR_SWIG_BLOCK_MAGIC2(zeromq, source_pushpull_feedback);
-GR_SWIG_BLOCK_MAGIC2(zeromq, source_pushpull);
+GR_SWIG_BLOCK_MAGIC2(zeromq, pull_source);
 GR_SWIG_BLOCK_MAGIC2(zeromq, source_reqrep);
 GR_SWIG_BLOCK_MAGIC2(zeromq, source_reqrep_nopoll);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]