aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-10-16 16:21:19 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:32 -0800
commitd3a16b702230534f7265613a73204bdb051a458e (patch)
tree5cd9ace71b187aa2c5d8deb5904b14db28dc7c70 /host/lib/usrp/usrp2
parentdc698b990d368dfb8641b68dbe32a90079b7bd90 (diff)
downloaduhd-d3a16b702230534f7265613a73204bdb051a458e.tar.gz
uhd-d3a16b702230534f7265613a73204bdb051a458e.tar.bz2
uhd-d3a16b702230534f7265613a73204bdb051a458e.zip
uhd: Replace all occurrences of boost::bind with std::bind
Note: Replacing everything with a lambda would be even better, but that can't be easily scripted so we'll do this as a first step to reduce the Boost footprint. This also removes occurences of #include <boost/bind.hpp>, and makes sure all usages of std::bind have an #include <functional>. clang-format wasn't always applied to minimize the changeset in this commit, however, it was applied to the blocks of #includes. Due to conflicts with other Boost libraries, the placeholders _1, _2, etc. could not be directly used, but had to be explicitly called out (as std::placeholders::_1, etc.). This makes the use of std::bind even uglier, which serves as another reminder that using std::bind (and even more so, boost::bind) should be avoided. nirio/rpc/rpc_client.cpp still contains a reference to boost::bind. It was not possible to remove it by simply doing a search and replace, so it will be removed in a separate commit.
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp43
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp23
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp90
3 files changed, 76 insertions, 80 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index efc0644db..1f8540c16 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -5,28 +5,27 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include <uhdlib/usrp/common/validate_subdev_spec.hpp>
-#include <uhdlib/usrp/common/async_packet_handler.hpp>
#include "../../transport/super_recv_packet_handler.hpp"
#include "../../transport/super_send_packet_handler.hpp"
+#include "fw_common.h"
#include "usrp2_impl.hpp"
#include "usrp2_regs.hpp"
-#include "fw_common.h"
-#include <uhd/utils/log.hpp>
-
-#include <uhd/utils/tasks.hpp>
#include <uhd/exception.hpp>
+#include <uhd/transport/bounded_buffer.hpp>
#include <uhd/utils/byteswap.hpp>
+#include <uhd/utils/log.hpp>
+#include <uhd/utils/tasks.hpp>
#include <uhd/utils/thread.hpp>
-#include <uhd/transport/bounded_buffer.hpp>
-#include <boost/thread/thread.hpp>
-#include <boost/format.hpp>
-#include <boost/bind.hpp>
+#include <uhdlib/usrp/common/async_packet_handler.hpp>
+#include <uhdlib/usrp/common/validate_subdev_spec.hpp>
#include <boost/asio.hpp>
+#include <boost/format.hpp>
#include <boost/thread/mutex.hpp>
-#include <memory>
-#include <iostream>
+#include <boost/thread/thread.hpp>
#include <chrono>
+#include <functional>
+#include <iostream>
+#include <memory>
#include <thread>
using namespace uhd;
@@ -63,7 +62,7 @@ public:
*/
flow_control_monitor(seq_type max_seqs_out):_max_seqs_out(max_seqs_out){
this->clear();
- _ready_fcn = boost::bind(&flow_control_monitor::ready, this);
+ _ready_fcn = std::bind(&flow_control_monitor::ready, this);
}
//! Clear the monitor, Ex: when a streamer is created
@@ -242,10 +241,10 @@ void usrp2_impl::io_init(void){
size_t index = 0;
for(const std::string &mb: _mbc.keys()){
//spawn a new pirate to plunder the recv booty
- _io_impl->pirate_tasks.push_back(task::make(boost::bind(
+ _io_impl->pirate_tasks.push_back(task::make(std::bind(
&usrp2_impl::io_impl::recv_pirate_loop, _io_impl.get(),
_mbc[mb].tx_dsp_xport, index++,
- boost::ref(_pirate_task_exit)
+ std::ref(_pirate_task_exit)
)));
}
}
@@ -454,11 +453,11 @@ rx_streamer::sptr usrp2_impl::get_rx_stream(const uhd::stream_args_t &args_){
_mbc[mb].rx_dsps[dsp]->set_nsamps_per_packet(spp); //seems to be a good place to set this
_mbc[mb].rx_dsps[dsp]->setup(args);
this->program_stream_dest(_mbc[mb].rx_dsp_xports[dsp], args);
- my_streamer->set_xport_chan_get_buff(chan_i, boost::bind(
- &zero_copy_if::get_recv_buff, _mbc[mb].rx_dsp_xports[dsp], _1
+ my_streamer->set_xport_chan_get_buff(chan_i, std::bind(
+ &zero_copy_if::get_recv_buff, _mbc[mb].rx_dsp_xports[dsp], std::placeholders::_1
), true /*flush*/);
- my_streamer->set_issue_stream_cmd(chan_i, boost::bind(
- &rx_dsp_core_200::issue_stream_command, _mbc[mb].rx_dsps[dsp], _1));
+ my_streamer->set_issue_stream_cmd(chan_i, std::bind(
+ &rx_dsp_core_200::issue_stream_command, _mbc[mb].rx_dsps[dsp], std::placeholders::_1));
_mbc[mb].rx_streamers[dsp] = my_streamer; //store weak pointer
break;
}
@@ -525,10 +524,10 @@ tx_streamer::sptr usrp2_impl::get_tx_stream(const uhd::stream_args_t &args_){
_io_impl->fc_mons[abs]->clear();
}
_mbc[mb].tx_dsp->setup(args);
- my_streamer->set_xport_chan_get_buff(chan_i, boost::bind(
- &usrp2_impl::io_impl::get_send_buff, _io_impl.get(), abs, _1
+ my_streamer->set_xport_chan_get_buff(chan_i, std::bind(
+ &usrp2_impl::io_impl::get_send_buff, _io_impl.get(), abs, std::placeholders::_1
));
- my_streamer->set_async_receiver(boost::bind(&bounded_buffer<async_metadata_t>::pop_with_timed_wait, &(_io_impl->async_msg_fifo), _1, _2));
+ my_streamer->set_async_receiver(std::bind(&bounded_buffer<async_metadata_t>::pop_with_timed_wait, &(_io_impl->async_msg_fifo), std::placeholders::_1, std::placeholders::_2));
_mbc[mb].tx_streamers[dsp] = my_streamer; //store weak pointer
break;
}
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index c8283c500..962ead769 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -5,29 +5,28 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "usrp2_regs.hpp"
-#include "usrp2_impl.hpp"
-#include "fw_common.h"
#include "usrp2_iface.hpp"
+#include "fw_common.h"
+#include "usrp2_impl.hpp"
+#include "usrp2_regs.hpp"
#include <uhd/exception.hpp>
+#include <uhd/types/dict.hpp>
#include <uhd/utils/log.hpp>
#include <uhd/utils/paths.hpp>
-#include <uhd/utils/tasks.hpp>
-#include <uhd/utils/paths.hpp>
+#include <uhd/utils/platform.hpp>
#include <uhd/utils/safe_call.hpp>
-#include <uhd/types/dict.hpp>
+#include <uhd/utils/tasks.hpp>
#include <boost/asio.hpp> //used for htonl and ntohl
#include <boost/assign/list_of.hpp>
+#include <boost/filesystem.hpp>
#include <boost/format.hpp>
-#include <boost/bind.hpp>
-#include <boost/tokenizer.hpp>
#include <boost/functional/hash.hpp>
-#include <boost/filesystem.hpp>
+#include <boost/tokenizer.hpp>
#include <algorithm>
-#include <iostream>
#include <chrono>
+#include <functional>
+#include <iostream>
#include <thread>
-#include <uhd/utils/platform.hpp>
using namespace uhd;
using namespace uhd::usrp;
@@ -88,7 +87,7 @@ public:
void lock_device(bool lock){
if (lock){
this->pokefw(U2_FW_REG_LOCK_GPID, get_process_hash());
- _lock_task = task::make(boost::bind(&usrp2_iface_impl::lock_task, this));
+ _lock_task = task::make(std::bind(&usrp2_iface_impl::lock_task, this));
}
else{
_lock_task.reset(); //shutdown the task
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 1be4c7339..fd35f3a1d 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -6,22 +6,20 @@
#include "usrp2_impl.hpp"
#include "fw_common.h"
-#include <uhdlib/usrp/common/apply_corrections.hpp>
-#include <uhd/utils/log.hpp>
-
#include <uhd/exception.hpp>
#include <uhd/transport/if_addrs.hpp>
#include <uhd/transport/udp_zero_copy.hpp>
#include <uhd/types/ranges.hpp>
-#include <uhd/exception.hpp>
-#include <uhd/utils/static.hpp>
#include <uhd/utils/byteswap.hpp>
+#include <uhd/utils/log.hpp>
#include <uhd/utils/safe_call.hpp>
-#include <boost/format.hpp>
-#include <boost/bind.hpp>
-#include <boost/asio/ip/address_v4.hpp>
+#include <uhd/utils/static.hpp>
+#include <uhdlib/usrp/common/apply_corrections.hpp>
#include <boost/asio.hpp> //used for htonl and ntohl
+#include <boost/asio/ip/address_v4.hpp>
+#include <boost/format.hpp>
#include <boost/thread.hpp>
+#include <functional>
using namespace uhd;
using namespace uhd::usrp;
@@ -462,15 +460,15 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
_tree->create<mboard_eeprom_t>(mb_path / "eeprom")
.set(_mbc[mb].iface->mb_eeprom)
.add_coerced_subscriber(
- boost::bind(&usrp2_impl::set_mb_eeprom, this, mb, _1));
+ std::bind(&usrp2_impl::set_mb_eeprom, this, mb, std::placeholders::_1));
////////////////////////////////////////////////////////////////
// create clock control objects
////////////////////////////////////////////////////////////////
_mbc[mb].clock = usrp2_clock_ctrl::make(_mbc[mb].iface, _mbc[mb].spiface);
_tree->create<double>(mb_path / "tick_rate")
- .set_publisher(boost::bind(&usrp2_clock_ctrl::get_master_clock_rate, _mbc[mb].clock))
- .add_coerced_subscriber(boost::bind(&usrp2_impl::update_tick_rate, this, _1));
+ .set_publisher(std::bind(&usrp2_clock_ctrl::get_master_clock_rate, _mbc[mb].clock))
+ .add_coerced_subscriber(std::bind(&usrp2_impl::update_tick_rate, this, std::placeholders::_1));
////////////////////////////////////////////////////////////////
// create codec control objects
@@ -488,10 +486,10 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
_tree->create<std::string>(rx_codec_path / "name").set("ads62p44");
_tree->create<meta_range_t>(rx_codec_path / "gains/digital/range").set(meta_range_t(0, 6.0, 0.5));
_tree->create<double>(rx_codec_path / "gains/digital/value")
- .add_coerced_subscriber(boost::bind(&usrp2_codec_ctrl::set_rx_digital_gain, _mbc[mb].codec, _1)).set(0);
+ .add_coerced_subscriber(std::bind(&usrp2_codec_ctrl::set_rx_digital_gain, _mbc[mb].codec, std::placeholders::_1)).set(0);
_tree->create<meta_range_t>(rx_codec_path / "gains/fine/range").set(meta_range_t(0, 0.5, 0.05));
_tree->create<double>(rx_codec_path / "gains/fine/value")
- .add_coerced_subscriber(boost::bind(&usrp2_codec_ctrl::set_rx_digital_fine_gain, _mbc[mb].codec, _1)).set(0);
+ .add_coerced_subscriber(std::bind(&usrp2_codec_ctrl::set_rx_digital_fine_gain, _mbc[mb].codec, std::placeholders::_1)).set(0);
}break;
case usrp2_iface::USRP2_REV3:
@@ -538,7 +536,7 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
for(const std::string &name: _mbc[mb].gps->get_sensors())
{
_tree->create<sensor_value_t>(mb_path / "sensors" / name)
- .set_publisher(boost::bind(&gps_ctrl::get_sensor, _mbc[mb].gps, name));
+ .set_publisher(std::bind(&gps_ctrl::get_sensor, _mbc[mb].gps, name));
}
}
else
@@ -551,9 +549,9 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
// and do the misc mboard sensors
////////////////////////////////////////////////////////////////
_tree->create<sensor_value_t>(mb_path / "sensors/mimo_locked")
- .set_publisher(boost::bind(&usrp2_impl::get_mimo_locked, this, mb));
+ .set_publisher(std::bind(&usrp2_impl::get_mimo_locked, this, mb));
_tree->create<sensor_value_t>(mb_path / "sensors/ref_locked")
- .set_publisher(boost::bind(&usrp2_impl::get_ref_locked, this, mb));
+ .set_publisher(std::bind(&usrp2_impl::get_ref_locked, this, mb));
////////////////////////////////////////////////////////////////
// create frontend control objects
@@ -566,27 +564,27 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
);
_tree->create<subdev_spec_t>(mb_path / "rx_subdev_spec")
- .add_coerced_subscriber(boost::bind(&usrp2_impl::update_rx_subdev_spec, this, mb, _1));
+ .add_coerced_subscriber(std::bind(&usrp2_impl::update_rx_subdev_spec, this, mb, std::placeholders::_1));
_tree->create<subdev_spec_t>(mb_path / "tx_subdev_spec")
- .add_coerced_subscriber(boost::bind(&usrp2_impl::update_tx_subdev_spec, this, mb, _1));
+ .add_coerced_subscriber(std::bind(&usrp2_impl::update_tx_subdev_spec, this, mb, std::placeholders::_1));
const fs_path rx_fe_path = mb_path / "rx_frontends" / "A";
const fs_path tx_fe_path = mb_path / "tx_frontends" / "A";
_tree->create<std::complex<double> >(rx_fe_path / "dc_offset" / "value")
- .set_coercer(boost::bind(&rx_frontend_core_200::set_dc_offset, _mbc[mb].rx_fe, _1))
+ .set_coercer(std::bind(&rx_frontend_core_200::set_dc_offset, _mbc[mb].rx_fe, std::placeholders::_1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<bool>(rx_fe_path / "dc_offset" / "enable")
- .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, _mbc[mb].rx_fe, _1))
+ .add_coerced_subscriber(std::bind(&rx_frontend_core_200::set_dc_offset_auto, _mbc[mb].rx_fe, std::placeholders::_1))
.set(true);
_tree->create<std::complex<double> >(rx_fe_path / "iq_balance" / "value")
- .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_iq_balance, _mbc[mb].rx_fe, _1))
+ .add_coerced_subscriber(std::bind(&rx_frontend_core_200::set_iq_balance, _mbc[mb].rx_fe, std::placeholders::_1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<std::complex<double> >(tx_fe_path / "dc_offset" / "value")
- .set_coercer(boost::bind(&tx_frontend_core_200::set_dc_offset, _mbc[mb].tx_fe, _1))
+ .set_coercer(std::bind(&tx_frontend_core_200::set_dc_offset, _mbc[mb].tx_fe, std::placeholders::_1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<std::complex<double> >(tx_fe_path / "iq_balance" / "value")
- .add_coerced_subscriber(boost::bind(&tx_frontend_core_200::set_iq_balance, _mbc[mb].tx_fe, _1))
+ .add_coerced_subscriber(std::bind(&tx_frontend_core_200::set_iq_balance, _mbc[mb].tx_fe, std::placeholders::_1))
.set(std::complex<double>(0.0, 0.0));
////////////////////////////////////////////////////////////////
@@ -601,20 +599,20 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
for (size_t dspno = 0; dspno < _mbc[mb].rx_dsps.size(); dspno++){
_mbc[mb].rx_dsps[dspno]->set_link_rate(USRP2_LINK_RATE_BPS);
_tree->access<double>(mb_path / "tick_rate")
- .add_coerced_subscriber(boost::bind(&rx_dsp_core_200::set_tick_rate, _mbc[mb].rx_dsps[dspno], _1));
+ .add_coerced_subscriber(std::bind(&rx_dsp_core_200::set_tick_rate, _mbc[mb].rx_dsps[dspno], std::placeholders::_1));
fs_path rx_dsp_path = mb_path / str(boost::format("rx_dsps/%u") % dspno);
_tree->create<meta_range_t>(rx_dsp_path / "rate/range")
- .set_publisher(boost::bind(&rx_dsp_core_200::get_host_rates, _mbc[mb].rx_dsps[dspno]));
+ .set_publisher(std::bind(&rx_dsp_core_200::get_host_rates, _mbc[mb].rx_dsps[dspno]));
_tree->create<double>(rx_dsp_path / "rate/value")
.set(1e6) //some default
- .set_coercer(boost::bind(&rx_dsp_core_200::set_host_rate, _mbc[mb].rx_dsps[dspno], _1))
- .add_coerced_subscriber(boost::bind(&usrp2_impl::update_rx_samp_rate, this, mb, dspno, _1));
+ .set_coercer(std::bind(&rx_dsp_core_200::set_host_rate, _mbc[mb].rx_dsps[dspno], std::placeholders::_1))
+ .add_coerced_subscriber(std::bind(&usrp2_impl::update_rx_samp_rate, this, mb, dspno, std::placeholders::_1));
_tree->create<double>(rx_dsp_path / "freq/value")
- .set_coercer(boost::bind(&rx_dsp_core_200::set_freq, _mbc[mb].rx_dsps[dspno], _1));
+ .set_coercer(std::bind(&rx_dsp_core_200::set_freq, _mbc[mb].rx_dsps[dspno], std::placeholders::_1));
_tree->create<meta_range_t>(rx_dsp_path / "freq/range")
- .set_publisher(boost::bind(&rx_dsp_core_200::get_freq_range, _mbc[mb].rx_dsps[dspno]));
+ .set_publisher(std::bind(&rx_dsp_core_200::get_freq_range, _mbc[mb].rx_dsps[dspno]));
_tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd")
- .add_coerced_subscriber(boost::bind(&rx_dsp_core_200::issue_stream_command, _mbc[mb].rx_dsps[dspno], _1));
+ .add_coerced_subscriber(std::bind(&rx_dsp_core_200::issue_stream_command, _mbc[mb].rx_dsps[dspno], std::placeholders::_1));
}
////////////////////////////////////////////////////////////////
@@ -681,22 +679,22 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
_mbc[mb].wbiface, U2_REG_SR_ADDR(SR_TIME64), time64_rb_bases, mimo_clock_sync_delay_cycles
);
_tree->access<double>(mb_path / "tick_rate")
- .add_coerced_subscriber(boost::bind(&time64_core_200::set_tick_rate, _mbc[mb].time64, _1));
+ .add_coerced_subscriber(std::bind(&time64_core_200::set_tick_rate, _mbc[mb].time64, std::placeholders::_1));
_tree->create<time_spec_t>(mb_path / "time/now")
- .set_publisher(boost::bind(&time64_core_200::get_time_now, _mbc[mb].time64))
- .add_coerced_subscriber(boost::bind(&time64_core_200::set_time_now, _mbc[mb].time64, _1));
+ .set_publisher(std::bind(&time64_core_200::get_time_now, _mbc[mb].time64))
+ .add_coerced_subscriber(std::bind(&time64_core_200::set_time_now, _mbc[mb].time64, std::placeholders::_1));
_tree->create<time_spec_t>(mb_path / "time/pps")
- .set_publisher(boost::bind(&time64_core_200::get_time_last_pps, _mbc[mb].time64))
- .add_coerced_subscriber(boost::bind(&time64_core_200::set_time_next_pps, _mbc[mb].time64, _1));
+ .set_publisher(std::bind(&time64_core_200::get_time_last_pps, _mbc[mb].time64))
+ .add_coerced_subscriber(std::bind(&time64_core_200::set_time_next_pps, _mbc[mb].time64, std::placeholders::_1));
//setup time source props
_tree->create<std::string>(mb_path / "time_source/value")
- .add_coerced_subscriber(boost::bind(&time64_core_200::set_time_source, _mbc[mb].time64, _1))
+ .add_coerced_subscriber(std::bind(&time64_core_200::set_time_source, _mbc[mb].time64, std::placeholders::_1))
.set("none");
_tree->create<std::vector<std::string> >(mb_path / "time_source/options")
- .set_publisher(boost::bind(&time64_core_200::get_time_sources, _mbc[mb].time64));
+ .set_publisher(std::bind(&time64_core_200::get_time_sources, _mbc[mb].time64));
//setup reference source props
_tree->create<std::string>(mb_path / "clock_source/value")
- .add_coerced_subscriber(boost::bind(&usrp2_impl::update_clock_source, this, mb, _1))
+ .add_coerced_subscriber(std::bind(&usrp2_impl::update_clock_source, this, mb, std::placeholders::_1))
.set("internal");
std::vector<std::string> clock_sources{"internal", "external", "mimo"};
if (_mbc[mb].gps and _mbc[mb].gps->gps_detected()) {
@@ -711,18 +709,18 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
case usrp2_iface::USRP_N200_R4:
case usrp2_iface::USRP_N210_R4:
_tree->create<time_spec_t>(mb_path / "time/cmd")
- .add_coerced_subscriber(boost::bind(&usrp2_fifo_ctrl::set_time, _mbc[mb].fifo_ctrl, _1));
+ .add_coerced_subscriber(std::bind(&usrp2_fifo_ctrl::set_time, _mbc[mb].fifo_ctrl, std::placeholders::_1));
default: break; //otherwise, do not register
}
_tree->access<double>(mb_path / "tick_rate")
- .add_coerced_subscriber(boost::bind(&usrp2_fifo_ctrl::set_tick_rate, _mbc[mb].fifo_ctrl, _1));
+ .add_coerced_subscriber(std::bind(&usrp2_fifo_ctrl::set_tick_rate, _mbc[mb].fifo_ctrl, std::placeholders::_1));
////////////////////////////////////////////////////////////////////
// create user-defined control objects
////////////////////////////////////////////////////////////////////
_mbc[mb].user = user_settings_core_200::make(_mbc[mb].wbiface, U2_REG_SR_ADDR(SR_USER_REGS));
_tree->create<user_settings_core_200::user_reg_t>(mb_path / "user/regs")
- .add_coerced_subscriber(boost::bind(&user_settings_core_200::set_reg, _mbc[mb].user, _1));
+ .add_coerced_subscriber(std::bind(&user_settings_core_200::set_reg, _mbc[mb].user, std::placeholders::_1));
////////////////////////////////////////////////////////////////
// create dboard control objects
@@ -740,13 +738,13 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
//create the properties and register subscribers
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/rx_eeprom")
.set(rx_db_eeprom)
- .add_coerced_subscriber(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "rx", _1));
+ .add_coerced_subscriber(std::bind(&usrp2_impl::set_db_eeprom, this, mb, "rx", std::placeholders::_1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/tx_eeprom")
.set(tx_db_eeprom)
- .add_coerced_subscriber(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "tx", _1));
+ .add_coerced_subscriber(std::bind(&usrp2_impl::set_db_eeprom, this, mb, "tx", std::placeholders::_1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/gdb_eeprom")
.set(gdb_eeprom)
- .add_coerced_subscriber(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "gdb", _1));
+ .add_coerced_subscriber(std::bind(&usrp2_impl::set_db_eeprom, this, mb, "gdb", std::placeholders::_1));
//create a new dboard interface and manager
_mbc[mb].dboard_manager = dboard_manager::make(
@@ -759,12 +757,12 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
const fs_path db_tx_fe_path = mb_path / "dboards" / "A" / "tx_frontends";
for(const std::string &name: _tree->list(db_tx_fe_path)){
_tree->access<double>(db_tx_fe_path / name / "freq" / "value")
- .add_coerced_subscriber(boost::bind(&usrp2_impl::set_tx_fe_corrections, this, mb, _1));
+ .add_coerced_subscriber(std::bind(&usrp2_impl::set_tx_fe_corrections, this, mb, std::placeholders::_1));
}
const fs_path db_rx_fe_path = mb_path / "dboards" / "A" / "rx_frontends";
for(const std::string &name: _tree->list(db_rx_fe_path)){
_tree->access<double>(db_rx_fe_path / name / "freq" / "value")
- .add_coerced_subscriber(boost::bind(&usrp2_impl::set_rx_fe_corrections, this, mb, _1));
+ .add_coerced_subscriber(std::bind(&usrp2_impl::set_rx_fe_corrections, this, mb, std::placeholders::_1));
}
}