commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 19/46: zeromq: renamed source_reqrep to req


From: git
Subject: [Commit-gnuradio] [gnuradio] 19/46: zeromq: renamed source_reqrep to req_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 35aaec4d0d4b6f995911fd6d38697bc239cd68cf
Author: Camilo Solano <address@hidden>
Date:   Tue May 6 19:45:05 2014 +0200

    zeromq: renamed source_reqrep to req_source
---
 gr-zeromq/examples/client.py                       |  2 +-
 gr-zeromq/grc/CMakeLists.txt                       |  3 +--
 ...omq_source_reqrep.xml => zeromq_req_source.xml} |  4 ++--
 gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt   |  2 +-
 .../zeromq/{source_reqrep.h => req_source.h}       | 25 +++++++++++++---------
 gr-zeromq/lib/CMakeLists.txt                       |  2 +-
 .../{source_reqrep_impl.cc => req_source_impl.cc}  | 16 +++++++-------
 .../{source_reqrep_impl.h => req_source_impl.h}    | 14 ++++++------
 gr-zeromq/swig/zeromq_swig.i                       |  6 +++---
 9 files changed, 39 insertions(+), 35 deletions(-)

diff --git a/gr-zeromq/examples/client.py b/gr-zeromq/examples/client.py
index a892273..a5c1996 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, 1, source_adr)
+        self.zmq_source = zeromq.req_source(gr.sizeof_float, 1, source_adr)
         #self.zmq_source = zeromq.pull_source(gr.sizeof_float, 1, source_adr)
         #self.zmq_probe = zeromq.push_sink(gr.sizeof_float,probe_adr)
         self.zmq_probe = zeromq.pub_sink(gr.sizeof_float,probe_adr)
diff --git a/gr-zeromq/grc/CMakeLists.txt b/gr-zeromq/grc/CMakeLists.txt
index e30a147..94c207d 100644
--- a/gr-zeromq/grc/CMakeLists.txt
+++ b/gr-zeromq/grc/CMakeLists.txt
@@ -22,12 +22,11 @@ install(FILES
     zeromq_push_sink.xml
     zeromq_pull_source.xml
     zeromq_rep_sink.xml
+    zeromq_req_source.xml
 
     DESTINATION share/gnuradio/grc/blocks
 )
 
-#    zeromq_source_reqrep.xml
 #    zeromq_sink_reqrep_nopoll.xml
 #    zeromq_source_reqrep_nopoll.xml
-#    zeromq_pull_source.xml
 
diff --git a/gr-zeromq/grc/zeromq_source_reqrep.xml 
b/gr-zeromq/grc/zeromq_req_source.xml
similarity index 91%
rename from gr-zeromq/grc/zeromq_source_reqrep.xml
rename to gr-zeromq/grc/zeromq_req_source.xml
index 1a1a7b0..09106ab 100644
--- a/gr-zeromq/grc/zeromq_source_reqrep.xml
+++ b/gr-zeromq/grc/zeromq_req_source.xml
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 <block>
   <name>ZMQ REQ Source</name>
-  <key>zeromq_source_reqrep</key>
+  <key>zeromq_req_source</key>
   <category>ZeroMQ Interfaces</category>
   <import>from gnuradio import zeromq</import>
-  <make>zeromq.source_reqrep($type.itemsize, $vlen, $address)</make>
+  <make>zeromq.req_source($type.itemsize, $vlen, $address)</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 82088c6..7a5b229 100644
--- a/gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt
+++ b/gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt
@@ -26,10 +26,10 @@ install(FILES
   pull_source.h
   push_sink.h
   rep_sink.h
+  req_source.h
 
   DESTINATION ${GR_INCLUDE_DIR}/gnuradio/zeromq
   COMPONENT "zeromq_devel"
 )
 # sink_reqrep_nopoll.h
-# source_reqrep.h
 # source_reqrep_nopoll.h
diff --git a/gr-zeromq/include/gnuradio/zeromq/source_reqrep.h 
b/gr-zeromq/include/gnuradio/zeromq/req_source.h
similarity index 65%
rename from gr-zeromq/include/gnuradio/zeromq/source_reqrep.h
rename to gr-zeromq/include/gnuradio/zeromq/req_source.h
index 54d4b8d..5d3f380 100644
--- a/gr-zeromq/include/gnuradio/zeromq/source_reqrep.h
+++ b/gr-zeromq/include/gnuradio/zeromq/req_source.h
@@ -20,8 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef INCLUDED_ZEROMQ_SOURCE_REQREP_H
-#define INCLUDED_ZEROMQ_SOURCE_REQREP_H
+#ifndef INCLUDED_ZEROMQ_REQ_SOURCE_H
+#define INCLUDED_ZEROMQ_REQ_SOURCE_H
 
 #include <gnuradio/zeromq/api.h>
 #include <gnuradio/sync_block.h>
@@ -30,22 +30,27 @@ namespace gr {
   namespace zeromq {
 
     /*!
-     * \brief <+description of block+>
+     * \brief Receive messages on ZMQ REQ socket and source stream
      * \ingroup zeromq
      *
+     * \details
+     * This block will connect to a ZMQ REP socket, then produce all
+     * incoming messages as streaming output.
      */
-    class ZEROMQ_API source_reqrep : virtual public gr::sync_block
+    class ZEROMQ_API req_source : virtual public gr::sync_block
     {
     public:
-      typedef boost::shared_ptr<source_reqrep> sptr;
+      typedef boost::shared_ptr<req_source> sptr;
 
       /*!
-       * \brief Return a shared_ptr to a new instance of zeromq::source_reqrep.
+       * \brief Return a shared_ptr to a new instance of zeromq::req_source.
+       *
+       *
+       * \param itemsize Size of a stream item in bytes
+       * \param vlen of the input items.
+       * \param address  ZMQ socket address specifier
+       * \param timeout  Receive timeout in seconds, default is 100ms, 1us 
increments
        *
-       * To avoid accidental use of raw pointers, zeromq::source_reqrep's
-       * constructor is in a private implementation
-       * class. zeromq::source_reqrep::make is the public interface for
-       * creating new instances.
        */
       static sptr make(size_t itemsize, size_t vlen, char *address);
     };
diff --git a/gr-zeromq/lib/CMakeLists.txt b/gr-zeromq/lib/CMakeLists.txt
index 5e3c170..95ecc70 100644
--- a/gr-zeromq/lib/CMakeLists.txt
+++ b/gr-zeromq/lib/CMakeLists.txt
@@ -42,8 +42,8 @@ list(APPEND zeromq_sources
   pull_source_impl.cc
   push_sink_impl.cc
   rep_sink_impl.cc
+  req_source_impl.cc
   sink_reqrep_nopoll_impl.cc
-  source_reqrep_impl.cc
   source_reqrep_nopoll_impl.cc
 )
 
diff --git a/gr-zeromq/lib/source_reqrep_impl.cc 
b/gr-zeromq/lib/req_source_impl.cc
similarity index 85%
rename from gr-zeromq/lib/source_reqrep_impl.cc
rename to gr-zeromq/lib/req_source_impl.cc
index c6aee7c..ffe31f9 100644
--- a/gr-zeromq/lib/source_reqrep_impl.cc
+++ b/gr-zeromq/lib/req_source_impl.cc
@@ -25,20 +25,20 @@
 #endif
 
 #include <gnuradio/io_signature.h>
-#include "source_reqrep_impl.h"
+#include "req_source_impl.h"
 
 namespace gr {
   namespace zeromq {
 
-    source_reqrep::sptr
-    source_reqrep::make(size_t itemsize, size_t vlen, char *address)
+    req_source::sptr
+    req_source::make(size_t itemsize, size_t vlen, char *address)
     {
       return gnuradio::get_initial_sptr
-        (new source_reqrep_impl(itemsize, vlen, address));
+        (new req_source_impl(itemsize, vlen, address));
     }
 
-    source_reqrep_impl::source_reqrep_impl(size_t itemsize, size_t vlen, char 
*address)
-      : gr::sync_block("source_reqrep",
+    req_source_impl::req_source_impl(size_t itemsize, size_t vlen, char 
*address)
+      : gr::sync_block("req_source",
                       gr::io_signature::make(0, 0, 0),
                       gr::io_signature::make(1, 1, itemsize * vlen)),
         d_itemsize(itemsize)
@@ -48,14 +48,14 @@ namespace gr {
       d_socket->connect (address);
     }
 
-    source_reqrep_impl::~source_reqrep_impl()
+    req_source_impl::~req_source_impl()
     {
       delete d_socket;
       delete d_context;
     }
 
     int
-    source_reqrep_impl::work(int noutput_items,
+    req_source_impl::work(int noutput_items,
                             gr_vector_const_void_star &input_items,
                             gr_vector_void_star &output_items)
     {
diff --git a/gr-zeromq/lib/source_reqrep_impl.h 
b/gr-zeromq/lib/req_source_impl.h
similarity index 77%
rename from gr-zeromq/lib/source_reqrep_impl.h
rename to gr-zeromq/lib/req_source_impl.h
index 544549f..6c87b48 100644
--- a/gr-zeromq/lib/source_reqrep_impl.h
+++ b/gr-zeromq/lib/req_source_impl.h
@@ -20,16 +20,16 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef INCLUDED_ZMQBLOCKS_SOURCE_REQREP_IMPL_H
-#define INCLUDED_ZMQBLOCKS_SOURCE_REQREP_IMPL_H
+#ifndef INCLUDED_ZMQBLOCKS_REQ_SOURCE_IMPL_H
+#define INCLUDED_ZMQBLOCKS_REQ_SOURCE_IMPL_H
 
-#include <gnuradio/zeromq/source_reqrep.h>
+#include <gnuradio/zeromq/req_source.h>
 #include <zmq.hpp>
 
 namespace gr {
   namespace zeromq {
 
-    class source_reqrep_impl : public source_reqrep
+    class req_source_impl : public req_source
     {
     private:
       size_t          d_itemsize;
@@ -37,8 +37,8 @@ namespace gr {
       zmq::socket_t   *d_socket;
 
     public:
-      source_reqrep_impl(size_t itemsize, size_t vlen, char *address);
-      ~source_reqrep_impl();
+      req_source_impl(size_t itemsize, size_t vlen, char *address);
+      ~req_source_impl();
 
       int work(int noutput_items,
                gr_vector_const_void_star &input_items,
@@ -48,4 +48,4 @@ namespace gr {
   } // namespace zeromq
 } // namespace gr
 
-#endif /* INCLUDED_ZMQBLOCKS_SOURCE_REQREP_IMPL_H */
+#endif /* INCLUDED_ZMQBLOCKS_REQ_SOURCE_IMPL_H */
diff --git a/gr-zeromq/swig/zeromq_swig.i b/gr-zeromq/swig/zeromq_swig.i
index ce95938..44dc0f5 100644
--- a/gr-zeromq/swig/zeromq_swig.i
+++ b/gr-zeromq/swig/zeromq_swig.i
@@ -33,7 +33,7 @@
 #include "gnuradio/zeromq/rep_sink.h"
 #include "gnuradio/zeromq/sink_reqrep_nopoll.h"
 #include "gnuradio/zeromq/pull_source.h"
-#include "gnuradio/zeromq/source_reqrep.h"
+#include "gnuradio/zeromq/req_source.h"
 #include "gnuradio/zeromq/source_reqrep_nopoll.h"
 %}
 
@@ -42,7 +42,7 @@
 %include "gnuradio/zeromq/rep_sink.h"
 %include "gnuradio/zeromq/sink_reqrep_nopoll.h"
 %include "gnuradio/zeromq/pull_source.h"
-%include "gnuradio/zeromq/source_reqrep.h"
+%include "gnuradio/zeromq/req_source.h"
 %include "gnuradio/zeromq/source_reqrep_nopoll.h"
 
 GR_SWIG_BLOCK_MAGIC2(zeromq, pub_sink);
@@ -50,5 +50,5 @@ GR_SWIG_BLOCK_MAGIC2(zeromq, push_sink);
 GR_SWIG_BLOCK_MAGIC2(zeromq, rep_sink);
 GR_SWIG_BLOCK_MAGIC2(zeromq, sink_reqrep_nopoll);
 GR_SWIG_BLOCK_MAGIC2(zeromq, pull_source);
-GR_SWIG_BLOCK_MAGIC2(zeromq, source_reqrep);
+GR_SWIG_BLOCK_MAGIC2(zeromq, req_source);
 GR_SWIG_BLOCK_MAGIC2(zeromq, source_reqrep_nopoll);



reply via email to

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