summaryrefslogtreecommitdiff
path: root/gr-blocks/lib
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2020-06-19 11:07:54 +0200
committerMarcus Müller <marcus@hostalia.de>2020-06-19 11:07:54 +0200
commite76d04ca2f4f15e3b1a1ab2a81dd52c4e6d2472c (patch)
tree1d86f68fceed9cd7204d9a79e816dc06c15feaf4 /gr-blocks/lib
parent98348e37209aa7daeb96fe5ead815e5b083dc6da (diff)
parent39311758cb1e6a7424d3213b3eb2c65c8c4dcfe1 (diff)
Move from SWIG to Pybind11
Goodbye, and thanks for all the fish, SWIG. Please refer to docs/PYBIND11.md for details on how to deal with Pybind.
Diffstat (limited to 'gr-blocks/lib')
-rw-r--r--gr-blocks/lib/CMakeLists.txt1
-rw-r--r--gr-blocks/lib/bin_statistics_f_impl.cc152
-rw-r--r--gr-blocks/lib/bin_statistics_f_impl.h69
-rw-r--r--gr-blocks/lib/copy_impl.cc2
-rw-r--r--gr-blocks/lib/message_debug_impl.cc6
-rw-r--r--gr-blocks/lib/message_strobe_impl.cc5
-rw-r--r--gr-blocks/lib/message_strobe_random_impl.cc5
-rw-r--r--gr-blocks/lib/multiply_matrix_impl.cc7
-rw-r--r--gr-blocks/lib/mute_impl.cc2
-rw-r--r--gr-blocks/lib/nop_impl.cc2
-rw-r--r--gr-blocks/lib/or_blk_impl.cc7
-rw-r--r--gr-blocks/lib/pdu_filter_impl.cc2
-rw-r--r--gr-blocks/lib/pdu_remove_impl.cc2
-rw-r--r--gr-blocks/lib/pdu_set_impl.cc3
-rw-r--r--gr-blocks/lib/random_pdu_impl.cc2
-rw-r--r--gr-blocks/lib/repeat_impl.cc2
-rw-r--r--gr-blocks/lib/socket_pdu_impl.cc8
-rw-r--r--gr-blocks/lib/stream_pdu_base.cc2
-rw-r--r--gr-blocks/lib/tagged_stream_multiply_length_impl.cc5
-rw-r--r--gr-blocks/lib/tuntap_pdu_impl.cc2
20 files changed, 29 insertions, 257 deletions
diff --git a/gr-blocks/lib/CMakeLists.txt b/gr-blocks/lib/CMakeLists.txt
index 45cf72b579..7a268f1522 100644
--- a/gr-blocks/lib/CMakeLists.txt
+++ b/gr-blocks/lib/CMakeLists.txt
@@ -62,7 +62,6 @@ add_library(gnuradio-blocks
annotator_1to1_impl.cc
annotator_alltoall_impl.cc
annotator_raw_impl.cc
- bin_statistics_f_impl.cc
burst_tagger_impl.cc
char_to_float_impl.cc
char_to_short_impl.cc
diff --git a/gr-blocks/lib/bin_statistics_f_impl.cc b/gr-blocks/lib/bin_statistics_f_impl.cc
deleted file mode 100644
index dca2f868a5..0000000000
--- a/gr-blocks/lib/bin_statistics_f_impl.cc
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2010,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "bin_statistics_f_impl.h"
-#include <gnuradio/io_signature.h>
-#include <string.h>
-
-namespace gr {
-namespace blocks {
-
-bin_statistics_f::sptr bin_statistics_f::make(unsigned int vlen,
- msg_queue::sptr msgq,
- feval_dd* tune,
- size_t tune_delay,
- size_t dwell_delay)
-{
- return gnuradio::get_initial_sptr(
- new bin_statistics_f_impl(vlen, msgq, tune, tune_delay, dwell_delay));
-}
-
-bin_statistics_f_impl::bin_statistics_f_impl(unsigned int vlen,
- msg_queue::sptr msgq,
- feval_dd* tune,
- size_t tune_delay,
- size_t dwell_delay)
- : sync_block("bin_statistics_f",
- io_signature::make(1, 1, sizeof(float) * vlen),
- io_signature::make(0, 0, 0)),
- d_vlen(vlen),
- d_msgq(msgq),
- d_tune(tune),
- d_tune_delay(tune_delay),
- d_dwell_delay(dwell_delay),
- d_center_freq(0),
- d_delay(0),
- d_max(vlen)
-{
- enter_init();
-}
-
-bin_statistics_f_impl::~bin_statistics_f_impl() {}
-
-void bin_statistics_f_impl::enter_init()
-{
- d_state = ST_INIT;
- d_delay = 0;
-}
-
-void bin_statistics_f_impl::enter_tune_delay()
-{
- d_state = ST_TUNE_DELAY;
- d_delay = d_tune_delay;
- d_center_freq = d_tune->calleval(0);
-}
-
-void bin_statistics_f_impl::enter_dwell_delay()
-{
- d_state = ST_DWELL_DELAY;
- d_delay = d_dwell_delay;
- reset_stats();
-}
-
-void bin_statistics_f_impl::leave_dwell_delay() { send_stats(); }
-
-int bin_statistics_f_impl::work(int noutput_items,
- gr_vector_const_void_star& input_items,
- gr_vector_void_star& output_items)
-{
- const float* input = (const float*)input_items[0];
- size_t vlen = d_max.size();
-
- int n = 0;
- int t;
-
- while (n < noutput_items) {
- switch (d_state) {
-
- case ST_INIT:
- enter_tune_delay();
- break;
-
- case ST_TUNE_DELAY:
- t = std::min(noutput_items - n, int(d_delay));
- n += t;
- d_delay -= t;
- if (d_delay == 0)
- enter_dwell_delay();
- break;
-
- case ST_DWELL_DELAY:
- t = std::min(noutput_items - n, int(d_delay));
- for (int i = 0; i < t; i++) {
- accrue_stats(&input[n * vlen]);
- n++;
- }
- d_delay -= t;
- if (d_delay == 0) {
- leave_dwell_delay();
- enter_tune_delay();
- }
- break;
-
- default:
- assert(0);
- }
- }
-
- return noutput_items;
-}
-
-//////////////////////////////////////////////////////////////////////////
-// virtual methods for gathering stats
-//////////////////////////////////////////////////////////////////////////
-
-void bin_statistics_f_impl::reset_stats()
-{
- for (size_t i = 0; i < vlen(); i++) {
- d_max[i] = 0;
- }
-}
-
-void bin_statistics_f_impl::accrue_stats(const float* input)
-{
- for (size_t i = 0; i < vlen(); i++) {
- d_max[i] = std::max(d_max[i], input[i]); // compute per bin maxima
- }
-}
-
-void bin_statistics_f_impl::send_stats()
-{
- if (msgq()->full_p()) // if the queue is full, don't block, drop the data...
- return;
-
- // build & send a message
- message::sptr msg = message::make(0, center_freq(), vlen(), vlen() * sizeof(float));
- memcpy(msg->msg(), &d_max[0], vlen() * sizeof(float));
- msgq()->insert_tail(msg);
-}
-
-} /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/bin_statistics_f_impl.h b/gr-blocks/lib/bin_statistics_f_impl.h
deleted file mode 100644
index 42a838f3cd..0000000000
--- a/gr-blocks/lib/bin_statistics_f_impl.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#ifndef INCLUDED_GR_BIN_STATISTICS_F_IMPL_H
-#define INCLUDED_GR_BIN_STATISTICS_F_IMPL_H
-
-#include <gnuradio/blocks/bin_statistics_f.h>
-#include <gnuradio/feval.h>
-#include <gnuradio/message.h>
-#include <gnuradio/msg_queue.h>
-
-namespace gr {
-namespace blocks {
-
-class bin_statistics_f_impl : public bin_statistics_f
-{
-private:
- enum state_t { ST_INIT, ST_TUNE_DELAY, ST_DWELL_DELAY };
-
- const size_t d_vlen;
- msg_queue::sptr d_msgq;
- feval_dd* d_tune;
- const size_t d_tune_delay;
- const size_t d_dwell_delay;
- double d_center_freq;
-
- state_t d_state;
- size_t d_delay; // nsamples remaining to state transition
-
- void enter_init();
- void enter_tune_delay();
- void enter_dwell_delay();
- void leave_dwell_delay();
-
-protected:
- std::vector<float> d_max; // per bin maxima
-
- size_t vlen() const { return d_vlen; }
- double center_freq() const { return d_center_freq; }
- msg_queue::sptr msgq() const { return d_msgq; }
-
- virtual void reset_stats();
- virtual void accrue_stats(const float* input);
- virtual void send_stats();
-
-public:
- bin_statistics_f_impl(unsigned int vlen,
- msg_queue::sptr msgq,
- feval_dd* tune,
- size_t tune_delay,
- size_t dwell_delay);
- ~bin_statistics_f_impl();
-
- int work(int noutput_items,
- gr_vector_const_void_star& input_items,
- gr_vector_void_star& output_items);
-};
-
-} /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_BIN_STATISTICS_F_IMPL_H */
diff --git a/gr-blocks/lib/copy_impl.cc b/gr-blocks/lib/copy_impl.cc
index 3470756c8b..c963f0d635 100644
--- a/gr-blocks/lib/copy_impl.cc
+++ b/gr-blocks/lib/copy_impl.cc
@@ -32,7 +32,7 @@ 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(&copy_impl::handle_enable, this, _1));
+ set_msg_handler(pmt::mp("en"), [this](pmt::pmt_t msg) { this->handle_enable(msg); });
}
copy_impl::~copy_impl() {}
diff --git a/gr-blocks/lib/message_debug_impl.cc b/gr-blocks/lib/message_debug_impl.cc
index a9c7fbbe99..eb47fee299 100644
--- a/gr-blocks/lib/message_debug_impl.cc
+++ b/gr-blocks/lib/message_debug_impl.cc
@@ -78,14 +78,14 @@ 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"), [this](pmt::pmt_t msg) { this->print(msg); });
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"), [this](pmt::pmt_t msg) { this->store(msg); });
message_port_register_in(pmt::mp("print_pdu"));
set_msg_handler(pmt::mp("print_pdu"),
- boost::bind(&message_debug_impl::print_pdu, this, _1));
+ [this](pmt::pmt_t msg) { this->print_pdu(msg); });
}
message_debug_impl::~message_debug_impl() {}
diff --git a/gr-blocks/lib/message_strobe_impl.cc b/gr-blocks/lib/message_strobe_impl.cc
index 9a601c6cb7..33215a5a81 100644
--- a/gr-blocks/lib/message_strobe_impl.cc
+++ b/gr-blocks/lib/message_strobe_impl.cc
@@ -41,8 +41,7 @@ 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"), [this](pmt::pmt_t msg) { this->set_msg(msg); });
}
message_strobe_impl::~message_strobe_impl() {}
@@ -53,7 +52,7 @@ bool message_strobe_impl::start()
// nothing breaks on concurrent access, I'll just leave it as bool.
d_finished = false;
d_thread = std::shared_ptr<gr::thread::thread>(
- new gr::thread::thread(boost::bind(&message_strobe_impl::run, this)));
+ new gr::thread::thread(std::bind(&message_strobe_impl::run, this)));
return block::start();
}
diff --git a/gr-blocks/lib/message_strobe_random_impl.cc b/gr-blocks/lib/message_strobe_random_impl.cc
index 793066c419..1c2b4ec2a1 100644
--- a/gr-blocks/lib/message_strobe_random_impl.cc
+++ b/gr-blocks/lib/message_strobe_random_impl.cc
@@ -51,11 +51,10 @@ message_strobe_random_impl::message_strobe_random_impl(
// set up ports
message_port_register_out(d_port);
d_thread = std::shared_ptr<gr::thread::thread>(
- new gr::thread::thread(boost::bind(&message_strobe_random_impl::run, this)));
+ new gr::thread::thread(std::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"), [this](pmt::pmt_t msg) { this->set_msg(msg); });
}
void message_strobe_random_impl::set_mean(float mean_ms)
diff --git a/gr-blocks/lib/multiply_matrix_impl.cc b/gr-blocks/lib/multiply_matrix_impl.cc
index b3452a5c17..539432eac8 100644
--- a/gr-blocks/lib/multiply_matrix_impl.cc
+++ b/gr-blocks/lib/multiply_matrix_impl.cc
@@ -223,9 +223,7 @@ multiply_matrix_impl<gr_complex>::multiply_matrix_impl(
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<gr_complex>::msg_handler_A, this, _1));
+ set_msg_handler(port_name, [this](pmt::pmt_t msg) { this->msg_handler_A(msg); });
}
template <>
@@ -244,8 +242,7 @@ multiply_matrix_impl<float>::multiply_matrix_impl(
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<float>::msg_handler_A, this, _1));
+ set_msg_handler(port_name, [this](pmt::pmt_t msg) { this->msg_handler_A(msg); });
}
diff --git a/gr-blocks/lib/mute_impl.cc b/gr-blocks/lib/mute_impl.cc
index f8873234bf..003f33c46f 100644
--- a/gr-blocks/lib/mute_impl.cc
+++ b/gr-blocks/lib/mute_impl.cc
@@ -36,7 +36,7 @@ mute_impl<T>::mute_impl(bool mute)
{
this->message_port_register_in(pmt::intern("set_mute"));
this->set_msg_handler(pmt::intern("set_mute"),
- boost::bind(&mute_impl<T>::set_mute_pmt, this, _1));
+ [this](pmt::pmt_t msg) { this->set_mute_pmt(msg); });
}
template <class T>
diff --git a/gr-blocks/lib/nop_impl.cc b/gr-blocks/lib/nop_impl.cc
index 0ae48446da..5ed25f5d1a 100644
--- a/gr-blocks/lib/nop_impl.cc
+++ b/gr-blocks/lib/nop_impl.cc
@@ -33,7 +33,7 @@ nop_impl::nop_impl(size_t sizeof_stream_item)
// 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));
+ [this](pmt::pmt_t msg) { this->count_received_msgs(msg); });
}
nop_impl::~nop_impl() {}
diff --git a/gr-blocks/lib/or_blk_impl.cc b/gr-blocks/lib/or_blk_impl.cc
index 528e85afc0..8505729fed 100644
--- a/gr-blocks/lib/or_blk_impl.cc
+++ b/gr-blocks/lib/or_blk_impl.cc
@@ -53,9 +53,8 @@ int or_blk_impl<T>::work(int noutput_items,
return noutput_items;
}
-template class or_blk<short>;
-template class or_blk<int>;
-template class or_blk<char>;
-
+template class or_blk<std::uint8_t>;
+template class or_blk<std::int16_t>;
+template class or_blk<std::int32_t>;
} /* namespace blocks */
} /* namespace gr */
diff --git a/gr-blocks/lib/pdu_filter_impl.cc b/gr-blocks/lib/pdu_filter_impl.cc
index 9924db5e87..dcf83a8d2e 100644
--- a/gr-blocks/lib/pdu_filter_impl.cc
+++ b/gr-blocks/lib/pdu_filter_impl.cc
@@ -33,7 +33,7 @@ pdu_filter_impl::pdu_filter_impl(pmt::pmt_t k, pmt::pmt_t v, bool invert)
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));
+ [this](pmt::pmt_t msg) { this->handle_msg(msg); });
}
void pdu_filter_impl::handle_msg(pmt::pmt_t pdu)
diff --git a/gr-blocks/lib/pdu_remove_impl.cc b/gr-blocks/lib/pdu_remove_impl.cc
index b68d692b94..55a3b7237e 100644
--- a/gr-blocks/lib/pdu_remove_impl.cc
+++ b/gr-blocks/lib/pdu_remove_impl.cc
@@ -31,7 +31,7 @@ pdu_remove_impl::pdu_remove_impl(pmt::pmt_t k)
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));
+ [this](pmt::pmt_t msg) { this->handle_msg(msg); });
}
void pdu_remove_impl::handle_msg(pmt::pmt_t pdu)
diff --git a/gr-blocks/lib/pdu_set_impl.cc b/gr-blocks/lib/pdu_set_impl.cc
index 5b25b4604c..61bcef7169 100644
--- a/gr-blocks/lib/pdu_set_impl.cc
+++ b/gr-blocks/lib/pdu_set_impl.cc
@@ -31,7 +31,8 @@ pdu_set_impl::pdu_set_impl(pmt::pmt_t k, pmt::pmt_t v)
{
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(),
+ [this](pmt::pmt_t msg) { this->handle_msg(msg); });
}
void pdu_set_impl::handle_msg(pmt::pmt_t pdu)
diff --git a/gr-blocks/lib/random_pdu_impl.cc b/gr-blocks/lib/random_pdu_impl.cc
index 9a00386f0f..2ee9b89759 100644
--- a/gr-blocks/lib/random_pdu_impl.cc
+++ b/gr-blocks/lib/random_pdu_impl.cc
@@ -39,7 +39,7 @@ random_pdu_impl::random_pdu_impl(int min_items,
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));
+ [this](pmt::pmt_t msg) { this->generate_pdu(msg); });
if (length_modulo < 1)
throw std::runtime_error("length_module must be >= 1");
if (max_items < length_modulo)
diff --git a/gr-blocks/lib/repeat_impl.cc b/gr-blocks/lib/repeat_impl.cc
index b55a5f6d1d..3717290687 100644
--- a/gr-blocks/lib/repeat_impl.cc
+++ b/gr-blocks/lib/repeat_impl.cc
@@ -33,7 +33,7 @@ repeat_impl::repeat_impl(size_t itemsize, int interp)
{
message_port_register_in(pmt::mp("interpolation"));
set_msg_handler(pmt::mp("interpolation"),
- boost::bind(&repeat_impl::msg_set_interpolation, this, _1));
+ [this](pmt::pmt_t msg) { this->msg_set_interpolation(msg); });
}
void repeat_impl::msg_set_interpolation(pmt::pmt_t msg)
diff --git a/gr-blocks/lib/socket_pdu_impl.cc b/gr-blocks/lib/socket_pdu_impl.cc
index cd74d60603..bdbe1eb2d2 100644
--- a/gr-blocks/lib/socket_pdu_impl.cc
+++ b/gr-blocks/lib/socket_pdu_impl.cc
@@ -89,7 +89,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type,
start_tcp_accept();
set_msg_handler(pdu::pdu_port_id(),
- boost::bind(&socket_pdu_impl::tcp_server_send, this, _1));
+ [this](pmt::pmt_t msg) { this->tcp_server_send(msg); });
} 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));
@@ -99,7 +99,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type,
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));
+ [this](pmt::pmt_t msg) { this->tcp_client_send(msg); });
d_tcp_socket->async_read_some(
boost::asio::buffer(d_rxbuf),
@@ -119,7 +119,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type,
boost::asio::placeholders::bytes_transferred));
set_msg_handler(pdu::pdu_port_id(),
- boost::bind(&socket_pdu_impl::udp_send, this, _1));
+ [this](pmt::pmt_t msg) { this->udp_send(msg); });
} else if (type == "UDP_CLIENT") {
d_udp_socket.reset(
new boost::asio::ip::udp::socket(d_io_service, d_udp_endpoint));
@@ -132,7 +132,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type,
boost::asio::placeholders::bytes_transferred));
set_msg_handler(pdu::pdu_port_id(),
- boost::bind(&socket_pdu_impl::udp_send, this, _1));
+ [this](pmt::pmt_t msg) { this->udp_send(msg); });
} else
throw std::runtime_error("gr::blocks:socket_pdu: unknown socket type");
diff --git a/gr-blocks/lib/stream_pdu_base.cc b/gr-blocks/lib/stream_pdu_base.cc
index 988c70aca9..97e99e8886 100644
--- a/gr-blocks/lib/stream_pdu_base.cc
+++ b/gr-blocks/lib/stream_pdu_base.cc
@@ -44,7 +44,7 @@ void stream_pdu_base::start_rxthread(basic_block* blk, pmt::pmt_t port)
{
d_blk = blk;
d_port = port;
- d_thread = gr::thread::thread(boost::bind(&stream_pdu_base::run, this));
+ d_thread = gr::thread::thread(std::bind(&stream_pdu_base::run, this));
d_started = true;
}
diff --git a/gr-blocks/lib/tagged_stream_multiply_length_impl.cc b/gr-blocks/lib/tagged_stream_multiply_length_impl.cc
index e1c840a0d6..948c189444 100644
--- a/gr-blocks/lib/tagged_stream_multiply_length_impl.cc
+++ b/gr-blocks/lib/tagged_stream_multiply_length_impl.cc
@@ -37,9 +37,8 @@ tagged_stream_multiply_length_impl::tagged_stream_multiply_length_impl(
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"),
+ [this](pmt::pmt_t msg) { this->set_scalar_pmt(msg); });
}
tagged_stream_multiply_length_impl::~tagged_stream_multiply_length_impl() {}
diff --git a/gr-blocks/lib/tuntap_pdu_impl.cc b/gr-blocks/lib/tuntap_pdu_impl.cc
index 058fb6d26f..c2e352c559 100644
--- a/gr-blocks/lib/tuntap_pdu_impl.cc
+++ b/gr-blocks/lib/tuntap_pdu_impl.cc
@@ -86,7 +86,7 @@ tuntap_pdu_impl::tuntap_pdu_impl(std::string dev, int MTU, bool istunflag)
// 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(), [this](pmt::pmt_t msg) { this->send(msg); });
}
int tuntap_pdu_impl::tun_alloc(char* dev, int flags)