summaryrefslogtreecommitdiff
path: root/gr-zeromq/lib
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2014-04-21 11:27:54 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2014-04-22 15:07:42 -0700
commit9833f3fb80c788d740dc1328899d50165cfdfa90 (patch)
tree31b24e4ecc8604fb3b70ad0cdc72a86483885e65 /gr-zeromq/lib
parent687b81073d4997a73183cd69b2c467ea728a5ef1 (diff)
zeromq: renamed source_pushpull to pull_source
Diffstat (limited to 'gr-zeromq/lib')
-rw-r--r--gr-zeromq/lib/CMakeLists.txt2
-rw-r--r--gr-zeromq/lib/pull_source_impl.cc (renamed from gr-zeromq/lib/source_pushpull_impl.cc)20
-rw-r--r--gr-zeromq/lib/pull_source_impl.h (renamed from gr-zeromq/lib/source_pushpull_impl.h)14
-rw-r--r--gr-zeromq/lib/push_sink_impl.cc22
-rw-r--r--gr-zeromq/lib/push_sink_impl.h14
5 files changed, 36 insertions, 36 deletions
diff --git a/gr-zeromq/lib/CMakeLists.txt b/gr-zeromq/lib/CMakeLists.txt
index a285beacb2..4142723159 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
index db99f27f9e..637b529a72 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
index da2afbba59..ff15e1968b 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 784b4e3035..461ed6f24a 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 1a84a9494d..010261817d 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 */