diff -Naur "gnuradio-3.8.1.0.orig/docs/usage-manual/(exported from wiki) Message Passing.txt" "gnuradio-3.8.1.0/docs/usage-manual/(exported from wiki) Message Passing.txt"
--- "gnuradio-3.8.1.0.orig/docs/usage-manual/(exported from wiki) Message Passing.txt" 2020-04-08 20:21:10.000000000 +0300
+++ "gnuradio-3.8.1.0/docs/usage-manual/(exported from wiki) Message Passing.txt" 2020-08-06 10:51:29.412072283 +0300
@@ -94,7 +94,7 @@
Boost's 'bind' function:
set_msg_handler(pmt::pmt_t port_id,
- boost::bind(&block_class::message_handler_function, this, _1));
+ boost::bind(&block_class::message_handler_function, this, boost::placeholders::_1));
In Python:
@@ -241,15 +241,15 @@
{
message_port_register_in(pmt::mp("print"));
set_msg_handler(pmt::mp("print"),
- boost::bind(&message_debug_impl::print, this, _1));
+ boost::bind(&message_debug_impl::print, this, boost::placeholders::_1));
message_port_register_in(pmt::mp("store"));
set_msg_handler(pmt::mp("store"),
- boost::bind(&message_debug_impl::store, this, _1));
+ boost::bind(&message_debug_impl::store, this, boost::placeholders::_1));
message_port_register_in(pmt::mp("print_pdu"));
set_msg_handler(pmt::mp("print_pdu"),
- boost::bind(&message_debug_impl::print_pdu, this, _1));
+ boost::bind(&message_debug_impl::print_pdu, this, boost::placeholders::_1));
}
@@ -361,4 +361,4 @@
2o3zxqazokbseo12y27nl24a8nuw50r
-
\ Δεν υπάρχει χαρακτήρας νέας γραμμής στο τέλος του αρχείου
+
diff -Naur "gnuradio-3.8.1.0.orig/docs/usage-manual/(exported from wiki) Message Passing.txt.rej" "gnuradio-3.8.1.0/docs/usage-manual/(exported from wiki) Message Passing.txt.rej"
--- "gnuradio-3.8.1.0.orig/docs/usage-manual/(exported from wiki) Message Passing.txt.rej" 1970-01-01 02:00:00.000000000 +0200
+++ "gnuradio-3.8.1.0/docs/usage-manual/(exported from wiki) Message Passing.txt.rej" 2020-08-06 11:06:47.999118640 +0300
@@ -0,0 +1,30 @@
+--- docs/usage-manual/(exported from wiki) Message Passing.txt
++++ docs/usage-manual/(exported from wiki) Message Passing.txt
+@@ -94,7 +94,7 @@ must then bind this port to the message handler. For this, we use
+ Boost's 'bind' function:
+
+ set_msg_handler(pmt::pmt_t port_id,
+- boost::bind(&block_class::message_handler_function, this, _1));
++ boost::bind(&block_class::message_handler_function, this, boost::placeholders::_1));
+
+ In Python:
+
+@@ -241,15 +241,15 @@ The constructor of this block looks like this:
+ {
+ message_port_register_in(pmt::mp("print"));
+ set_msg_handler(pmt::mp("print"),
+- boost::bind(&message_debug_impl::print, this, _1));
++ boost::bind(&message_debug_impl::print, this, boost::placeholders::_1));
+
+ message_port_register_in(pmt::mp("store"));
+ set_msg_handler(pmt::mp("store"),
+- boost::bind(&message_debug_impl::store, this, _1));
++ boost::bind(&message_debug_impl::store, this, boost::placeholders::_1));
+
+ message_port_register_in(pmt::mp("print_pdu"));
+ set_msg_handler(pmt::mp("print_pdu"),
+- boost::bind(&message_debug_impl::print_pdu, this, _1));
++ boost::bind(&message_debug_impl::print_pdu, this, boost::placeholders::_1));
+ }
+
+
diff -Naur gnuradio-3.8.1.0.orig/gnuradio-runtime/lib/block.cc gnuradio-3.8.1.0/gnuradio-runtime/lib/block.cc
--- gnuradio-3.8.1.0.orig/gnuradio-runtime/lib/block.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gnuradio-runtime/lib/block.cc 2020-08-06 10:37:05.921604443 +0300
@@ -61,8 +61,8 @@
{
global_block_registry.register_primitive(alias(), this);
message_port_register_in(d_system_port);
- set_msg_handler(d_system_port, boost::bind(&block::system_handler, this, _1));
-
+ set_msg_handler(d_system_port,
+ boost::bind(&block::system_handler, this, boost::placeholders::_1));
configure_default_loggers(d_logger, d_debug_logger, symbol_name());
}
diff -Naur gnuradio-3.8.1.0.orig/gnuradio-runtime/lib/block.cc.orig gnuradio-3.8.1.0/gnuradio-runtime/lib/block.cc.orig
--- gnuradio-3.8.1.0.orig/gnuradio-runtime/lib/block.cc.orig 1970-01-01 02:00:00.000000000 +0200
+++ gnuradio-3.8.1.0/gnuradio-runtime/lib/block.cc.orig 2020-08-06 11:06:48.000118633 +0300
@@ -0,0 +1,903 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,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
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace gr {
+
+block::block(const std::string& name,
+ io_signature::sptr input_signature,
+ io_signature::sptr output_signature)
+ : basic_block(name, input_signature, output_signature),
+ d_output_multiple(1),
+ d_output_multiple_set(false),
+ d_unaligned(0),
+ d_is_unaligned(false),
+ d_relative_rate(1.0),
+ d_mp_relative_rate(1.0),
+ d_history(1),
+ d_attr_delay(0),
+ d_fixed_rate(false),
+ d_max_noutput_items_set(false),
+ d_max_noutput_items(0),
+ d_min_noutput_items(0),
+ d_tag_propagation_policy(TPP_ALL_TO_ALL),
+ d_priority(-1),
+ d_pc_rpc_set(false),
+ d_update_rate(false),
+ d_max_output_buffer(std::max(output_signature->max_streams(), 1), -1),
+ d_min_output_buffer(std::max(output_signature->max_streams(), 1), -1),
+ d_pmt_done(pmt::intern("done")),
+ d_system_port(pmt::intern("system"))
+{
+ global_block_registry.register_primitive(alias(), this);
+ message_port_register_in(d_system_port);
+ set_msg_handler(d_system_port,
+ boost::bind(&block::system_handler, this, boost::placeholders::_1));
+ configure_default_loggers(d_logger, d_debug_logger, symbol_name());
+}
+
+block::~block() { global_block_registry.unregister_primitive(symbol_name()); }
+
+unsigned block::history() const { return d_history; }
+
+void block::set_history(unsigned history) { d_history = history; }
+
+void block::declare_sample_delay(unsigned delay)
+{
+ d_attr_delay = delay;
+ if (d_detail) {
+ unsigned int nins = static_cast(d_detail->ninputs());
+ for (unsigned int n = 0; n < nins; n++) {
+ d_detail->input(n)->declare_sample_delay(d_attr_delay);
+ }
+ }
+}
+
+void block::declare_sample_delay(int which, unsigned delay)
+{
+ d_attr_delay = delay;
+ if (d_detail) {
+ d_detail->input(which)->declare_sample_delay(d_attr_delay);
+ }
+}
+
+unsigned block::sample_delay(int which) const { return d_attr_delay; }
+
+// stub implementation: 1:1
+
+void block::forecast(int noutput_items, gr_vector_int& ninput_items_required)
+{
+ unsigned ninputs = ninput_items_required.size();
+ for (unsigned i = 0; i < ninputs; i++)
+ ninput_items_required[i] = noutput_items + history() - 1;
+}
+
+// default implementation
+
+bool block::start() { return true; }
+
+bool block::stop() { return true; }
+
+void block::set_output_multiple(int multiple)
+{
+ if (multiple < 1)
+ throw std::invalid_argument("block::set_output_multiple");
+
+ d_output_multiple_set = true;
+ d_output_multiple = multiple;
+}
+
+void block::set_alignment(int multiple)
+{
+ if (multiple < 1)
+ throw std::invalid_argument("block::set_alignment_multiple");
+
+ d_output_multiple = multiple;
+}
+
+void block::set_unaligned(int na)
+{
+ // unaligned value must be less than 0 and it doesn't make sense
+ // that it's larger than the alignment value.
+ if ((na < 0) || (na > d_output_multiple))
+ throw std::invalid_argument("block::set_unaligned");
+
+ d_unaligned = na;
+}
+
+void block::set_is_unaligned(bool u) { d_is_unaligned = u; }
+
+void block::set_relative_rate(double relative_rate)
+{
+ if (relative_rate <= 0.0)
+ throw std::invalid_argument(
+ "block::set_relative_rate: relative rate must be > 0.0");
+
+ d_relative_rate = relative_rate;
+ d_mp_relative_rate = mpq_class(relative_rate);
+}
+
+void block::set_inverse_relative_rate(double inverse_relative_rate)
+{
+ if (inverse_relative_rate <= 0.0)
+ throw std::invalid_argument(
+ "block::set_inverse_relative_rate: inverse relative rate must be > 0.0");
+
+ mpq_class inv_rr_q(inverse_relative_rate);
+ set_relative_rate((uint64_t)inv_rr_q.get_den().get_ui(),
+ (uint64_t)inv_rr_q.get_num().get_ui());
+}
+
+void block::set_relative_rate(uint64_t interpolation, uint64_t decimation)
+{
+ mpz_class interp, decim;
+ if (interpolation < 1)
+ throw std::invalid_argument(
+ "block::set_relative_rate: interpolation rate cannot be 0");
+
+ if (decimation < 1)
+ throw std::invalid_argument(
+ "block::set_relative_rate: decimation rate cannot be 0");
+
+ mpz_import(interp.get_mpz_t(), 1, 1, sizeof(interpolation), 0, 0, &interpolation);
+ mpz_import(decim.get_mpz_t(), 1, 1, sizeof(decimation), 0, 0, &decimation);
+ d_mp_relative_rate = mpq_class(interp, decim);
+ d_mp_relative_rate.canonicalize();
+ d_relative_rate = d_mp_relative_rate.get_d();
+}
+
+void block::consume(int which_input, int how_many_items)
+{
+ d_detail->consume(which_input, how_many_items);
+}
+
+void block::consume_each(int how_many_items) { d_detail->consume_each(how_many_items); }
+
+void block::produce(int which_output, int how_many_items)
+{
+ d_detail->produce(which_output, how_many_items);
+}
+
+int block::fixed_rate_ninput_to_noutput(int ninput)
+{
+ throw std::runtime_error("Unimplemented");
+}
+
+int block::fixed_rate_noutput_to_ninput(int noutput)
+{
+ throw std::runtime_error("Unimplemented");
+}
+
+uint64_t block::nitems_read(unsigned int which_input)
+{
+ if (d_detail) {
+ return d_detail->nitems_read(which_input);
+ } else {
+ // throw std::runtime_error("No block_detail associated with block yet");
+ return 0;
+ }
+}
+
+uint64_t block::nitems_written(unsigned int which_output)
+{
+ if (d_detail) {
+ return d_detail->nitems_written(which_output);
+ } else {
+ // throw std::runtime_error("No block_detail associated with block yet");
+ return 0;
+ }
+}
+
+void block::add_item_tag(unsigned int which_output, const tag_t& tag)
+{
+ d_detail->add_item_tag(which_output, tag);
+}
+
+void block::remove_item_tag(unsigned int which_input, const tag_t& tag)
+{
+ d_detail->remove_item_tag(which_input, tag, unique_id());
+}
+
+void block::get_tags_in_range(std::vector& v,
+ unsigned int which_input,
+ uint64_t start,
+ uint64_t end)
+{
+ d_detail->get_tags_in_range(v, which_input, start, end, unique_id());
+}
+
+void block::get_tags_in_range(std::vector& v,
+ unsigned int which_input,
+ uint64_t start,
+ uint64_t end,
+ const pmt::pmt_t& key)
+{
+ d_detail->get_tags_in_range(v, which_input, start, end, key, unique_id());
+}
+
+void block::get_tags_in_window(std::vector& v,
+ unsigned int which_input,
+ uint64_t start,
+ uint64_t end)
+{
+ d_detail->get_tags_in_range(v,
+ which_input,
+ nitems_read(which_input) + start,
+ nitems_read(which_input) + end,
+ unique_id());
+}
+
+void block::get_tags_in_window(std::vector& v,
+ unsigned int which_input,
+ uint64_t start,
+ uint64_t end,
+ const pmt::pmt_t& key)
+{
+ d_detail->get_tags_in_range(v,
+ which_input,
+ nitems_read(which_input) + start,
+ nitems_read(which_input) + end,
+ key,
+ unique_id());
+}
+
+block::tag_propagation_policy_t block::tag_propagation_policy()
+{
+ return d_tag_propagation_policy;
+}
+
+void block::set_tag_propagation_policy(tag_propagation_policy_t p)
+{
+ d_tag_propagation_policy = p;
+}
+
+int block::max_noutput_items() { return d_max_noutput_items; }
+
+void block::set_max_noutput_items(int m)
+{
+ if (m <= 0)
+ throw std::runtime_error("block::set_max_noutput_items: value for "
+ "max_noutput_items must be greater than 0.\n");
+
+ d_max_noutput_items = m;
+ d_max_noutput_items_set = true;
+}
+
+void block::unset_max_noutput_items() { d_max_noutput_items_set = false; }
+
+bool block::is_set_max_noutput_items() { return d_max_noutput_items_set; }
+
+void block::set_processor_affinity(const std::vector& mask)
+{
+ d_affinity = mask;
+ if (d_detail) {
+ d_detail->set_processor_affinity(d_affinity);
+ }
+}
+
+void block::unset_processor_affinity()
+{
+ d_affinity.clear();
+ if (d_detail) {
+ d_detail->unset_processor_affinity();
+ }
+}
+
+int block::active_thread_priority()
+{
+ if (d_detail) {
+ return d_detail->thread_priority();
+ }
+ return -1;
+}
+
+int block::thread_priority() { return d_priority; }
+
+int block::set_thread_priority(int priority)
+{
+ d_priority = priority;
+ if (d_detail) {
+ return d_detail->set_thread_priority(priority);
+ }
+ return d_priority;
+}
+
+void block::expand_minmax_buffer(int port)
+{
+ if ((size_t)port >= d_max_output_buffer.size())
+ set_max_output_buffer(port, -1);
+ if ((size_t)port >= d_min_output_buffer.size())
+ set_min_output_buffer(port, -1);
+}
+
+long block::max_output_buffer(size_t i)
+{
+ if (i >= d_max_output_buffer.size())
+ throw std::invalid_argument("basic_block::max_output_buffer: port out of range.");
+ return d_max_output_buffer[i];
+}
+
+void block::set_max_output_buffer(long max_output_buffer)
+{
+ for (int i = 0; i < output_signature()->max_streams(); i++) {
+ set_max_output_buffer(i, max_output_buffer);
+ }
+}
+
+void block::set_max_output_buffer(int port, long max_output_buffer)
+{
+ if ((size_t)port >= d_max_output_buffer.size())
+ d_max_output_buffer.push_back(max_output_buffer);
+ else
+ d_max_output_buffer[port] = max_output_buffer;
+}
+
+long block::min_output_buffer(size_t i)
+{
+ if (i >= d_min_output_buffer.size())
+ throw std::invalid_argument("basic_block::min_output_buffer: port out of range.");
+ return d_min_output_buffer[i];
+}
+
+void block::set_min_output_buffer(long min_output_buffer)
+{
+ std::cout << "set_min_output_buffer on block " << unique_id() << " to "
+ << min_output_buffer << std::endl;
+ for (int i = 0; i < output_signature()->max_streams(); i++) {
+ set_min_output_buffer(i, min_output_buffer);
+ }
+}
+
+void block::set_min_output_buffer(int port, long min_output_buffer)
+{
+ if ((size_t)port >= d_min_output_buffer.size())
+ d_min_output_buffer.push_back(min_output_buffer);
+ else
+ d_min_output_buffer[port] = min_output_buffer;
+}
+
+
+bool block::update_rate() const { return d_update_rate; }
+
+void block::enable_update_rate(bool en) { d_update_rate = en; }
+
+float block::pc_noutput_items()
+{
+ if (d_detail) {
+ return d_detail->pc_noutput_items();
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_noutput_items_avg()
+{
+ if (d_detail) {
+ return d_detail->pc_noutput_items_avg();
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_noutput_items_var()
+{
+ if (d_detail) {
+ return d_detail->pc_noutput_items_var();
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_nproduced()
+{
+ if (d_detail) {
+ return d_detail->pc_nproduced();
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_nproduced_avg()
+{
+ if (d_detail) {
+ return d_detail->pc_nproduced_avg();
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_nproduced_var()
+{
+ if (d_detail) {
+ return d_detail->pc_nproduced_var();
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_input_buffers_full(int which)
+{
+ if (d_detail) {
+ return d_detail->pc_input_buffers_full(static_cast(which));
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_input_buffers_full_avg(int which)
+{
+ if (d_detail) {
+ return d_detail->pc_input_buffers_full_avg(static_cast(which));
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_input_buffers_full_var(int which)
+{
+ if (d_detail) {
+ return d_detail->pc_input_buffers_full_var(static_cast(which));
+ } else {
+ return 0;
+ }
+}
+
+std::vector block::pc_input_buffers_full()
+{
+ if (d_detail) {
+ return d_detail->pc_input_buffers_full();
+ } else {
+ return std::vector(1, 0);
+ }
+}
+
+std::vector block::pc_input_buffers_full_avg()
+{
+ if (d_detail) {
+ return d_detail->pc_input_buffers_full_avg();
+ } else {
+ return std::vector(1, 0);
+ }
+}
+
+std::vector block::pc_input_buffers_full_var()
+{
+ if (d_detail) {
+ return d_detail->pc_input_buffers_full_var();
+ } else {
+ return std::vector(1, 0);
+ }
+}
+
+float block::pc_output_buffers_full(int which)
+{
+ if (d_detail) {
+ return d_detail->pc_output_buffers_full(static_cast(which));
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_output_buffers_full_avg(int which)
+{
+ if (d_detail) {
+ return d_detail->pc_output_buffers_full_avg(static_cast(which));
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_output_buffers_full_var(int which)
+{
+ if (d_detail) {
+ return d_detail->pc_output_buffers_full_var(static_cast(which));
+ } else {
+ return 0;
+ }
+}
+
+std::vector block::pc_output_buffers_full()
+{
+ if (d_detail) {
+ return d_detail->pc_output_buffers_full();
+ } else {
+ return std::vector(1, 0);
+ }
+}
+
+std::vector block::pc_output_buffers_full_avg()
+{
+ if (d_detail) {
+ return d_detail->pc_output_buffers_full_avg();
+ } else {
+ return std::vector(1, 0);
+ }
+}
+
+std::vector block::pc_output_buffers_full_var()
+{
+ if (d_detail) {
+ return d_detail->pc_output_buffers_full_var();
+ } else {
+ return std::vector(1, 0);
+ }
+}
+
+float block::pc_work_time()
+{
+ if (d_detail) {
+ return d_detail->pc_work_time();
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_work_time_avg()
+{
+ if (d_detail) {
+ return d_detail->pc_work_time_avg();
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_work_time_var()
+{
+ if (d_detail) {
+ return d_detail->pc_work_time_var();
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_work_time_total()
+{
+ if (d_detail) {
+ return d_detail->pc_work_time_total();
+ } else {
+ return 0;
+ }
+}
+
+float block::pc_throughput_avg()
+{
+ if (d_detail) {
+ return d_detail->pc_throughput_avg();
+ } else {
+ return 0;
+ }
+}
+
+void block::reset_perf_counters()
+{
+ if (d_detail) {
+ d_detail->reset_perf_counters();
+ }
+}
+
+
+void block::system_handler(pmt::pmt_t msg)
+{
+ // std::cout << "system_handler " << msg << "\n";
+ pmt::pmt_t op = pmt::car(msg);
+ if (pmt::eqv(op, d_pmt_done)) {
+ d_finished = pmt::to_long(pmt::cdr(msg));
+ global_block_registry.notify_blk(alias());
+ } else {
+ std::cout << "WARNING: bad message op on system port!\n";
+ pmt::print(msg);
+ }
+}
+
+void block::set_log_level(std::string level) { logger_set_level(d_logger, level); }
+
+std::string block::log_level()
+{
+ std::string level;
+ logger_get_level(d_logger, level);
+ return level;
+}
+
+void block::notify_msg_neighbors()
+{
+ size_t len = pmt::length(d_message_subscribers);
+ pmt::pmt_t port_names = pmt::make_vector(len, pmt::PMT_NIL);
+ pmt::pmt_t keys = pmt::dict_keys(d_message_subscribers);
+ for (size_t i = 0; i < len; i++) {
+ // for each output port
+ pmt::pmt_t oport = pmt::nth(i, keys);
+
+ // for each subscriber on this port
+ pmt::pmt_t currlist = pmt::dict_ref(d_message_subscribers, oport, pmt::PMT_NIL);
+
+ // iterate through subscribers on port
+ while (pmt::is_pair(currlist)) {
+ pmt::pmt_t target = pmt::car(currlist);
+
+ pmt::pmt_t block = pmt::car(target);
+
+ currlist = pmt::cdr(currlist);
+ basic_block_sptr blk = global_block_registry.block_lookup(block);
+ blk->post(d_system_port, pmt::cons(d_pmt_done, pmt::mp(true)));
+ }
+ }
+}
+
+bool block::finished()
+{
+ if (detail()->ninputs() != 0)
+ return false;
+ else
+ return d_finished;
+}
+
+
+void block::setup_pc_rpc()
+{
+ d_pc_rpc_set = true;
+#if defined(GR_CTRLPORT) && defined(GR_PERFORMANCE_COUNTERS)
+#include
+ d_rpc_vars.emplace_back(
+ new rpcbasic_register_trigger(alias(),
+ "reset_perf_counters",
+ &block::reset_perf_counters,
+ "Reset the Performance Counters",
+ RPC_PRIVLVL_MIN));
+
+ d_rpc_vars.emplace_back(
+ new rpcbasic_register_get(alias(),
+ "noutput_items",
+ &block::pc_noutput_items,
+ pmt::mp(0),
+ pmt::mp(32768),
+ pmt::mp(0),
+ "",
+ "noutput items",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(
+ new rpcbasic_register_get(alias(),
+ "avg noutput_items",
+ &block::pc_noutput_items_avg,
+ pmt::mp(0),
+ pmt::mp(32768),
+ pmt::mp(0),
+ "",
+ "Average noutput items",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(
+ new rpcbasic_register_get(alias(),
+ "var noutput_items",
+ &block::pc_noutput_items_var,
+ pmt::mp(0),
+ pmt::mp(32768),
+ pmt::mp(0),
+ "",
+ "Var. noutput items",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(
+ new rpcbasic_register_get(alias(),
+ "nproduced",
+ &block::pc_nproduced,
+ pmt::mp(0),
+ pmt::mp(32768),
+ pmt::mp(0),
+ "",
+ "items produced",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(
+ new rpcbasic_register_get(alias(),
+ "avg nproduced",
+ &block::pc_nproduced_avg,
+ pmt::mp(0),
+ pmt::mp(32768),
+ pmt::mp(0),
+ "",
+ "Average items produced",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(
+ new rpcbasic_register_get(alias(),
+ "var nproduced",
+ &block::pc_nproduced_var,
+ pmt::mp(0),
+ pmt::mp(32768),
+ pmt::mp(0),
+ "",
+ "Var. items produced",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(
+ new rpcbasic_register_get(alias(),
+ "work time",
+ &block::pc_work_time,
+ pmt::mp(0),
+ pmt::mp(1e9),
+ pmt::mp(0),
+ "",
+ "clock cycles in call to work",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(
+ new rpcbasic_register_get(alias(),
+ "avg work time",
+ &block::pc_work_time_avg,
+ pmt::mp(0),
+ pmt::mp(1e9),
+ pmt::mp(0),
+ "",
+ "Average clock cycles in call to work",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(
+ new rpcbasic_register_get(alias(),
+ "var work time",
+ &block::pc_work_time_var,
+ pmt::mp(0),
+ pmt::mp(1e9),
+ pmt::mp(0),
+ "",
+ "Var. clock cycles in call to work",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(
+ new rpcbasic_register_get(alias(),
+ "total work time",
+ &block::pc_work_time_total,
+ pmt::mp(0),
+ pmt::mp(1e9),
+ pmt::mp(0),
+ "",
+ "Total clock cycles in calls to work",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(new rpcbasic_register_get(
+ alias(),
+ "avg throughput",
+ &block::pc_throughput_avg,
+ pmt::mp(0),
+ pmt::mp(1e9),
+ pmt::mp(0),
+ "items/s",
+ "Average items throughput in call to work",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(new rpcbasic_register_get>(
+ alias(),
+ "input \% full",
+ &block::pc_input_buffers_full,
+ pmt::make_f32vector(0, 0),
+ pmt::make_f32vector(0, 1),
+ pmt::make_f32vector(0, 0),
+ "",
+ "how full input buffers are",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(new rpcbasic_register_get>(
+ alias(),
+ "avg input \% full",
+ &block::pc_input_buffers_full_avg,
+ pmt::make_f32vector(0, 0),
+ pmt::make_f32vector(0, 1),
+ pmt::make_f32vector(0, 0),
+ "",
+ "Average of how full input buffers are",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(new rpcbasic_register_get>(
+ alias(),
+ "var input \% full",
+ &block::pc_input_buffers_full_var,
+ pmt::make_f32vector(0, 0),
+ pmt::make_f32vector(0, 1),
+ pmt::make_f32vector(0, 0),
+ "",
+ "Var. of how full input buffers are",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(new rpcbasic_register_get>(
+ alias(),
+ "output \% full",
+ &block::pc_output_buffers_full,
+ pmt::make_f32vector(0, 0),
+ pmt::make_f32vector(0, 1),
+ pmt::make_f32vector(0, 0),
+ "",
+ "how full output buffers are",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(new rpcbasic_register_get>(
+ alias(),
+ "avg output \% full",
+ &block::pc_output_buffers_full_avg,
+ pmt::make_f32vector(0, 0),
+ pmt::make_f32vector(0, 1),
+ pmt::make_f32vector(0, 0),
+ "",
+ "Average of how full output buffers are",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+
+ d_rpc_vars.emplace_back(new rpcbasic_register_get>(
+ alias(),
+ "var output \% full",
+ &block::pc_output_buffers_full_var,
+ pmt::make_f32vector(0, 0),
+ pmt::make_f32vector(0, 1),
+ pmt::make_f32vector(0, 0),
+ "",
+ "Var. of how full output buffers are",
+ RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP));
+#endif /* defined(GR_CTRLPORT) && defined(GR_PERFORMANCE_COUNTERS) */
+}
+
+std::string block::identifier() const
+{
+ return d_name + "(" + std::to_string(d_unique_id) + ")";
+}
+
+std::ostream& operator<<(std::ostream& os, const block* m)
+{
+ os << "identifier() << ">";
+ return os;
+}
+
+int block::general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star& input_items,
+ gr_vector_void_star& output_items)
+{
+ throw std::runtime_error("block::general_work() not implemented");
+ return 0;
+}
+
+} /* namespace gr */
diff -Naur gnuradio-3.8.1.0.orig/gnuradio-runtime/lib/block.cc.rej gnuradio-3.8.1.0/gnuradio-runtime/lib/block.cc.rej
--- gnuradio-3.8.1.0.orig/gnuradio-runtime/lib/block.cc.rej 1970-01-01 02:00:00.000000000 +0200
+++ gnuradio-3.8.1.0/gnuradio-runtime/lib/block.cc.rej 2020-08-06 11:06:48.000118633 +0300
@@ -0,0 +1,12 @@
+--- gnuradio-runtime/lib/block.cc
++++ gnuradio-runtime/lib/block.cc
+@@ -61,7 +61,8 @@ block::block(const std::string& name,
+ {
+ global_block_registry.register_primitive(alias(), this);
+ message_port_register_in(d_system_port);
+- set_msg_handler(d_system_port, boost::bind(&block::system_handler, this, _1));
++ set_msg_handler(d_system_port,
++ boost::bind(&block::system_handler, this, boost::placeholders::_1));
+
+ configure_default_loggers(d_logger, d_debug_logger, symbol_name());
+ }
diff -Naur gnuradio-3.8.1.0.orig/gr-analog/lib/sig_source_impl.cc gnuradio-3.8.1.0/gr-analog/lib/sig_source_impl.cc
--- gnuradio-3.8.1.0.orig/gr-analog/lib/sig_source_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-analog/lib/sig_source_impl.cc 2020-08-06 10:38:14.803164544 +0300
@@ -67,7 +67,9 @@
this->set_phase(phase);
this->message_port_register_in(pmt::mp("freq"));
this->set_msg_handler(pmt::mp("freq"),
- boost::bind(&sig_source_impl::set_frequency_msg, this, _1));
+ boost::bind(&sig_source_impl::set_frequency_msg,
+ this,
+ boost::placeholders::_1));
}
template
diff -Naur gnuradio-3.8.1.0.orig/gr-analog/lib/sig_source_impl.cc.rej gnuradio-3.8.1.0/gr-analog/lib/sig_source_impl.cc.rej
--- gnuradio-3.8.1.0.orig/gr-analog/lib/sig_source_impl.cc.rej 1970-01-01 02:00:00.000000000 +0200
+++ gnuradio-3.8.1.0/gr-analog/lib/sig_source_impl.cc.rej 2020-08-06 11:06:58.186052310 +0300
@@ -0,0 +1,13 @@
+--- gr-analog/lib/sig_source_impl.cc
++++ gr-analog/lib/sig_source_impl.cc
+@@ -67,7 +67,9 @@ sig_source_impl::sig_source_impl(double sampling_freq,
+ this->set_phase(phase);
+ this->message_port_register_in(pmt::mp("freq"));
+ this->set_msg_handler(pmt::mp("freq"),
+- boost::bind(&sig_source_impl::set_frequency_msg, this, _1));
++ boost::bind(&sig_source_impl::set_frequency_msg,
++ this,
++ boost::placeholders::_1));
+ }
+
+ template
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/copy_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/copy_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/copy_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/copy_impl.cc 2020-08-06 10:39:30.271682284 +0300
@@ -44,7 +44,9 @@
d_enabled(true)
{
message_port_register_in(pmt::mp("en"));
- set_msg_handler(pmt::mp("en"), boost::bind(©_impl::handle_enable, this, _1));
+ set_msg_handler(
+ pmt::mp("en"),
+ boost::bind(©_impl::handle_enable, this, boost::placeholders::_1));
}
copy_impl::~copy_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/copy_impl.cc.orig gnuradio-3.8.1.0/gr-blocks/lib/copy_impl.cc.orig
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/copy_impl.cc.orig 1970-01-01 02:00:00.000000000 +0200
+++ gnuradio-3.8.1.0/gr-blocks/lib/copy_impl.cc.orig 2020-08-06 11:06:58.186052310 +0300
@@ -0,0 +1,102 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009,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 "copy_impl.h"
+#include
+#include
+
+namespace gr {
+namespace blocks {
+
+copy::sptr copy::make(size_t itemsize)
+{
+ return gnuradio::get_initial_sptr(new copy_impl(itemsize));
+}
+
+copy_impl::copy_impl(size_t itemsize)
+ : block("copy",
+ io_signature::make(1, -1, itemsize),
+ io_signature::make(1, -1, itemsize)),
+ d_itemsize(itemsize),
+ d_enabled(true)
+{
+ message_port_register_in(pmt::mp("en"));
+ set_msg_handler(
+ pmt::mp("en"),
+ boost::bind(©_impl::handle_enable, this, boost::placeholders::_1));
+}
+
+copy_impl::~copy_impl() {}
+
+void copy_impl::handle_enable(pmt::pmt_t msg)
+{
+ if (pmt::is_bool(msg)) {
+ bool en = pmt::to_bool(msg);
+ d_enabled = en;
+ }
+}
+
+void copy_impl::forecast(int noutput_items, gr_vector_int& ninput_items_required)
+{
+ unsigned ninputs = ninput_items_required.size();
+ for (unsigned i = 0; i < ninputs; i++)
+ ninput_items_required[i] = noutput_items;
+}
+
+bool copy_impl::check_topology(int ninputs, int noutputs) { return ninputs == noutputs; }
+
+int copy_impl::general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star& input_items,
+ gr_vector_void_star& output_items)
+{
+ const uint8_t** in = (const uint8_t**)&input_items[0];
+ uint8_t** out = (uint8_t**)&output_items[0];
+
+ int n = 0;
+ if (d_enabled) {
+ int ninputs = input_items.size();
+ for (int i = 0; i < ninputs; i++) {
+ memcpy(out[i], in[i], noutput_items * d_itemsize);
+ }
+ n = noutput_items;
+ }
+
+ consume_each(noutput_items);
+ return n;
+}
+
+
+void copy_impl::setup_rpc()
+{
+#ifdef GR_CTRLPORT
+ add_rpc_variable(rpcbasic_sptr(new rpcbasic_register_handler(
+ alias(), "en", "", "Enable", RPC_PRIVLVL_MIN, DISPNULL)));
+#endif /* GR_CTRLPORT */
+}
+
+} /* namespace blocks */
+} /* namespace gr */
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/copy_impl.cc.rej gnuradio-3.8.1.0/gr-blocks/lib/copy_impl.cc.rej
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/copy_impl.cc.rej 1970-01-01 02:00:00.000000000 +0200
+++ gnuradio-3.8.1.0/gr-blocks/lib/copy_impl.cc.rej 2020-08-06 11:06:58.186052310 +0300
@@ -0,0 +1,13 @@
+--- gr-blocks/lib/copy_impl.cc
++++ gr-blocks/lib/copy_impl.cc
+@@ -44,7 +44,9 @@ copy_impl::copy_impl(size_t itemsize)
+ d_enabled(true)
+ {
+ message_port_register_in(pmt::mp("en"));
+- set_msg_handler(pmt::mp("en"), boost::bind(©_impl::handle_enable, this, _1));
++ set_msg_handler(
++ pmt::mp("en"),
++ boost::bind(©_impl::handle_enable, this, boost::placeholders::_1));
+ }
+
+ copy_impl::~copy_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/message_debug_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/message_debug_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/message_debug_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/message_debug_impl.cc 2020-08-06 10:41:09.441048102 +0300
@@ -90,14 +90,19 @@
: block("message_debug", io_signature::make(0, 0, 0), io_signature::make(0, 0, 0))
{
message_port_register_in(pmt::mp("print"));
- set_msg_handler(pmt::mp("print"), boost::bind(&message_debug_impl::print, this, _1));
+ set_msg_handler(
+ pmt::mp("print"),
+ boost::bind(&message_debug_impl::print, this, boost::placeholders::_1));
message_port_register_in(pmt::mp("store"));
- set_msg_handler(pmt::mp("store"), boost::bind(&message_debug_impl::store, this, _1));
+ set_msg_handler(
+ pmt::mp("store"),
+ boost::bind(&message_debug_impl::store, this, boost::placeholders::_1));
message_port_register_in(pmt::mp("print_pdu"));
- set_msg_handler(pmt::mp("print_pdu"),
- boost::bind(&message_debug_impl::print_pdu, this, _1));
+ set_msg_handler(
+ pmt::mp("print_pdu"),
+ boost::bind(&message_debug_impl::print_pdu, this, boost::placeholders::_1));
}
message_debug_impl::~message_debug_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/message_debug_impl.cc.rej gnuradio-3.8.1.0/gr-blocks/lib/message_debug_impl.cc.rej
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/message_debug_impl.cc.rej 1970-01-01 02:00:00.000000000 +0200
+++ gnuradio-3.8.1.0/gr-blocks/lib/message_debug_impl.cc.rej 2020-08-06 11:07:04.253012805 +0300
@@ -0,0 +1,26 @@
+--- gr-blocks/lib/message_debug_impl.cc
++++ gr-blocks/lib/message_debug_impl.cc
+@@ -90,14 +90,19 @@ message_debug_impl::message_debug_impl()
+ : block("message_debug", io_signature::make(0, 0, 0), io_signature::make(0, 0, 0))
+ {
+ message_port_register_in(pmt::mp("print"));
+- set_msg_handler(pmt::mp("print"), boost::bind(&message_debug_impl::print, this, _1));
++ set_msg_handler(
++ pmt::mp("print"),
++ boost::bind(&message_debug_impl::print, this, boost::placeholders::_1));
+
+ message_port_register_in(pmt::mp("store"));
+- set_msg_handler(pmt::mp("store"), boost::bind(&message_debug_impl::store, this, _1));
++ set_msg_handler(
++ pmt::mp("store"),
++ boost::bind(&message_debug_impl::store, this, boost::placeholders::_1));
+
+ message_port_register_in(pmt::mp("print_pdu"));
+- set_msg_handler(pmt::mp("print_pdu"),
+- boost::bind(&message_debug_impl::print_pdu, this, _1));
++ set_msg_handler(
++ pmt::mp("print_pdu"),
++ boost::bind(&message_debug_impl::print_pdu, this, boost::placeholders::_1));
+ }
+
+ message_debug_impl::~message_debug_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/message_strobe_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/message_strobe_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/message_strobe_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/message_strobe_impl.cc 2020-08-06 10:41:57.594739978 +0300
@@ -53,8 +53,9 @@
message_port_register_out(d_port);
message_port_register_in(pmt::mp("set_msg"));
- set_msg_handler(pmt::mp("set_msg"),
- boost::bind(&message_strobe_impl::set_msg, this, _1));
+ set_msg_handler(
+ pmt::mp("set_msg"),
+ boost::bind(&message_strobe_impl::set_msg, this, boost::placeholders::_1));
}
message_strobe_impl::~message_strobe_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/message_strobe_impl.cc.rej gnuradio-3.8.1.0/gr-blocks/lib/message_strobe_impl.cc.rej
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/message_strobe_impl.cc.rej 1970-01-01 02:00:00.000000000 +0200
+++ gnuradio-3.8.1.0/gr-blocks/lib/message_strobe_impl.cc.rej 2020-08-06 11:07:05.895002113 +0300
@@ -0,0 +1,14 @@
+--- gr-blocks/lib/message_strobe_impl.cc
++++ gr-blocks/lib/message_strobe_impl.cc
+@@ -53,8 +53,9 @@ message_strobe_impl::message_strobe_impl(pmt::pmt_t msg, long period_ms)
+ message_port_register_out(d_port);
+
+ message_port_register_in(pmt::mp("set_msg"));
+- set_msg_handler(pmt::mp("set_msg"),
+- boost::bind(&message_strobe_impl::set_msg, this, _1));
++ set_msg_handler(
++ pmt::mp("set_msg"),
++ boost::bind(&message_strobe_impl::set_msg, this, boost::placeholders::_1));
+ }
+
+ message_strobe_impl::~message_strobe_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/message_strobe_random_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/message_strobe_random_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/message_strobe_random_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/message_strobe_random_impl.cc 2020-08-06 10:42:50.717399917 +0300
@@ -74,8 +74,9 @@
new gr::thread::thread(boost::bind(&message_strobe_random_impl::run, this)));
message_port_register_in(pmt::mp("set_msg"));
- set_msg_handler(pmt::mp("set_msg"),
- boost::bind(&message_strobe_random_impl::set_msg, this, _1));
+ set_msg_handler(
+ pmt::mp("set_msg"),
+ boost::bind(&message_strobe_random_impl::set_msg, this, boost::placeholders::_1));
}
long message_strobe_random_impl::next_delay()
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/message_strobe_random_impl.cc.rej gnuradio-3.8.1.0/gr-blocks/lib/message_strobe_random_impl.cc.rej
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/message_strobe_random_impl.cc.rej 1970-01-01 02:00:00.000000000 +0200
+++ gnuradio-3.8.1.0/gr-blocks/lib/message_strobe_random_impl.cc.rej 2020-08-06 11:07:08.714983751 +0300
@@ -0,0 +1,14 @@
+--- gr-blocks/lib/message_strobe_random_impl.cc
++++ gr-blocks/lib/message_strobe_random_impl.cc
+@@ -74,8 +74,9 @@ message_strobe_random_impl::message_strobe_random_impl(
+ new gr::thread::thread(boost::bind(&message_strobe_random_impl::run, this)));
+
+ message_port_register_in(pmt::mp("set_msg"));
+- set_msg_handler(pmt::mp("set_msg"),
+- boost::bind(&message_strobe_random_impl::set_msg, this, _1));
++ set_msg_handler(
++ pmt::mp("set_msg"),
++ boost::bind(&message_strobe_random_impl::set_msg, this, boost::placeholders::_1));
+ }
+
+ long message_strobe_random_impl::next_delay()
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/multiply_matrix_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/multiply_matrix_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/multiply_matrix_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/multiply_matrix_impl.cc 2020-08-06 11:07:08.715983744 +0300
@@ -235,9 +235,10 @@
pmt::pmt_t port_name = pmt::string_to_symbol("set_A");
message_port_register_in(port_name);
- set_msg_handler(
- port_name,
- boost::bind(&multiply_matrix_impl::msg_handler_A, this, _1));
+ set_msg_handler(port_name,
+ boost::bind(&multiply_matrix_impl::msg_handler_A,
+ this,
+ boost::placeholders::_1));
}
template <>
@@ -257,7 +258,9 @@
pmt::pmt_t port_name = pmt::string_to_symbol("set_A");
message_port_register_in(port_name);
set_msg_handler(port_name,
- boost::bind(&multiply_matrix_impl::msg_handler_A, this, _1));
+ boost::bind(&multiply_matrix_impl::msg_handler_A,
+ this,
+ boost::placeholders::_1));
}
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/mute_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/mute_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/mute_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/mute_impl.cc 2020-08-06 11:07:08.715983744 +0300
@@ -47,8 +47,9 @@
d_mute(mute)
{
this->message_port_register_in(pmt::intern("set_mute"));
- this->set_msg_handler(pmt::intern("set_mute"),
- boost::bind(&mute_impl::set_mute_pmt, this, _1));
+ this->set_msg_handler(
+ pmt::intern("set_mute"),
+ boost::bind(&mute_impl::set_mute_pmt, this, boost::placeholders::_1));
}
template
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/nop_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/nop_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/nop_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/nop_impl.cc 2020-08-06 11:07:08.715983744 +0300
@@ -44,8 +44,9 @@
{
// Arrange to have count_received_msgs called when messages are received.
message_port_register_in(pmt::mp("port"));
- set_msg_handler(pmt::mp("port"),
- boost::bind(&nop_impl::count_received_msgs, this, _1));
+ set_msg_handler(
+ pmt::mp("port"),
+ boost::bind(&nop_impl::count_received_msgs, this, boost::placeholders::_1));
}
nop_impl::~nop_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/pdu_filter_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/pdu_filter_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/pdu_filter_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/pdu_filter_impl.cc 2020-08-06 11:07:08.716983738 +0300
@@ -44,8 +44,9 @@
{
message_port_register_out(pdu::pdu_port_id());
message_port_register_in(pdu::pdu_port_id());
- set_msg_handler(pdu::pdu_port_id(),
- boost::bind(&pdu_filter_impl::handle_msg, this, _1));
+ set_msg_handler(
+ pdu::pdu_port_id(),
+ boost::bind(&pdu_filter_impl::handle_msg, this, boost::placeholders::_1));
}
void pdu_filter_impl::handle_msg(pmt::pmt_t pdu)
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/pdu_remove_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/pdu_remove_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/pdu_remove_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/pdu_remove_impl.cc 2020-08-06 11:07:08.716983738 +0300
@@ -42,8 +42,9 @@
{
message_port_register_out(pdu::pdu_port_id());
message_port_register_in(pdu::pdu_port_id());
- set_msg_handler(pdu::pdu_port_id(),
- boost::bind(&pdu_remove_impl::handle_msg, this, _1));
+ set_msg_handler(
+ pdu::pdu_port_id(),
+ boost::bind(&pdu_remove_impl::handle_msg, this, boost::placeholders::_1));
}
void pdu_remove_impl::handle_msg(pmt::pmt_t pdu)
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/pdu_set_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/pdu_set_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/pdu_set_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/pdu_set_impl.cc 2020-08-06 11:07:08.717983731 +0300
@@ -43,7 +43,9 @@
{
message_port_register_out(pdu::pdu_port_id());
message_port_register_in(pdu::pdu_port_id());
- set_msg_handler(pdu::pdu_port_id(), boost::bind(&pdu_set_impl::handle_msg, this, _1));
+ set_msg_handler(
+ pdu::pdu_port_id(),
+ boost::bind(&pdu_set_impl::handle_msg, this, boost::placeholders::_1));
}
void pdu_set_impl::handle_msg(pmt::pmt_t pdu)
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/random_pdu_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/random_pdu_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/random_pdu_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/random_pdu_impl.cc 2020-08-06 11:07:08.717983731 +0300
@@ -52,8 +52,9 @@
{
message_port_register_out(pdu::pdu_port_id());
message_port_register_in(pmt::mp("generate"));
- set_msg_handler(pmt::mp("generate"),
- boost::bind(&random_pdu_impl::generate_pdu, this, _1));
+ set_msg_handler(
+ pmt::mp("generate"),
+ boost::bind(&random_pdu_impl::generate_pdu, this, boost::placeholders::_1));
if (length_modulo < 1)
throw std::runtime_error("length_module must be >= 1");
if (max_items < length_modulo)
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/repeat_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/repeat_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/repeat_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/repeat_impl.cc 2020-08-06 11:07:08.717983731 +0300
@@ -44,8 +44,9 @@
d_interp(interp)
{
message_port_register_in(pmt::mp("interpolation"));
- set_msg_handler(pmt::mp("interpolation"),
- boost::bind(&repeat_impl::msg_set_interpolation, this, _1));
+ set_msg_handler(
+ pmt::mp("interpolation"),
+ boost::bind(&repeat_impl::msg_set_interpolation, this, boost::placeholders::_1));
}
void repeat_impl::msg_set_interpolation(pmt::pmt_t msg)
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/socket_pdu_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/socket_pdu_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/socket_pdu_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/socket_pdu_impl.cc 2020-08-06 11:07:08.717983731 +0300
@@ -101,7 +101,9 @@
start_tcp_accept();
set_msg_handler(pdu::pdu_port_id(),
- boost::bind(&socket_pdu_impl::tcp_server_send, this, _1));
+ boost::bind(&socket_pdu_impl::tcp_server_send,
+ this,
+ boost::placeholders::_1));
} else if (type == "TCP_CLIENT") {
boost::system::error_code error = boost::asio::error::host_not_found;
d_tcp_socket.reset(new boost::asio::ip::tcp::socket(d_io_service));
@@ -111,7 +113,9 @@
d_tcp_socket->set_option(boost::asio::ip::tcp::no_delay(d_tcp_no_delay));
set_msg_handler(pdu::pdu_port_id(),
- boost::bind(&socket_pdu_impl::tcp_client_send, this, _1));
+ boost::bind(&socket_pdu_impl::tcp_client_send,
+ this,
+ boost::placeholders::_1));
d_tcp_socket->async_read_some(
boost::asio::buffer(d_rxbuf),
@@ -130,8 +134,9 @@
boost::asio::placeholders::error,
boost::asio::placeholders::bytes_transferred));
- set_msg_handler(pdu::pdu_port_id(),
- boost::bind(&socket_pdu_impl::udp_send, this, _1));
+ set_msg_handler(
+ pdu::pdu_port_id(),
+ boost::bind(&socket_pdu_impl::udp_send, this, boost::placeholders::_1));
} else if (type == "UDP_CLIENT") {
d_udp_socket.reset(
new boost::asio::ip::udp::socket(d_io_service, d_udp_endpoint));
@@ -143,8 +148,9 @@
boost::asio::placeholders::error,
boost::asio::placeholders::bytes_transferred));
- set_msg_handler(pdu::pdu_port_id(),
- boost::bind(&socket_pdu_impl::udp_send, this, _1));
+ set_msg_handler(
+ pdu::pdu_port_id(),
+ boost::bind(&socket_pdu_impl::udp_send, this, boost::placeholders::_1));
} else
throw std::runtime_error("gr::blocks:socket_pdu: unknown socket type");
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/tagged_stream_multiply_length_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/tagged_stream_multiply_length_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/tagged_stream_multiply_length_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/tagged_stream_multiply_length_impl.cc 2020-08-06 11:07:08.717983731 +0300
@@ -49,9 +49,10 @@
set_tag_propagation_policy(TPP_DONT);
set_relative_rate(1, 1);
message_port_register_in(pmt::intern("set_scalar"));
- set_msg_handler(
- pmt::intern("set_scalar"),
- boost::bind(&tagged_stream_multiply_length_impl::set_scalar_pmt, this, _1));
+ set_msg_handler(pmt::intern("set_scalar"),
+ boost::bind(&tagged_stream_multiply_length_impl::set_scalar_pmt,
+ this,
+ boost::placeholders::_1));
}
tagged_stream_multiply_length_impl::~tagged_stream_multiply_length_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-blocks/lib/tuntap_pdu_impl.cc gnuradio-3.8.1.0/gr-blocks/lib/tuntap_pdu_impl.cc
--- gnuradio-3.8.1.0.orig/gr-blocks/lib/tuntap_pdu_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-blocks/lib/tuntap_pdu_impl.cc 2020-08-06 11:07:08.718983725 +0300
@@ -96,7 +96,8 @@
// set up input message port
message_port_register_in(pdu::pdu_port_id());
- set_msg_handler(pdu::pdu_port_id(), boost::bind(&tuntap_pdu_impl::send, this, _1));
+ set_msg_handler(pdu::pdu_port_id(),
+ boost::bind(&tuntap_pdu_impl::send, this, boost::placeholders::_1));
}
int tuntap_pdu_impl::tun_alloc(char* dev, int flags)
diff -Naur gnuradio-3.8.1.0.orig/gr-digital/lib/chunks_to_symbols_impl.cc gnuradio-3.8.1.0/gr-digital/lib/chunks_to_symbols_impl.cc
--- gnuradio-3.8.1.0.orig/gr-digital/lib/chunks_to_symbols_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-digital/lib/chunks_to_symbols_impl.cc 2020-08-06 11:07:08.718983725 +0300
@@ -53,8 +53,9 @@
this->message_port_register_in(pmt::mp("set_symbol_table"));
this->set_msg_handler(
pmt::mp("set_symbol_table"),
- boost::bind(
- &chunks_to_symbols_impl::handle_set_symbol_table, this, _1));
+ boost::bind(&chunks_to_symbols_impl::handle_set_symbol_table,
+ this,
+ boost::placeholders::_1));
}
template
diff -Naur gnuradio-3.8.1.0.orig/gr-digital/lib/constellation_receiver_cb_impl.cc gnuradio-3.8.1.0/gr-digital/lib/constellation_receiver_cb_impl.cc
--- gnuradio-3.8.1.0.orig/gr-digital/lib/constellation_receiver_cb_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-digital/lib/constellation_receiver_cb_impl.cc 2020-08-06 11:07:08.718983725 +0300
@@ -61,14 +61,16 @@
"This receiver only works with constellations of dimension 1.");
message_port_register_in(pmt::mp("set_constellation"));
- set_msg_handler(
- pmt::mp("set_constellation"),
- boost::bind(&constellation_receiver_cb_impl::handle_set_constellation, this, _1));
+ set_msg_handler(pmt::mp("set_constellation"),
+ boost::bind(&constellation_receiver_cb_impl::handle_set_constellation,
+ this,
+ boost::placeholders::_1));
message_port_register_in(pmt::mp("rotate_phase"));
- set_msg_handler(
- pmt::mp("rotate_phase"),
- boost::bind(&constellation_receiver_cb_impl::handle_rotate_phase, this, _1));
+ set_msg_handler(pmt::mp("rotate_phase"),
+ boost::bind(&constellation_receiver_cb_impl::handle_rotate_phase,
+ this,
+ boost::placeholders::_1));
}
constellation_receiver_cb_impl::~constellation_receiver_cb_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-digital/lib/costas_loop_cc_impl.cc gnuradio-3.8.1.0/gr-digital/lib/costas_loop_cc_impl.cc
--- gnuradio-3.8.1.0.orig/gr-digital/lib/costas_loop_cc_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-digital/lib/costas_loop_cc_impl.cc 2020-08-06 11:07:08.719983718 +0300
@@ -82,7 +82,9 @@
message_port_register_in(pmt::mp("noise"));
set_msg_handler(pmt::mp("noise"),
- boost::bind(&costas_loop_cc_impl::handle_set_noise, this, _1));
+ boost::bind(&costas_loop_cc_impl::handle_set_noise,
+ this,
+ boost::placeholders::_1));
}
costas_loop_cc_impl::~costas_loop_cc_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-digital/lib/crc32_async_bb_impl.cc gnuradio-3.8.1.0/gr-digital/lib/crc32_async_bb_impl.cc
--- gnuradio-3.8.1.0.orig/gr-digital/lib/crc32_async_bb_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-digital/lib/crc32_async_bb_impl.cc 2020-08-06 11:07:08.719983718 +0300
@@ -48,9 +48,13 @@
message_port_register_out(d_out_port);
if (check)
- set_msg_handler(d_in_port, boost::bind(&crc32_async_bb_impl::check, this, _1));
+ set_msg_handler(
+ d_in_port,
+ boost::bind(&crc32_async_bb_impl::check, this, boost::placeholders::_1));
else
- set_msg_handler(d_in_port, boost::bind(&crc32_async_bb_impl::calc, this, _1));
+ set_msg_handler(
+ d_in_port,
+ boost::bind(&crc32_async_bb_impl::calc, this, boost::placeholders::_1));
}
crc32_async_bb_impl::~crc32_async_bb_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-digital/lib/header_payload_demux_impl.cc gnuradio-3.8.1.0/gr-digital/lib/header_payload_demux_impl.cc
--- gnuradio-3.8.1.0.orig/gr-digital/lib/header_payload_demux_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-digital/lib/header_payload_demux_impl.cc 2020-08-06 11:07:08.719983718 +0300
@@ -150,9 +150,10 @@
}
set_tag_propagation_policy(TPP_DONT);
message_port_register_in(msg_port_id());
- set_msg_handler(
- msg_port_id(),
- boost::bind(&header_payload_demux_impl::parse_header_data_msg, this, _1));
+ set_msg_handler(msg_port_id(),
+ boost::bind(&header_payload_demux_impl::parse_header_data_msg,
+ this,
+ boost::placeholders::_1));
for (size_t i = 0; i < special_tags.size(); i++) {
d_special_tags.push_back(pmt::string_to_symbol(special_tags[i]));
d_special_tags_last_value.push_back(pmt::PMT_NIL);
diff -Naur gnuradio-3.8.1.0.orig/gr-digital/lib/protocol_formatter_async_impl.cc gnuradio-3.8.1.0/gr-digital/lib/protocol_formatter_async_impl.cc
--- gnuradio-3.8.1.0.orig/gr-digital/lib/protocol_formatter_async_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-digital/lib/protocol_formatter_async_impl.cc 2020-08-06 11:07:08.720983712 +0300
@@ -55,7 +55,9 @@
message_port_register_out(d_pld_port);
set_msg_handler(d_in_port,
- boost::bind(&protocol_formatter_async_impl::append, this, _1));
+ boost::bind(&protocol_formatter_async_impl::append,
+ this,
+ boost::placeholders::_1));
}
protocol_formatter_async_impl::~protocol_formatter_async_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-fec/lib/async_decoder_impl.cc gnuradio-3.8.1.0/gr-fec/lib/async_decoder_impl.cc
--- gnuradio-3.8.1.0.orig/gr-fec/lib/async_decoder_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-fec/lib/async_decoder_impl.cc 2020-08-06 11:07:08.720983712 +0300
@@ -65,10 +65,14 @@
if (d_packed) {
d_pack = new blocks::kernel::pack_k_bits(8);
set_msg_handler(d_in_port,
- boost::bind(&async_decoder_impl::decode_packed, this, _1));
+ boost::bind(&async_decoder_impl::decode_packed,
+ this,
+ boost::placeholders::_1));
} else {
set_msg_handler(d_in_port,
- boost::bind(&async_decoder_impl::decode_unpacked, this, _1));
+ boost::bind(&async_decoder_impl::decode_unpacked,
+ this,
+ boost::placeholders::_1));
}
// The maximum frame size is set by the initial frame size of the decoder.
diff -Naur gnuradio-3.8.1.0.orig/gr-fec/lib/async_encoder_impl.cc gnuradio-3.8.1.0/gr-fec/lib/async_encoder_impl.cc
--- gnuradio-3.8.1.0.orig/gr-fec/lib/async_encoder_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-fec/lib/async_encoder_impl.cc 2020-08-06 11:07:08.720983712 +0300
@@ -64,7 +64,9 @@
if (d_packed) {
set_msg_handler(d_in_port,
- boost::bind(&async_encoder_impl::encode_packed, this, _1));
+ boost::bind(&async_encoder_impl::encode_packed,
+ this,
+ boost::placeholders::_1));
d_unpack = new blocks::kernel::unpack_k_bits(8);
@@ -74,7 +76,9 @@
} else {
set_msg_handler(d_in_port,
- boost::bind(&async_encoder_impl::encode_unpacked, this, _1));
+ boost::bind(&async_encoder_impl::encode_unpacked,
+ this,
+ boost::placeholders::_1));
}
if (d_packed || (strncmp(d_encoder->get_input_conversion(), "pack", 4) == 0)) {
diff -Naur gnuradio-3.8.1.0.orig/gr-fec/lib/depuncture_bb_impl.cc gnuradio-3.8.1.0/gr-fec/lib/depuncture_bb_impl.cc
--- gnuradio-3.8.1.0.orig/gr-fec/lib/depuncture_bb_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-fec/lib/depuncture_bb_impl.cc 2020-08-06 11:07:08.720983712 +0300
@@ -74,7 +74,9 @@
set_fixed_rate(true);
set_relative_rate((uint64_t)d_puncsize, (uint64_t)(d_puncsize - d_puncholes));
set_output_multiple(d_puncsize);
- // set_msg_handler(boost::bind(&depuncture_bb_impl::catch_msg, this, _1));
+ // set_msg_handler(boost::bind(&depuncture_bb_impl::catch_msg,
+ // this,
+ // boost::placeholders::_1));
}
depuncture_bb_impl::~depuncture_bb_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-fec/lib/puncture_bb_impl.cc gnuradio-3.8.1.0/gr-fec/lib/puncture_bb_impl.cc
--- gnuradio-3.8.1.0.orig/gr-fec/lib/puncture_bb_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-fec/lib/puncture_bb_impl.cc 2020-08-06 11:07:08.721983705 +0300
@@ -72,7 +72,9 @@
set_fixed_rate(true);
set_relative_rate((uint64_t)(d_puncsize - d_puncholes), (uint64_t)d_puncsize);
set_output_multiple(d_puncsize - d_puncholes);
- // set_msg_handler(boost::bind(&puncture_bb_impl::catch_msg, this, _1));
+ // set_msg_handler(boost::bind(&puncture_bb_impl::catch_msg,
+ // this,
+ // boost::placeholders::_1));
}
puncture_bb_impl::~puncture_bb_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-fec/lib/puncture_ff_impl.cc gnuradio-3.8.1.0/gr-fec/lib/puncture_ff_impl.cc
--- gnuradio-3.8.1.0.orig/gr-fec/lib/puncture_ff_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-fec/lib/puncture_ff_impl.cc 2020-08-06 11:07:08.721983705 +0300
@@ -72,7 +72,9 @@
set_fixed_rate(true);
set_relative_rate((uint64_t)(d_puncsize - d_puncholes), (uint64_t)d_puncsize);
set_output_multiple(d_puncsize - d_puncholes);
- // set_msg_handler(boost::bind(&puncture_ff_impl::catch_msg, this, _1));
+ // set_msg_handler(boost::bind(&puncture_ff_impl::catch_msg,
+ // this,
+ // boost::placeholders::_1));
}
puncture_ff_impl::~puncture_ff_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-filter/lib/freq_xlating_fir_filter_impl.cc gnuradio-3.8.1.0/gr-filter/lib/freq_xlating_fir_filter_impl.cc
--- gnuradio-3.8.1.0.orig/gr-filter/lib/freq_xlating_fir_filter_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-filter/lib/freq_xlating_fir_filter_impl.cc 2020-08-06 11:07:08.721983705 +0300
@@ -72,7 +72,7 @@
boost::bind(
&freq_xlating_fir_filter_impl::handle_set_center_freq,
this,
- _1));
+ boost::placeholders::_1));
}
template
diff -Naur gnuradio-3.8.1.0.orig/gr-filter/lib/mmse_resampler_cc_impl.cc gnuradio-3.8.1.0/gr-filter/lib/mmse_resampler_cc_impl.cc
--- gnuradio-3.8.1.0.orig/gr-filter/lib/mmse_resampler_cc_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-filter/lib/mmse_resampler_cc_impl.cc 2020-08-06 11:07:08.721983705 +0300
@@ -52,8 +52,9 @@
set_inverse_relative_rate(d_mu_inc);
message_port_register_in(pmt::intern("msg_in"));
- set_msg_handler(pmt::intern("msg_in"),
- boost::bind(&mmse_resampler_cc_impl::handle_msg, this, _1));
+ set_msg_handler(
+ pmt::intern("msg_in"),
+ boost::bind(&mmse_resampler_cc_impl::handle_msg, this, boost::placeholders::_1));
}
mmse_resampler_cc_impl::~mmse_resampler_cc_impl() { delete d_resamp; }
diff -Naur gnuradio-3.8.1.0.orig/gr-filter/lib/mmse_resampler_ff_impl.cc gnuradio-3.8.1.0/gr-filter/lib/mmse_resampler_ff_impl.cc
--- gnuradio-3.8.1.0.orig/gr-filter/lib/mmse_resampler_ff_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-filter/lib/mmse_resampler_ff_impl.cc 2020-08-06 11:07:08.721983705 +0300
@@ -53,8 +53,9 @@
set_inverse_relative_rate(d_mu_inc);
message_port_register_in(pmt::intern("msg_in"));
- set_msg_handler(pmt::intern("msg_in"),
- boost::bind(&mmse_resampler_ff_impl::handle_msg, this, _1));
+ set_msg_handler(
+ pmt::intern("msg_in"),
+ boost::bind(&mmse_resampler_ff_impl::handle_msg, this, boost::placeholders::_1));
}
mmse_resampler_ff_impl::~mmse_resampler_ff_impl() { delete d_resamp; }
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/const_sink_c_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/const_sink_c_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/const_sink_c_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/const_sink_c_impl.cc 2020-08-06 11:07:08.722983699 +0300
@@ -69,8 +69,9 @@
// setup PDU handling input port
message_port_register_in(pmt::mp("in"));
- set_msg_handler(pmt::mp("in"),
- boost::bind(&const_sink_c_impl::handle_pdus, this, _1));
+ set_msg_handler(
+ pmt::mp("in"),
+ boost::bind(&const_sink_c_impl::handle_pdus, this, boost::placeholders::_1));
for (int i = 0; i < d_nconnections; i++) {
d_residbufs_real.push_back(
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/edit_box_msg_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/edit_box_msg_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/edit_box_msg_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/edit_box_msg_impl.cc 2020-08-06 11:07:08.722983699 +0300
@@ -158,7 +158,9 @@
message_port_register_out(d_port);
message_port_register_in(pmt::mp("val"));
- set_msg_handler(pmt::mp("val"), boost::bind(&edit_box_msg_impl::set_value, this, _1));
+ set_msg_handler(
+ pmt::mp("val"),
+ boost::bind(&edit_box_msg_impl::set_value, this, boost::placeholders::_1));
}
edit_box_msg_impl::~edit_box_msg_impl()
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/freq_sink_c_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/freq_sink_c_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/freq_sink_c_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/freq_sink_c_impl.cc 2020-08-06 11:07:08.723983692 +0300
@@ -82,17 +82,23 @@
// setup bw input port
message_port_register_in(d_port_bw);
- set_msg_handler(d_port_bw, boost::bind(&freq_sink_c_impl::handle_set_bw, this, _1));
+ set_msg_handler(
+ d_port_bw,
+ boost::bind(&freq_sink_c_impl::handle_set_bw, this, boost::placeholders::_1));
// setup output message port to post frequency when display is
// double-clicked
message_port_register_out(d_port);
message_port_register_in(d_port);
- set_msg_handler(d_port, boost::bind(&freq_sink_c_impl::handle_set_freq, this, _1));
+ set_msg_handler(
+ d_port,
+ boost::bind(&freq_sink_c_impl::handle_set_freq, this, boost::placeholders::_1));
// setup PDU handling input port
message_port_register_in(pmt::mp("in"));
- set_msg_handler(pmt::mp("in"), boost::bind(&freq_sink_c_impl::handle_pdus, this, _1));
+ set_msg_handler(
+ pmt::mp("in"),
+ boost::bind(&freq_sink_c_impl::handle_pdus, this, boost::placeholders::_1));
d_main_gui = NULL;
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/freq_sink_f_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/freq_sink_f_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/freq_sink_f_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/freq_sink_f_impl.cc 2020-08-06 11:07:08.723983692 +0300
@@ -82,17 +82,23 @@
// setup bw input port
message_port_register_in(d_port_bw);
- set_msg_handler(d_port_bw, boost::bind(&freq_sink_f_impl::handle_set_bw, this, _1));
+ set_msg_handler(
+ d_port_bw,
+ boost::bind(&freq_sink_f_impl::handle_set_bw, this, boost::placeholders::_1));
// setup output message port to post frequency when display is
// double-clicked
message_port_register_out(d_port);
message_port_register_in(d_port);
- set_msg_handler(d_port, boost::bind(&freq_sink_f_impl::handle_set_freq, this, _1));
+ set_msg_handler(
+ d_port,
+ boost::bind(&freq_sink_f_impl::handle_set_freq, this, boost::placeholders::_1));
// setup PDU handling input port
message_port_register_in(pmt::mp("in"));
- set_msg_handler(pmt::mp("in"), boost::bind(&freq_sink_f_impl::handle_pdus, this, _1));
+ set_msg_handler(
+ pmt::mp("in"),
+ boost::bind(&freq_sink_f_impl::handle_pdus, this, boost::placeholders::_1));
d_main_gui = NULL;
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/histogram_sink_f_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/histogram_sink_f_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/histogram_sink_f_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/histogram_sink_f_impl.cc 2020-08-06 11:07:08.724983686 +0300
@@ -81,8 +81,9 @@
// setup PDU handling input port
message_port_register_in(pmt::mp("in"));
- set_msg_handler(pmt::mp("in"),
- boost::bind(&histogram_sink_f_impl::handle_pdus, this, _1));
+ set_msg_handler(
+ pmt::mp("in"),
+ boost::bind(&histogram_sink_f_impl::handle_pdus, this, boost::placeholders::_1));
// +1 for the PDU buffer
for (int i = 0; i < d_nconnections + 1; i++) {
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/sink_c_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/sink_c_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/sink_c_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/sink_c_impl.cc 2020-08-06 11:07:08.724983686 +0300
@@ -96,7 +96,9 @@
// double-clicked
message_port_register_out(d_port);
message_port_register_in(d_port);
- set_msg_handler(d_port, boost::bind(&sink_c_impl::handle_set_freq, this, _1));
+ set_msg_handler(
+ d_port,
+ boost::bind(&sink_c_impl::handle_set_freq, this, boost::placeholders::_1));
d_main_gui = NULL;
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/sink_f_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/sink_f_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/sink_f_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/sink_f_impl.cc 2020-08-06 11:07:08.724983686 +0300
@@ -95,7 +95,9 @@
// double-clicked
message_port_register_out(d_port);
message_port_register_in(d_port);
- set_msg_handler(d_port, boost::bind(&sink_f_impl::handle_set_freq, this, _1));
+ set_msg_handler(
+ d_port,
+ boost::bind(&sink_f_impl::handle_set_freq, this, boost::placeholders::_1));
d_main_gui = NULL;
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/time_raster_sink_b_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/time_raster_sink_b_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/time_raster_sink_b_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/time_raster_sink_b_impl.cc 2020-08-06 11:07:08.724983686 +0300
@@ -84,7 +84,9 @@
// setup PDU handling input port
message_port_register_in(pmt::mp("in"));
set_msg_handler(pmt::mp("in"),
- boost::bind(&time_raster_sink_b_impl::handle_pdus, this, _1));
+ boost::bind(&time_raster_sink_b_impl::handle_pdus,
+ this,
+ boost::placeholders::_1));
d_scale = 1.0f;
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/time_raster_sink_f_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/time_raster_sink_f_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/time_raster_sink_f_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/time_raster_sink_f_impl.cc 2020-08-06 11:07:08.724983686 +0300
@@ -84,7 +84,9 @@
// setup PDU handling input port
message_port_register_in(pmt::mp("in"));
set_msg_handler(pmt::mp("in"),
- boost::bind(&time_raster_sink_f_impl::handle_pdus, this, _1));
+ boost::bind(&time_raster_sink_f_impl::handle_pdus,
+ this,
+ boost::placeholders::_1));
d_icols = static_cast(ceil(d_cols));
d_tmpflt = (float*)volk_malloc(d_icols * sizeof(float), volk_get_alignment());
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/time_sink_c_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/time_sink_c_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/time_sink_c_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/time_sink_c_impl.cc 2020-08-06 11:07:08.725983679 +0300
@@ -80,7 +80,9 @@
// setup PDU handling input port
message_port_register_in(pmt::mp("in"));
- set_msg_handler(pmt::mp("in"), boost::bind(&time_sink_c_impl::handle_pdus, this, _1));
+ set_msg_handler(
+ pmt::mp("in"),
+ boost::bind(&time_sink_c_impl::handle_pdus, this, boost::placeholders::_1));
// +2 for the PDU message buffers
for (unsigned int n = 0; n < d_nconnections + 2; n++) {
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/time_sink_f_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/time_sink_f_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/time_sink_f_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/time_sink_f_impl.cc 2020-08-06 11:07:08.725983679 +0300
@@ -80,7 +80,9 @@
// setup PDU handling input port
message_port_register_in(pmt::mp("in"));
- set_msg_handler(pmt::mp("in"), boost::bind(&time_sink_f_impl::handle_pdus, this, _1));
+ set_msg_handler(
+ pmt::mp("in"),
+ boost::bind(&time_sink_f_impl::handle_pdus, this, boost::placeholders::_1));
// +1 for the PDU buffer
for (unsigned int n = 0; n < d_nconnections + 1; n++) {
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/waterfall_sink_c_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/waterfall_sink_c_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/waterfall_sink_c_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/waterfall_sink_c_impl.cc 2020-08-06 11:07:08.725983679 +0300
@@ -118,19 +118,24 @@
// setup bw input port
message_port_register_in(d_port_bw);
set_msg_handler(d_port_bw,
- boost::bind(&waterfall_sink_c_impl::handle_set_bw, this, _1));
+ boost::bind(&waterfall_sink_c_impl::handle_set_bw,
+ this,
+ boost::placeholders::_1));
// setup output message port to post frequency when display is
// double-clicked
message_port_register_out(d_port);
message_port_register_in(d_port);
set_msg_handler(d_port,
- boost::bind(&waterfall_sink_c_impl::handle_set_freq, this, _1));
+ boost::bind(&waterfall_sink_c_impl::handle_set_freq,
+ this,
+ boost::placeholders::_1));
// setup PDU handling input port
message_port_register_in(pmt::mp("in"));
- set_msg_handler(pmt::mp("in"),
- boost::bind(&waterfall_sink_c_impl::handle_pdus, this, _1));
+ set_msg_handler(
+ pmt::mp("in"),
+ boost::bind(&waterfall_sink_c_impl::handle_pdus, this, boost::placeholders::_1));
}
waterfall_sink_c_impl::~waterfall_sink_c_impl()
diff -Naur gnuradio-3.8.1.0.orig/gr-qtgui/lib/waterfall_sink_f_impl.cc gnuradio-3.8.1.0/gr-qtgui/lib/waterfall_sink_f_impl.cc
--- gnuradio-3.8.1.0.orig/gr-qtgui/lib/waterfall_sink_f_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-qtgui/lib/waterfall_sink_f_impl.cc 2020-08-06 11:07:08.725983679 +0300
@@ -116,19 +116,24 @@
// setup bw input port
message_port_register_in(d_port_bw);
set_msg_handler(d_port_bw,
- boost::bind(&waterfall_sink_f_impl::handle_set_bw, this, _1));
+ boost::bind(&waterfall_sink_f_impl::handle_set_bw,
+ this,
+ boost::placeholders::_1));
// setup output message port to post frequency when display is
// double-clicked
message_port_register_out(d_port);
message_port_register_in(d_port);
set_msg_handler(d_port,
- boost::bind(&waterfall_sink_f_impl::handle_set_freq, this, _1));
+ boost::bind(&waterfall_sink_f_impl::handle_set_freq,
+ this,
+ boost::placeholders::_1));
// setup PDU handling input port
message_port_register_in(pmt::mp("in"));
- set_msg_handler(pmt::mp("in"),
- boost::bind(&waterfall_sink_f_impl::handle_pdus, this, _1));
+ set_msg_handler(
+ pmt::mp("in"),
+ boost::bind(&waterfall_sink_f_impl::handle_pdus, this, boost::placeholders::_1));
}
waterfall_sink_f_impl::~waterfall_sink_f_impl()
diff -Naur gnuradio-3.8.1.0.orig/gr-uhd/lib/usrp_block_impl.cc gnuradio-3.8.1.0/gr-uhd/lib/usrp_block_impl.cc
--- gnuradio-3.8.1.0.orig/gr-uhd/lib/usrp_block_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-uhd/lib/usrp_block_impl.cc 2020-08-06 11:07:08.725983679 +0300
@@ -137,12 +137,18 @@
// Set up message ports:
message_port_register_in(pmt::mp("command"));
set_msg_handler(pmt::mp("command"),
- boost::bind(&usrp_block_impl::msg_handler_command, this, _1));
+ boost::bind(&usrp_block_impl::msg_handler_command,
+ this,
+ boost::placeholders::_1));
// cuz we lazy:
-#define REGISTER_CMD_HANDLER(key, _handler) \
- register_msg_cmd_handler(key, \
- boost::bind(&usrp_block_impl::_handler, this, _1, _2, _3))
+#define REGISTER_CMD_HANDLER(key, _handler) \
+ register_msg_cmd_handler(key, \
+ boost::bind(&usrp_block_impl::_handler, \
+ this, \
+ boost::placeholders::_1, \
+ boost::placeholders::_2, \
+ boost::placeholders::_3))
// Register default command handlers:
REGISTER_CMD_HANDLER(cmd_freq_key(), _cmd_handler_freq);
REGISTER_CMD_HANDLER(cmd_gain_key(), _cmd_handler_gain);
@@ -257,11 +263,12 @@
} else if (_dev->get_clock_source(mboard_index) == "mimo") {
sensor_name = "mimo_locked";
}
- if (not _wait_for_locked_sensor(
- get_mboard_sensor_names(mboard_index),
- sensor_name,
- boost::bind(
- &usrp_block_impl::get_mboard_sensor, this, _1, mboard_index))) {
+ if (not _wait_for_locked_sensor(get_mboard_sensor_names(mboard_index),
+ sensor_name,
+ boost::bind(&usrp_block_impl::get_mboard_sensor,
+ this,
+ boost::placeholders::_1,
+ mboard_index))) {
GR_LOG_WARN(
d_logger,
boost::format(
diff -Naur gnuradio-3.8.1.0.orig/gr-uhd/lib/usrp_source_impl.cc gnuradio-3.8.1.0/gr-uhd/lib/usrp_source_impl.cc
--- gnuradio-3.8.1.0.orig/gr-uhd/lib/usrp_source_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-uhd/lib/usrp_source_impl.cc 2020-08-06 11:07:08.726983673 +0300
@@ -57,8 +57,9 @@
_samp_rate = this->get_samp_rate();
_samps_per_packet = 1;
- register_msg_cmd_handler(cmd_tag_key(),
- boost::bind(&usrp_source_impl::_cmd_handler_tag, this, _1));
+ register_msg_cmd_handler(
+ cmd_tag_key(),
+ boost::bind(&usrp_source_impl::_cmd_handler_tag, this, boost::placeholders::_1));
}
usrp_source_impl::~usrp_source_impl() {}
diff -Naur gnuradio-3.8.1.0.orig/gr-zeromq/lib/pub_msg_sink_impl.cc gnuradio-3.8.1.0/gr-zeromq/lib/pub_msg_sink_impl.cc
--- gnuradio-3.8.1.0.orig/gr-zeromq/lib/pub_msg_sink_impl.cc 2020-04-08 20:21:10.000000000 +0300
+++ gnuradio-3.8.1.0/gr-zeromq/lib/pub_msg_sink_impl.cc 2020-08-06 11:07:08.726983673 +0300
@@ -55,7 +55,9 @@
d_socket->bind(address);
message_port_register_in(pmt::mp("in"));
- set_msg_handler(pmt::mp("in"), boost::bind(&pub_msg_sink_impl::handler, this, _1));
+ set_msg_handler(
+ pmt::mp("in"),
+ boost::bind(&pub_msg_sink_impl::handler, this, boost::placeholders::_1));
}
pub_msg_sink_impl::~pub_msg_sink_impl()
diff -Naur gnuradio-3.8.1.0.orig/gr-zeromq/lib/pub_msg_sink_impl.cc.orig gnuradio-3.8.1.0/gr-zeromq/lib/pub_msg_sink_impl.cc.orig
--- gnuradio-3.8.1.0.orig/gr-zeromq/lib/pub_msg_sink_impl.cc.orig 1970-01-01 02:00:00.000000000 +0200
+++ gnuradio-3.8.1.0/gr-zeromq/lib/pub_msg_sink_impl.cc.orig 2020-04-08 20:21:10.000000000 +0300
@@ -0,0 +1,84 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013,2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio.
+ *
+ * This 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.
+ *
+ * This software 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 this software; 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 "pub_msg_sink_impl.h"
+#include "tag_headers.h"
+#include
+
+namespace gr {
+namespace zeromq {
+
+pub_msg_sink::sptr pub_msg_sink::make(char* address, int timeout)
+{
+ return gnuradio::get_initial_sptr(new pub_msg_sink_impl(address, timeout));
+}
+
+pub_msg_sink_impl::pub_msg_sink_impl(char* address, int timeout)
+ : gr::block("pub_msg_sink",
+ gr::io_signature::make(0, 0, 0),
+ gr::io_signature::make(0, 0, 0)),
+ 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_PUB);
+ int time = 0;
+ d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time));
+ d_socket->bind(address);
+
+ message_port_register_in(pmt::mp("in"));
+ set_msg_handler(pmt::mp("in"), boost::bind(&pub_msg_sink_impl::handler, this, _1));
+}
+
+pub_msg_sink_impl::~pub_msg_sink_impl()
+{
+ d_socket->close();
+ delete d_socket;
+ delete d_context;
+}
+
+void pub_msg_sink_impl::handler(pmt::pmt_t msg)
+{
+ std::stringbuf sb("");
+ pmt::serialize(msg, sb);
+ std::string s = sb.str();
+ zmq::message_t zmsg(s.size());
+
+ memcpy(zmsg.data(), s.c_str(), s.size());
+#if USE_NEW_CPPZMQ_SEND_RECV
+ d_socket->send(zmsg, zmq::send_flags::none);
+#else
+ d_socket->send(zmsg);
+#endif
+}
+
+} /* namespace zeromq */
+} /* namespace gr */
diff -Naur gnuradio-3.8.1.0.orig/gr-zeromq/lib/push_msg_sink_impl.cc gnuradio-3.8.1.0/gr-zeromq/lib/push_msg_sink_impl.cc
--- gnuradio-3.8.1.0.orig/gr-zeromq/lib/push_msg_sink_impl.cc 2020-04-08 20:21:11.000000000 +0300
+++ gnuradio-3.8.1.0/gr-zeromq/lib/push_msg_sink_impl.cc 2020-08-06 11:07:08.726983673 +0300
@@ -57,7 +57,9 @@
d_socket->bind(address);
message_port_register_in(pmt::mp("in"));
- set_msg_handler(pmt::mp("in"), boost::bind(&push_msg_sink_impl::handler, this, _1));
+ set_msg_handler(
+ pmt::mp("in"),
+ boost::bind(&push_msg_sink_impl::handler, this, boost::placeholders::_1));
}
push_msg_sink_impl::~push_msg_sink_impl()
diff -Naur gnuradio-3.8.1.0.orig/gr-zeromq/lib/push_msg_sink_impl.cc.orig gnuradio-3.8.1.0/gr-zeromq/lib/push_msg_sink_impl.cc.orig
--- gnuradio-3.8.1.0.orig/gr-zeromq/lib/push_msg_sink_impl.cc.orig 1970-01-01 02:00:00.000000000 +0200
+++ gnuradio-3.8.1.0/gr-zeromq/lib/push_msg_sink_impl.cc.orig 2020-04-08 20:21:11.000000000 +0300
@@ -0,0 +1,86 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013,2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio.
+ *
+ * This 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.
+ *
+ * This software 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 this software; 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 "push_msg_sink_impl.h"
+#include "tag_headers.h"
+#include
+
+namespace gr {
+namespace zeromq {
+
+push_msg_sink::sptr push_msg_sink::make(char* address, int timeout)
+{
+ return gnuradio::get_initial_sptr(new push_msg_sink_impl(address, timeout));
+}
+
+push_msg_sink_impl::push_msg_sink_impl(char* address, int timeout)
+ : gr::block("push_msg_sink",
+ gr::io_signature::make(0, 0, 0),
+ gr::io_signature::make(0, 0, 0)),
+ 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;
+ d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time));
+ d_socket->bind(address);
+
+ message_port_register_in(pmt::mp("in"));
+ set_msg_handler(pmt::mp("in"), boost::bind(&push_msg_sink_impl::handler, this, _1));
+}
+
+push_msg_sink_impl::~push_msg_sink_impl()
+{
+ d_socket->close();
+ delete d_socket;
+ delete d_context;
+}
+
+void push_msg_sink_impl::handler(pmt::pmt_t msg)
+{
+ std::stringbuf sb("");
+ pmt::serialize(msg, sb);
+ std::string s = sb.str();
+ zmq::message_t zmsg(s.size());
+
+ memcpy(zmsg.data(), s.c_str(), s.size());
+#if USE_NEW_CPPZMQ_SEND_RECV
+ d_socket->send(zmsg, zmq::send_flags::none);
+#else
+ d_socket->send(zmsg);
+#endif
+}
+
+} /* namespace zeromq */
+} /* namespace gr */