[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 37/46: zeromq: Change the value of the poll
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 37/46: zeromq: Change the value of the poll timeout according to the zmq version. Must be in microseconds for version 2 and below and in milliseconds for version 3 and above. |
Date: |
Fri, 16 May 2014 19:37:17 +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 aa80a7739e6885441724a776870d1b9de0183da0
Author: Johannes Schmitz <address@hidden>
Date: Fri May 9 17:29:50 2014 +0200
zeromq: Change the value of the poll timeout according to the zmq version.
Must be in microseconds for version 2 and below and in milliseconds for
version 3 and above.
---
gr-zeromq/lib/pull_source_impl.cc | 5 +++++
gr-zeromq/lib/push_sink_impl.cc | 5 +++++
gr-zeromq/lib/rep_sink_impl.cc | 5 +++++
gr-zeromq/lib/req_source_impl.cc | 5 +++++
4 files changed, 20 insertions(+)
diff --git a/gr-zeromq/lib/pull_source_impl.cc
b/gr-zeromq/lib/pull_source_impl.cc
index 2ee6ad0..83f59c5 100644
--- a/gr-zeromq/lib/pull_source_impl.cc
+++ b/gr-zeromq/lib/pull_source_impl.cc
@@ -43,6 +43,11 @@ namespace gr {
gr::io_signature::make(1, 1, itemsize * vlen)),
d_itemsize(itemsize), d_vlen(vlen), d_timeout(timeout)
{
+ int major, minor, patch;
+ zmq::version (&major, &minor, &patch);
+ if (major < 3) {
+ d_timeout = timeout*1000;
+ }
d_context = new zmq::context_t(1);
d_socket = new zmq::socket_t(*d_context, ZMQ_PULL);
int time = 0;
diff --git a/gr-zeromq/lib/push_sink_impl.cc b/gr-zeromq/lib/push_sink_impl.cc
index 2f7e4ce..0b74789 100644
--- a/gr-zeromq/lib/push_sink_impl.cc
+++ b/gr-zeromq/lib/push_sink_impl.cc
@@ -43,6 +43,11 @@ namespace gr {
gr::io_signature::make(0, 0, 0)),
d_itemsize(itemsize), d_vlen(vlen), d_timeout(timeout)
{
+ int major, minor, patch;
+ zmq::version (&major, &minor, &patch);
+ if (major < 3) {
+ d_timeout = timeout*1000;
+ }
d_context = new zmq::context_t(1);
d_socket = new zmq::socket_t(*d_context, ZMQ_PUSH);
int time = 0;
diff --git a/gr-zeromq/lib/rep_sink_impl.cc b/gr-zeromq/lib/rep_sink_impl.cc
index 9f73fb1..181c6ba 100644
--- a/gr-zeromq/lib/rep_sink_impl.cc
+++ b/gr-zeromq/lib/rep_sink_impl.cc
@@ -43,6 +43,11 @@ namespace gr {
gr::io_signature::make(0, 0, 0)),
d_itemsize(itemsize), d_vlen(vlen), d_timeout(timeout)
{
+ int major, minor, patch;
+ zmq::version (&major, &minor, &patch);
+ if (major < 3) {
+ d_timeout = timeout*1000;
+ }
d_context = new zmq::context_t(1);
d_socket = new zmq::socket_t(*d_context, ZMQ_REP);
int time = 0;
diff --git a/gr-zeromq/lib/req_source_impl.cc b/gr-zeromq/lib/req_source_impl.cc
index 3cbe6ed..2e40a2e 100644
--- a/gr-zeromq/lib/req_source_impl.cc
+++ b/gr-zeromq/lib/req_source_impl.cc
@@ -43,6 +43,11 @@ namespace gr {
gr::io_signature::make(1, 1, itemsize * vlen)),
d_itemsize(itemsize), d_vlen(vlen), d_timeout(timeout)
{
+ int major, minor, patch;
+ zmq::version (&major, &minor, &patch);
+ if (major < 3) {
+ d_timeout = timeout*1000;
+ }
d_context = new zmq::context_t(1);
d_socket = new zmq::socket_t(*d_context, ZMQ_REQ);
int time = 0;
- [Commit-gnuradio] [gnuradio] 24/46: zeromq: Fix doxygen and memcpy for vlen, (continued)
- [Commit-gnuradio] [gnuradio] 24/46: zeromq: Fix doxygen and memcpy for vlen, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 28/46: zeromq: removed stray debug code and cleanup, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 32/46: zeromq: Add parameters to xml, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 27/46: Merge remote-tracking branch 'iohannez/vlen' into zeromq, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 34/46: zeromq: Remove ZMQ_NOBLOCK as we are using polling, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 29/46: zeromq: cleanup QA code, still needs have ZMQ_LINGER set to zero, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 26/46: zeromq: Add qa tests, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 31/46: zeromq: Add missing timeout and blocking parameters and polling, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 25/46: zeromq: Add grc examples, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 38/46: zeromq: Don't call context close as it is not available in zmq 2, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 37/46: zeromq: Change the value of the poll timeout according to the zmq version. Must be in microseconds for version 2 and below and in milliseconds for version 3 and above.,
git <=
- [Commit-gnuradio] [gnuradio] 35/46: zeromq: Add qa code, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 36/46: zeromq: Change string of test name, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 02/46: zeromq: initial surgery to add to master build, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 46/46: Merge branch 'zeromq', git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 40/46: zeromq: Remove blocking Add timeout in xml, fix doxygen, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 39/46: Add sub_source block and fix pub_sink, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 44/46: zeromq: updates to qa code to wait for completion and pass., git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 45/46: zeromq: add missing vlen parameter in ports, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 42/46: zeromq: fixing up QA code for vlen, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 43/46: zeromq: update examples and install, git, 2014/05/16