aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp94
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp68
-rw-r--r--host/lib/usrp/common/ad936x_manager.cpp28
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.cpp8
-rw-r--r--host/lib/usrp/cores/rx_frontend_core_200.cpp6
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_3000.cpp8
-rw-r--r--host/lib/usrp/cores/tx_frontend_core_200.cpp4
-rw-r--r--host/lib/usrp/dboard/db_basic_and_lf.cpp4
-rw-r--r--host/lib/usrp/dboard/db_dbsrx.cpp8
-rw-r--r--host/lib/usrp/dboard/db_dbsrx2.cpp8
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp14
-rw-r--r--host/lib/usrp/dboard/db_sbx_common.cpp16
-rw-r--r--host/lib/usrp/dboard/db_tvrx.cpp4
-rw-r--r--host/lib/usrp/dboard/db_tvrx2.cpp14
-rw-r--r--host/lib/usrp/dboard/db_ubx.cpp20
-rw-r--r--host/lib/usrp/dboard/db_wbx_common.cpp8
-rw-r--r--host/lib/usrp/dboard/db_wbx_simple.cpp4
-rw-r--r--host/lib/usrp/dboard/db_wbx_version2.cpp8
-rw-r--r--host/lib/usrp/dboard/db_wbx_version3.cpp8
-rw-r--r--host/lib/usrp/dboard/db_wbx_version4.cpp8
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp22
-rw-r--r--host/lib/usrp/e100/e100_impl.cpp94
-rw-r--r--host/lib/usrp/e300/e300_impl.cpp58
-rw-r--r--host/lib/usrp/n230/n230_impl.cpp78
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp52
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp88
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp60
-rw-r--r--host/lib/usrp_clock/octoclock/octoclock_impl.cpp14
28 files changed, 403 insertions, 403 deletions
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index c4279913c..793387fca 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -281,7 +281,7 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
_tree->create<std::string>(mb_path / "name").set("B100");
_tree->create<std::string>(mb_path / "codename").set("B-Hundo");
_tree->create<std::string>(mb_path / "load_eeprom")
- .subscribe(boost::bind(&fx2_ctrl::usrp_load_eeprom, _fx2_ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&fx2_ctrl::usrp_load_eeprom, _fx2_ctrl, _1));
////////////////////////////////////////////////////////////////////
// setup the mboard eeprom
@@ -289,20 +289,20 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
const mboard_eeprom_t mb_eeprom(*_fx2_ctrl, B100_EEPROM_MAP_KEY);
_tree->create<mboard_eeprom_t>(mb_path / "eeprom")
.set(mb_eeprom)
- .subscribe(boost::bind(&b100_impl::set_mb_eeprom, this, _1));
+ .add_coerced_subscriber(boost::bind(&b100_impl::set_mb_eeprom, this, _1));
////////////////////////////////////////////////////////////////////
// create clock control objects
////////////////////////////////////////////////////////////////////
//^^^ clock created up top, just reg props here... ^^^
_tree->create<double>(mb_path / "tick_rate")
- .publish(boost::bind(&b100_clock_ctrl::get_fpga_clock_rate, _clock_ctrl))
- .subscribe(boost::bind(&fifo_ctrl_excelsior::set_tick_rate, _fifo_ctrl, _1))
- .subscribe(boost::bind(&b100_impl::update_tick_rate, this, _1));
+ .set_publisher(boost::bind(&b100_clock_ctrl::get_fpga_clock_rate, _clock_ctrl))
+ .add_coerced_subscriber(boost::bind(&fifo_ctrl_excelsior::set_tick_rate, _fifo_ctrl, _1))
+ .add_coerced_subscriber(boost::bind(&b100_impl::update_tick_rate, this, _1));
- //subscribe the command time while we are at it
+ //add_coerced_subscriber the command time while we are at it
_tree->create<time_spec_t>(mb_path / "time/cmd")
- .subscribe(boost::bind(&fifo_ctrl_excelsior::set_time, _fifo_ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&fifo_ctrl_excelsior::set_time, _fifo_ctrl, _1));
////////////////////////////////////////////////////////////////////
// create codec control objects
@@ -313,20 +313,20 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
_tree->create<std::string>(rx_codec_path / "name").set("ad9522");
_tree->create<meta_range_t>(rx_codec_path / "gains/pga/range").set(b100_codec_ctrl::rx_pga_gain_range);
_tree->create<double>(rx_codec_path / "gains/pga/value")
- .coerce(boost::bind(&b100_impl::update_rx_codec_gain, this, _1))
+ .set_coercer(boost::bind(&b100_impl::update_rx_codec_gain, this, _1))
.set(0.0);
_tree->create<std::string>(tx_codec_path / "name").set("ad9522");
_tree->create<meta_range_t>(tx_codec_path / "gains/pga/range").set(b100_codec_ctrl::tx_pga_gain_range);
_tree->create<double>(tx_codec_path / "gains/pga/value")
- .subscribe(boost::bind(&b100_codec_ctrl::set_tx_pga_gain, _codec_ctrl, _1))
- .publish(boost::bind(&b100_codec_ctrl::get_tx_pga_gain, _codec_ctrl))
+ .add_coerced_subscriber(boost::bind(&b100_codec_ctrl::set_tx_pga_gain, _codec_ctrl, _1))
+ .set_publisher(boost::bind(&b100_codec_ctrl::get_tx_pga_gain, _codec_ctrl))
.set(0.0);
////////////////////////////////////////////////////////////////////
// and do the misc mboard sensors
////////////////////////////////////////////////////////////////////
_tree->create<sensor_value_t>(mb_path / "sensors/ref_locked")
- .publish(boost::bind(&b100_impl::get_ref_locked, this));
+ .set_publisher(boost::bind(&b100_impl::get_ref_locked, this));
////////////////////////////////////////////////////////////////////
// create frontend control objects
@@ -335,27 +335,27 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
_tx_fe = tx_frontend_core_200::make(_fifo_ctrl, TOREG(SR_TX_FE));
_tree->create<subdev_spec_t>(mb_path / "rx_subdev_spec")
- .subscribe(boost::bind(&b100_impl::update_rx_subdev_spec, this, _1));
+ .add_coerced_subscriber(boost::bind(&b100_impl::update_rx_subdev_spec, this, _1));
_tree->create<subdev_spec_t>(mb_path / "tx_subdev_spec")
- .subscribe(boost::bind(&b100_impl::update_tx_subdev_spec, this, _1));
+ .add_coerced_subscriber(boost::bind(&b100_impl::update_tx_subdev_spec, this, _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")
- .coerce(boost::bind(&rx_frontend_core_200::set_dc_offset, _rx_fe, _1))
+ .set_coercer(boost::bind(&rx_frontend_core_200::set_dc_offset, _rx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<bool>(rx_fe_path / "dc_offset" / "enable")
- .subscribe(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, _rx_fe, _1))
+ .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, _rx_fe, _1))
.set(true);
_tree->create<std::complex<double> >(rx_fe_path / "iq_balance" / "value")
- .subscribe(boost::bind(&rx_frontend_core_200::set_iq_balance, _rx_fe, _1))
+ .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_iq_balance, _rx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<std::complex<double> >(tx_fe_path / "dc_offset" / "value")
- .coerce(boost::bind(&tx_frontend_core_200::set_dc_offset, _tx_fe, _1))
+ .set_coercer(boost::bind(&tx_frontend_core_200::set_dc_offset, _tx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<std::complex<double> >(tx_fe_path / "iq_balance" / "value")
- .subscribe(boost::bind(&tx_frontend_core_200::set_iq_balance, _tx_fe, _1))
+ .add_coerced_subscriber(boost::bind(&tx_frontend_core_200::set_iq_balance, _tx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
////////////////////////////////////////////////////////////////////
@@ -374,20 +374,20 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
_rx_dsps[dspno]->set_link_rate(B100_LINK_RATE_BPS);
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&rx_dsp_core_200::set_tick_rate, _rx_dsps[dspno], _1));
+ .add_coerced_subscriber(boost::bind(&rx_dsp_core_200::set_tick_rate, _rx_dsps[dspno], _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")
- .publish(boost::bind(&rx_dsp_core_200::get_host_rates, _rx_dsps[dspno]));
+ .set_publisher(boost::bind(&rx_dsp_core_200::get_host_rates, _rx_dsps[dspno]));
_tree->create<double>(rx_dsp_path / "rate/value")
.set(1e6) //some default
- .coerce(boost::bind(&rx_dsp_core_200::set_host_rate, _rx_dsps[dspno], _1))
- .subscribe(boost::bind(&b100_impl::update_rx_samp_rate, this, dspno, _1));
+ .set_coercer(boost::bind(&rx_dsp_core_200::set_host_rate, _rx_dsps[dspno], _1))
+ .add_coerced_subscriber(boost::bind(&b100_impl::update_rx_samp_rate, this, dspno, _1));
_tree->create<double>(rx_dsp_path / "freq/value")
- .coerce(boost::bind(&rx_dsp_core_200::set_freq, _rx_dsps[dspno], _1));
+ .set_coercer(boost::bind(&rx_dsp_core_200::set_freq, _rx_dsps[dspno], _1));
_tree->create<meta_range_t>(rx_dsp_path / "freq/range")
- .publish(boost::bind(&rx_dsp_core_200::get_freq_range, _rx_dsps[dspno]));
+ .set_publisher(boost::bind(&rx_dsp_core_200::get_freq_range, _rx_dsps[dspno]));
_tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd")
- .subscribe(boost::bind(&rx_dsp_core_200::issue_stream_command, _rx_dsps[dspno], _1));
+ .add_coerced_subscriber(boost::bind(&rx_dsp_core_200::issue_stream_command, _rx_dsps[dspno], _1));
}
////////////////////////////////////////////////////////////////////
@@ -398,17 +398,17 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
);
_tx_dsp->set_link_rate(B100_LINK_RATE_BPS);
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&tx_dsp_core_200::set_tick_rate, _tx_dsp, _1));
+ .add_coerced_subscriber(boost::bind(&tx_dsp_core_200::set_tick_rate, _tx_dsp, _1));
_tree->create<meta_range_t>(mb_path / "tx_dsps/0/rate/range")
- .publish(boost::bind(&tx_dsp_core_200::get_host_rates, _tx_dsp));
+ .set_publisher(boost::bind(&tx_dsp_core_200::get_host_rates, _tx_dsp));
_tree->create<double>(mb_path / "tx_dsps/0/rate/value")
.set(1e6) //some default
- .coerce(boost::bind(&tx_dsp_core_200::set_host_rate, _tx_dsp, _1))
- .subscribe(boost::bind(&b100_impl::update_tx_samp_rate, this, 0, _1));
+ .set_coercer(boost::bind(&tx_dsp_core_200::set_host_rate, _tx_dsp, _1))
+ .add_coerced_subscriber(boost::bind(&b100_impl::update_tx_samp_rate, this, 0, _1));
_tree->create<double>(mb_path / "tx_dsps/0/freq/value")
- .coerce(boost::bind(&tx_dsp_core_200::set_freq, _tx_dsp, _1));
+ .set_coercer(boost::bind(&tx_dsp_core_200::set_freq, _tx_dsp, _1));
_tree->create<meta_range_t>(mb_path / "tx_dsps/0/freq/range")
- .publish(boost::bind(&tx_dsp_core_200::get_freq_range, _tx_dsp));
+ .set_publisher(boost::bind(&tx_dsp_core_200::get_freq_range, _tx_dsp));
////////////////////////////////////////////////////////////////////
// create time control objects
@@ -422,21 +422,21 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
_fifo_ctrl, TOREG(SR_TIME64), time64_rb_bases
);
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&time64_core_200::set_tick_rate, _time64, _1));
+ .add_coerced_subscriber(boost::bind(&time64_core_200::set_tick_rate, _time64, _1));
_tree->create<time_spec_t>(mb_path / "time/now")
- .publish(boost::bind(&time64_core_200::get_time_now, _time64))
- .subscribe(boost::bind(&time64_core_200::set_time_now, _time64, _1));
+ .set_publisher(boost::bind(&time64_core_200::get_time_now, _time64))
+ .add_coerced_subscriber(boost::bind(&time64_core_200::set_time_now, _time64, _1));
_tree->create<time_spec_t>(mb_path / "time/pps")
- .publish(boost::bind(&time64_core_200::get_time_last_pps, _time64))
- .subscribe(boost::bind(&time64_core_200::set_time_next_pps, _time64, _1));
+ .set_publisher(boost::bind(&time64_core_200::get_time_last_pps, _time64))
+ .add_coerced_subscriber(boost::bind(&time64_core_200::set_time_next_pps, _time64, _1));
//setup time source props
_tree->create<std::string>(mb_path / "time_source/value")
- .subscribe(boost::bind(&time64_core_200::set_time_source, _time64, _1));
+ .add_coerced_subscriber(boost::bind(&time64_core_200::set_time_source, _time64, _1));
_tree->create<std::vector<std::string> >(mb_path / "time_source/options")
- .publish(boost::bind(&time64_core_200::get_time_sources, _time64));
+ .set_publisher(boost::bind(&time64_core_200::get_time_sources, _time64));
//setup reference source props
_tree->create<std::string>(mb_path / "clock_source/value")
- .subscribe(boost::bind(&b100_impl::update_clock_source, this, _1));
+ .add_coerced_subscriber(boost::bind(&b100_impl::update_clock_source, this, _1));
static const std::vector<std::string> clock_sources = boost::assign::list_of("internal")("external")("auto");
_tree->create<std::vector<std::string> >(mb_path / "clock_source/options").set(clock_sources);
@@ -445,7 +445,7 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
////////////////////////////////////////////////////////////////////
_user = user_settings_core_200::make(_fifo_ctrl, TOREG(SR_USER_REGS));
_tree->create<user_settings_core_200::user_reg_t>(mb_path / "user/regs")
- .subscribe(boost::bind(&user_settings_core_200::set_reg, _user, _1));
+ .add_coerced_subscriber(boost::bind(&user_settings_core_200::set_reg, _user, _1));
////////////////////////////////////////////////////////////////////
// create dboard control objects
@@ -463,13 +463,13 @@ b100_impl::b100_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)
- .subscribe(boost::bind(&b100_impl::set_db_eeprom, this, "rx", _1));
+ .add_coerced_subscriber(boost::bind(&b100_impl::set_db_eeprom, this, "rx", _1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/tx_eeprom")
.set(tx_db_eeprom)
- .subscribe(boost::bind(&b100_impl::set_db_eeprom, this, "tx", _1));
+ .add_coerced_subscriber(boost::bind(&b100_impl::set_db_eeprom, this, "tx", _1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/gdb_eeprom")
.set(gdb_eeprom)
- .subscribe(boost::bind(&b100_impl::set_db_eeprom, this, "gdb", _1));
+ .add_coerced_subscriber(boost::bind(&b100_impl::set_db_eeprom, this, "gdb", _1));
//create a new dboard interface and manager
_dboard_iface = make_b100_dboard_iface(_fifo_ctrl, _fpga_i2c_ctrl, _fifo_ctrl/*spi*/, _clock_ctrl, _codec_ctrl);
@@ -483,12 +483,12 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
const fs_path db_tx_fe_path = mb_path / "dboards" / "A" / "tx_frontends";
BOOST_FOREACH(const std::string &name, _tree->list(db_tx_fe_path)){
_tree->access<double>(db_tx_fe_path / name / "freq" / "value")
- .subscribe(boost::bind(&b100_impl::set_tx_fe_corrections, this, _1));
+ .add_coerced_subscriber(boost::bind(&b100_impl::set_tx_fe_corrections, this, _1));
}
const fs_path db_rx_fe_path = mb_path / "dboards" / "A" / "rx_frontends";
BOOST_FOREACH(const std::string &name, _tree->list(db_rx_fe_path)){
_tree->access<double>(db_rx_fe_path / name / "freq" / "value")
- .subscribe(boost::bind(&b100_impl::set_rx_fe_corrections, this, _1));
+ .add_coerced_subscriber(boost::bind(&b100_impl::set_rx_fe_corrections, this, _1));
}
//initialize io handling
@@ -503,8 +503,8 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
////////////////////////////////////////////////////////////////////
this->update_rates();
- _tree->access<double>(mb_path / "tick_rate") //now subscribe the clock rate setter
- .subscribe(boost::bind(&b100_clock_ctrl::set_fpga_clock_rate, _clock_ctrl, _1));
+ _tree->access<double>(mb_path / "tick_rate") //now add_coerced_subscriber the clock rate setter
+ .add_coerced_subscriber(boost::bind(&b100_clock_ctrl::set_fpga_clock_rate, _clock_ctrl, _1));
//reset cordic rates and their properties to zero
BOOST_FOREACH(const std::string &name, _tree->list(mb_path / "rx_dsps")){
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 62690f09f..61d71644b 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -362,7 +362,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
const mboard_eeprom_t mb_eeprom(*_iface, "B200");
_tree->create<mboard_eeprom_t>(mb_path / "eeprom")
.set(mb_eeprom)
- .subscribe(boost::bind(&b200_impl::set_mb_eeprom, this, _1));
+ .add_coerced_subscriber(boost::bind(&b200_impl::set_mb_eeprom, this, _1));
////////////////////////////////////////////////////////////////////
// Identify the device type
@@ -500,7 +500,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
BOOST_FOREACH(const std::string &name, _gps->get_sensors())
{
_tree->create<sensor_value_t>(mb_path / "sensors" / name)
- .publish(boost::bind(&gps_ctrl::get_sensor, _gps, name));
+ .set_publisher(boost::bind(&gps_ctrl::get_sensor, _gps, name));
}
}
else
@@ -577,9 +577,9 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
// create clock control objects
////////////////////////////////////////////////////////////////////
_tree->create<double>(mb_path / "tick_rate")
- .coerce(boost::bind(&b200_impl::set_tick_rate, this, _1))
- .publish(boost::bind(&b200_impl::get_tick_rate, this))
- .subscribe(boost::bind(&b200_impl::update_tick_rate, this, _1));
+ .set_coercer(boost::bind(&b200_impl::set_tick_rate, this, _1))
+ .set_publisher(boost::bind(&b200_impl::get_tick_rate, this))
+ .add_coerced_subscriber(boost::bind(&b200_impl::update_tick_rate, this, _1));
_tree->create<time_spec_t>(mb_path / "time" / "cmd");
_tree->create<bool>(mb_path / "auto_tick_rate").set(false);
@@ -587,7 +587,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
// and do the misc mboard sensors
////////////////////////////////////////////////////////////////////
_tree->create<sensor_value_t>(mb_path / "sensors" / "ref_locked")
- .publish(boost::bind(&b200_impl::get_ref_locked, this));
+ .set_publisher(boost::bind(&b200_impl::get_ref_locked, this));
////////////////////////////////////////////////////////////////////
// create frontend mapping
@@ -596,13 +596,13 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
_tree->create<std::vector<size_t> >(mb_path / "rx_chan_dsp_mapping").set(default_map);
_tree->create<std::vector<size_t> >(mb_path / "tx_chan_dsp_mapping").set(default_map);
_tree->create<subdev_spec_t>(mb_path / "rx_subdev_spec")
- .coerce(boost::bind(&b200_impl::coerce_subdev_spec, this, _1))
+ .set_coercer(boost::bind(&b200_impl::coerce_subdev_spec, this, _1))
.set(subdev_spec_t())
- .subscribe(boost::bind(&b200_impl::update_subdev_spec, this, "rx", _1));
+ .add_coerced_subscriber(boost::bind(&b200_impl::update_subdev_spec, this, "rx", _1));
_tree->create<subdev_spec_t>(mb_path / "tx_subdev_spec")
- .coerce(boost::bind(&b200_impl::coerce_subdev_spec, this, _1))
+ .set_coercer(boost::bind(&b200_impl::coerce_subdev_spec, this, _1))
.set(subdev_spec_t())
- .subscribe(boost::bind(&b200_impl::update_subdev_spec, this, "tx", _1));
+ .add_coerced_subscriber(boost::bind(&b200_impl::update_subdev_spec, this, "tx", _1));
////////////////////////////////////////////////////////////////////
// setup radio control
@@ -626,18 +626,18 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
//register time now and pps onto available radio cores
_tree->create<time_spec_t>(mb_path / "time" / "now")
- .publish(boost::bind(&time_core_3000::get_time_now, _radio_perifs[0].time64))
- .subscribe(boost::bind(&b200_impl::set_time, this, _1))
+ .set_publisher(boost::bind(&time_core_3000::get_time_now, _radio_perifs[0].time64))
+ .add_coerced_subscriber(boost::bind(&b200_impl::set_time, this, _1))
.set(0.0);
//re-sync the times when the tick rate changes
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&b200_impl::sync_times, this));
+ .add_coerced_subscriber(boost::bind(&b200_impl::sync_times, this));
_tree->create<time_spec_t>(mb_path / "time" / "pps")
- .publish(boost::bind(&time_core_3000::get_time_last_pps, _radio_perifs[0].time64));
+ .set_publisher(boost::bind(&time_core_3000::get_time_last_pps, _radio_perifs[0].time64));
BOOST_FOREACH(radio_perifs_t &perif, _radio_perifs)
{
_tree->access<time_spec_t>(mb_path / "time" / "pps")
- .subscribe(boost::bind(&time_core_3000::set_time_next_pps, perif.time64, _1));
+ .add_coerced_subscriber(boost::bind(&time_core_3000::set_time_next_pps, perif.time64, _1));
}
//setup time source props
@@ -647,8 +647,8 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
_tree->create<std::vector<std::string> >(mb_path / "time_source" / "options")
.set(time_sources);
_tree->create<std::string>(mb_path / "time_source" / "value")
- .coerce(boost::bind(&check_option_valid, "time source", time_sources, _1))
- .subscribe(boost::bind(&b200_impl::update_time_source, this, _1));
+ .set_coercer(boost::bind(&check_option_valid, "time source", time_sources, _1))
+ .add_coerced_subscriber(boost::bind(&b200_impl::update_time_source, this, _1));
//setup reference source props
static const std::vector<std::string> clock_sources = (_gpsdo_capable) ?
boost::assign::list_of("internal")("external")("gpsdo") :
@@ -656,8 +656,8 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
_tree->create<std::vector<std::string> >(mb_path / "clock_source" / "options")
.set(clock_sources);
_tree->create<std::string>(mb_path / "clock_source" / "value")
- .coerce(boost::bind(&check_option_valid, "clock source", clock_sources, _1))
- .subscribe(boost::bind(&b200_impl::update_clock_source, this, _1));
+ .set_coercer(boost::bind(&check_option_valid, "clock source", clock_sources, _1))
+ .add_coerced_subscriber(boost::bind(&b200_impl::update_clock_source, this, _1));
////////////////////////////////////////////////////////////////////
// front panel gpio
@@ -667,10 +667,10 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
{
_tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / attr.second)
.set(0)
- .subscribe(boost::bind(&gpio_atr_3000::set_gpio_attr, _radio_perifs[0].fp_gpio, attr.first, _1));
+ .add_coerced_subscriber(boost::bind(&gpio_atr_3000::set_gpio_attr, _radio_perifs[0].fp_gpio, attr.first, _1));
}
_tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "READBACK")
- .publish(boost::bind(&gpio_atr_3000::read_gpio, _radio_perifs[0].fp_gpio));
+ .set_publisher(boost::bind(&gpio_atr_3000::read_gpio, _radio_perifs[0].fp_gpio));
////////////////////////////////////////////////////////////////////
// dboard eeproms but not really
@@ -749,9 +749,9 @@ void b200_impl::setup_radio(const size_t dspno)
perif.ctrl->hold_task(_async_task);
_async_task_data->radio_ctrl[dspno] = perif.ctrl; //weak
_tree->access<time_spec_t>(mb_path / "time" / "cmd")
- .subscribe(boost::bind(&radio_ctrl_core_3000::set_time, perif.ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&radio_ctrl_core_3000::set_time, perif.ctrl, _1));
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&radio_ctrl_core_3000::set_tick_rate, perif.ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&radio_ctrl_core_3000::set_tick_rate, perif.ctrl, _1));
this->register_loopback_self_test(perif.ctrl);
////////////////////////////////////////////////////////////////////
@@ -782,27 +782,27 @@ void b200_impl::setup_radio(const size_t dspno)
// connect rx dsp control objects
////////////////////////////////////////////////////////////////////
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&rx_vita_core_3000::set_tick_rate, perif.framer, _1))
- .subscribe(boost::bind(&rx_dsp_core_3000::set_tick_rate, perif.ddc, _1));
+ .add_coerced_subscriber(boost::bind(&rx_vita_core_3000::set_tick_rate, perif.framer, _1))
+ .add_coerced_subscriber(boost::bind(&rx_dsp_core_3000::set_tick_rate, perif.ddc, _1));
const fs_path rx_dsp_path = mb_path / "rx_dsps" / dspno;
perif.ddc->populate_subtree(_tree->subtree(rx_dsp_path));
_tree->access<double>(rx_dsp_path / "rate" / "value")
- .coerce(boost::bind(&b200_impl::coerce_rx_samp_rate, this, perif.ddc, dspno, _1))
- .subscribe(boost::bind(&b200_impl::update_rx_samp_rate, this, dspno, _1))
+ .set_coercer(boost::bind(&b200_impl::coerce_rx_samp_rate, this, perif.ddc, dspno, _1))
+ .add_coerced_subscriber(boost::bind(&b200_impl::update_rx_samp_rate, this, dspno, _1))
;
_tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd")
- .subscribe(boost::bind(&rx_vita_core_3000::issue_stream_command, perif.framer, _1));
+ .add_coerced_subscriber(boost::bind(&rx_vita_core_3000::issue_stream_command, perif.framer, _1));
////////////////////////////////////////////////////////////////////
// create tx dsp control objects
////////////////////////////////////////////////////////////////////
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&tx_dsp_core_3000::set_tick_rate, perif.duc, _1));
+ .add_coerced_subscriber(boost::bind(&tx_dsp_core_3000::set_tick_rate, perif.duc, _1));
const fs_path tx_dsp_path = mb_path / "tx_dsps" / dspno;
perif.duc->populate_subtree(_tree->subtree(tx_dsp_path));
_tree->access<double>(tx_dsp_path / "rate" / "value")
- .coerce(boost::bind(&b200_impl::coerce_tx_samp_rate, this, perif.duc, dspno, _1))
- .subscribe(boost::bind(&b200_impl::update_tx_samp_rate, this, dspno, _1))
+ .set_coercer(boost::bind(&b200_impl::coerce_tx_samp_rate, this, perif.duc, dspno, _1))
+ .add_coerced_subscriber(boost::bind(&b200_impl::update_tx_samp_rate, this, dspno, _1))
;
////////////////////////////////////////////////////////////////////
@@ -822,17 +822,17 @@ void b200_impl::setup_radio(const size_t dspno)
// Now connect all the b200_impl-specific items
_tree->create<sensor_value_t>(rf_fe_path / "sensors" / "lo_locked")
- .publish(boost::bind(&b200_impl::get_fe_pll_locked, this, dir == TX_DIRECTION))
+ .set_publisher(boost::bind(&b200_impl::get_fe_pll_locked, this, dir == TX_DIRECTION))
;
_tree->access<double>(rf_fe_path / "freq" / "value")
- .subscribe(boost::bind(&b200_impl::update_bandsel, this, key, _1))
+ .add_coerced_subscriber(boost::bind(&b200_impl::update_bandsel, this, key, _1))
;
if (dir == RX_DIRECTION)
{
static const std::vector<std::string> ants = boost::assign::list_of("TX/RX")("RX2");
_tree->create<std::vector<std::string> >(rf_fe_path / "antenna" / "options").set(ants);
_tree->create<std::string>(rf_fe_path / "antenna" / "value")
- .subscribe(boost::bind(&b200_impl::update_antenna_sel, this, dspno, _1))
+ .add_coerced_subscriber(boost::bind(&b200_impl::update_antenna_sel, this, dspno, _1))
.set("RX2")
;
diff --git a/host/lib/usrp/common/ad936x_manager.cpp b/host/lib/usrp/common/ad936x_manager.cpp
index de8c4c7ab..58893395e 100644
--- a/host/lib/usrp/common/ad936x_manager.cpp
+++ b/host/lib/usrp/common/ad936x_manager.cpp
@@ -211,11 +211,11 @@ class ad936x_manager_impl : public ad936x_manager
// Sensors
subtree->create<sensor_value_t>("sensors/temp")
- .publish(boost::bind(&ad9361_ctrl::get_temperature, _codec_ctrl))
+ .set_publisher(boost::bind(&ad9361_ctrl::get_temperature, _codec_ctrl))
;
if (dir == RX_DIRECTION) {
subtree->create<sensor_value_t>("sensors/rssi")
- .publish(boost::bind(&ad9361_ctrl::get_rssi, _codec_ctrl, key))
+ .set_publisher(boost::bind(&ad9361_ctrl::get_rssi, _codec_ctrl, key))
;
}
@@ -226,7 +226,7 @@ class ad936x_manager_impl : public ad936x_manager
.set(ad9361_ctrl::get_gain_range(key));
subtree->create<double>(uhd::fs_path("gains") / name / "value")
.set(ad936x_manager::DEFAULT_GAIN)
- .coerce(boost::bind(&ad9361_ctrl::set_gain, _codec_ctrl, key, _1))
+ .set_coercer(boost::bind(&ad9361_ctrl::set_gain, _codec_ctrl, key, _1))
;
}
@@ -238,19 +238,19 @@ class ad936x_manager_impl : public ad936x_manager
// Analog Bandwidths
subtree->create<double>("bandwidth/value")
.set(ad936x_manager::DEFAULT_BANDWIDTH)
- .coerce(boost::bind(&ad9361_ctrl::set_bw_filter, _codec_ctrl, key, _1))
+ .set_coercer(boost::bind(&ad9361_ctrl::set_bw_filter, _codec_ctrl, key, _1))
;
subtree->create<meta_range_t>("bandwidth/range")
- .publish(boost::bind(&ad9361_ctrl::get_bw_filter_range, key))
+ .set_publisher(boost::bind(&ad9361_ctrl::get_bw_filter_range, key))
;
// LO Tuning
subtree->create<meta_range_t>("freq/range")
- .publish(boost::bind(&ad9361_ctrl::get_rf_freq_range))
+ .set_publisher(boost::bind(&ad9361_ctrl::get_rf_freq_range))
;
subtree->create<double>("freq/value")
- .publish(boost::bind(&ad9361_ctrl::get_freq, _codec_ctrl, key))
- .coerce(boost::bind(&ad9361_ctrl::tune, _codec_ctrl, key, _1))
+ .set_publisher(boost::bind(&ad9361_ctrl::get_freq, _codec_ctrl, key))
+ .set_coercer(boost::bind(&ad9361_ctrl::tune, _codec_ctrl, key, _1))
;
// Frontend corrections
@@ -258,21 +258,21 @@ class ad936x_manager_impl : public ad936x_manager
{
subtree->create<bool>("dc_offset/enable" )
.set(ad936x_manager::DEFAULT_AUTO_DC_OFFSET)
- .subscribe(boost::bind(&ad9361_ctrl::set_dc_offset_auto, _codec_ctrl, key, _1))
+ .add_coerced_subscriber(boost::bind(&ad9361_ctrl::set_dc_offset_auto, _codec_ctrl, key, _1))
;
subtree->create<bool>("iq_balance/enable" )
.set(ad936x_manager::DEFAULT_AUTO_IQ_BALANCE)
- .subscribe(boost::bind(&ad9361_ctrl::set_iq_balance_auto, _codec_ctrl, key, _1))
+ .add_coerced_subscriber(boost::bind(&ad9361_ctrl::set_iq_balance_auto, _codec_ctrl, key, _1))
;
// AGC setup
const std::list<std::string> mode_strings = boost::assign::list_of("slow")("fast");
subtree->create<bool>("gain/agc/enable")
.set(DEFAULT_AGC_ENABLE)
- .subscribe(boost::bind((&ad9361_ctrl::set_agc), _codec_ctrl, key, _1))
+ .add_coerced_subscriber(boost::bind((&ad9361_ctrl::set_agc), _codec_ctrl, key, _1))
;
subtree->create<std::string>("gain/agc/mode/value")
- .subscribe(boost::bind((&ad9361_ctrl::set_agc_mode), _codec_ctrl, key, _1)).set(mode_strings.front())
+ .add_coerced_subscriber(boost::bind((&ad9361_ctrl::set_agc_mode), _codec_ctrl, key, _1)).set(mode_strings.front())
;
subtree->create< std::list<std::string> >("gain/agc/mode/options")
.set(mode_strings)
@@ -282,8 +282,8 @@ class ad936x_manager_impl : public ad936x_manager
// Frontend filters
BOOST_FOREACH(const std::string &filter_name, _codec_ctrl->get_filter_names(key)) {
subtree->create<filter_info_base::sptr>(uhd::fs_path("filters") / filter_name / "value" )
- .publish(boost::bind(&ad9361_ctrl::get_filter, _codec_ctrl, key, filter_name))
- .subscribe(boost::bind(&ad9361_ctrl::set_filter, _codec_ctrl, key, filter_name, _1));
+ .set_publisher(boost::bind(&ad9361_ctrl::get_filter, _codec_ctrl, key, filter_name))
+ .add_coerced_subscriber(boost::bind(&ad9361_ctrl::set_filter, _codec_ctrl, key, filter_name, _1));
}
}
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
index 27e55ac51..0c11c5a12 100644
--- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
@@ -253,18 +253,18 @@ public:
void populate_subtree(property_tree::sptr subtree)
{
subtree->create<meta_range_t>("rate/range")
- .publish(boost::bind(&rx_dsp_core_3000::get_host_rates, this))
+ .set_publisher(boost::bind(&rx_dsp_core_3000::get_host_rates, this))
;
subtree->create<double>("rate/value")
.set(DEFAULT_RATE)
- .coerce(boost::bind(&rx_dsp_core_3000::set_host_rate, this, _1))
+ .set_coercer(boost::bind(&rx_dsp_core_3000::set_host_rate, this, _1))
;
subtree->create<double>("freq/value")
.set(DEFAULT_CORDIC_FREQ)
- .coerce(boost::bind(&rx_dsp_core_3000::set_freq, this, _1))
+ .set_coercer(boost::bind(&rx_dsp_core_3000::set_freq, this, _1))
;
subtree->create<meta_range_t>("freq/range")
- .publish(boost::bind(&rx_dsp_core_3000::get_freq_range, this))
+ .set_publisher(boost::bind(&rx_dsp_core_3000::get_freq_range, this))
;
}
diff --git a/host/lib/usrp/cores/rx_frontend_core_200.cpp b/host/lib/usrp/cores/rx_frontend_core_200.cpp
index 7ac920553..0a60bf87c 100644
--- a/host/lib/usrp/cores/rx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/rx_frontend_core_200.cpp
@@ -83,15 +83,15 @@ public:
{
subtree->create<std::complex<double> >("dc_offset/value")
.set(DEFAULT_DC_OFFSET_VALUE)
- .coerce(boost::bind(&rx_frontend_core_200::set_dc_offset, this, _1))
+ .set_coercer(boost::bind(&rx_frontend_core_200::set_dc_offset, this, _1))
;
subtree->create<bool>("dc_offset/enable")
.set(DEFAULT_DC_OFFSET_ENABLE)
- .subscribe(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, this, _1))
+ .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, this, _1))
;
subtree->create<std::complex<double> >("iq_balance/value")
.set(DEFAULT_IQ_BALANCE_VALUE)
- .subscribe(boost::bind(&rx_frontend_core_200::set_iq_balance, this, _1))
+ .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_iq_balance, this, _1))
;
}
diff --git a/host/lib/usrp/cores/tx_dsp_core_3000.cpp b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
index 66bcfb6ea..3889bbdc4 100644
--- a/host/lib/usrp/cores/tx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
@@ -180,18 +180,18 @@ public:
void populate_subtree(property_tree::sptr subtree)
{
subtree->create<meta_range_t>("rate/range")
- .publish(boost::bind(&tx_dsp_core_3000::get_host_rates, this))
+ .set_publisher(boost::bind(&tx_dsp_core_3000::get_host_rates, this))
;
subtree->create<double>("rate/value")
.set(DEFAULT_RATE)
- .coerce(boost::bind(&tx_dsp_core_3000::set_host_rate, this, _1))
+ .set_coercer(boost::bind(&tx_dsp_core_3000::set_host_rate, this, _1))
;
subtree->create<double>("freq/value")
.set(DEFAULT_CORDIC_FREQ)
- .coerce(boost::bind(&tx_dsp_core_3000::set_freq, this, _1))
+ .set_coercer(boost::bind(&tx_dsp_core_3000::set_freq, this, _1))
;
subtree->create<meta_range_t>("freq/range")
- .publish(boost::bind(&tx_dsp_core_3000::get_freq_range, this))
+ .set_publisher(boost::bind(&tx_dsp_core_3000::get_freq_range, this))
;
}
diff --git a/host/lib/usrp/cores/tx_frontend_core_200.cpp b/host/lib/usrp/cores/tx_frontend_core_200.cpp
index 0fa028571..be4f77f39 100644
--- a/host/lib/usrp/cores/tx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/tx_frontend_core_200.cpp
@@ -79,11 +79,11 @@ public:
{
subtree->create< std::complex<double> >("dc_offset/value")
.set(DEFAULT_DC_OFFSET_VALUE)
- .coerce(boost::bind(&tx_frontend_core_200::set_dc_offset, this, _1))
+ .set_coercer(boost::bind(&tx_frontend_core_200::set_dc_offset, this, _1))
;
subtree->create< std::complex<double> >("iq_balance/value")
.set(DEFAULT_IQ_BALANCE_VALUE)
- .subscribe(boost::bind(&tx_frontend_core_200::set_iq_balance, this, _1))
+ .add_coerced_subscriber(boost::bind(&tx_frontend_core_200::set_iq_balance, this, _1))
;
}
diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp
index 2b30dab52..4919e39bf 100644
--- a/host/lib/usrp/dboard/db_basic_and_lf.cpp
+++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp
@@ -121,7 +121,7 @@ basic_rx::basic_rx(ctor_args_t args, double max_freq) : rx_dboard_base(args){
this->get_rx_subtree()->create<int>("gains"); //phony property so this dir exists
this->get_rx_subtree()->create<double>("freq/value")
- .publish(&always_zero_freq);
+ .set_publisher(&always_zero_freq);
this->get_rx_subtree()->create<meta_range_t>("freq/range")
.set(freq_range_t(-_max_freq, +_max_freq));
this->get_rx_subtree()->create<std::string>("antenna/value")
@@ -176,7 +176,7 @@ basic_tx::basic_tx(ctor_args_t args, double max_freq) : tx_dboard_base(args){
this->get_tx_subtree()->create<int>("gains"); //phony property so this dir exists
this->get_tx_subtree()->create<double>("freq/value")
- .publish(&always_zero_freq);
+ .set_publisher(&always_zero_freq);
this->get_tx_subtree()->create<meta_range_t>("freq/range")
.set(freq_range_t(-_max_freq, +_max_freq));
this->get_tx_subtree()->create<std::string>("antenna/value")
diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp
index 9d04d8e16..8ef38fd9c 100644
--- a/host/lib/usrp/dboard/db_dbsrx.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx.cpp
@@ -204,16 +204,16 @@ dbsrx::dbsrx(ctor_args_t args) : rx_dboard_base(args){
this->get_rx_subtree()->create<std::string>("name")
.set("DBSRX");
this->get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&dbsrx::get_locked, this));
+ .set_publisher(boost::bind(&dbsrx::get_locked, this));
BOOST_FOREACH(const std::string &name, dbsrx_gain_ranges.keys()){
this->get_rx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&dbsrx::set_gain, this, _1, name))
+ .set_coercer(boost::bind(&dbsrx::set_gain, this, _1, name))
.set(dbsrx_gain_ranges[name].start());
this->get_rx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(dbsrx_gain_ranges[name]);
}
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&dbsrx::set_lo_freq, this, _1));
+ .set_coercer(boost::bind(&dbsrx::set_lo_freq, this, _1));
this->get_rx_subtree()->create<meta_range_t>("freq/range")
.set(dbsrx_freq_range);
this->get_rx_subtree()->create<std::string>("antenna/value")
@@ -227,7 +227,7 @@ dbsrx::dbsrx(ctor_args_t args) : rx_dboard_base(args){
this->get_rx_subtree()->create<bool>("use_lo_offset")
.set(false);
this->get_rx_subtree()->create<double>("bandwidth/value")
- .coerce(boost::bind(&dbsrx::set_bandwidth, this, _1));
+ .set_coercer(boost::bind(&dbsrx::set_bandwidth, this, _1));
this->get_rx_subtree()->create<meta_range_t>("bandwidth/range")
.set(dbsrx_bandwidth_range);
diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp
index 1debe3c8f..7e5f5f617 100644
--- a/host/lib/usrp/dboard/db_dbsrx2.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx2.cpp
@@ -191,16 +191,16 @@ dbsrx2::dbsrx2(ctor_args_t args) : rx_dboard_base(args){
this->get_rx_subtree()->create<std::string>("name")
.set("DBSRX2");
this->get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&dbsrx2::get_locked, this));
+ .set_publisher(boost::bind(&dbsrx2::get_locked, this));
BOOST_FOREACH(const std::string &name, dbsrx2_gain_ranges.keys()){
this->get_rx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&dbsrx2::set_gain, this, _1, name))
+ .set_coercer(boost::bind(&dbsrx2::set_gain, this, _1, name))
.set(dbsrx2_gain_ranges[name].start());
this->get_rx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(dbsrx2_gain_ranges[name]);
}
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&dbsrx2::set_lo_freq, this, _1))
+ .set_coercer(boost::bind(&dbsrx2::set_lo_freq, this, _1))
.set(dbsrx2_freq_range.start());
this->get_rx_subtree()->create<meta_range_t>("freq/range")
.set(dbsrx2_freq_range);
@@ -218,7 +218,7 @@ dbsrx2::dbsrx2(ctor_args_t args) : rx_dboard_base(args){
double codec_rate = this->get_iface()->get_codec_rate(dboard_iface::UNIT_RX);
this->get_rx_subtree()->create<double>("bandwidth/value")
- .coerce(boost::bind(&dbsrx2::set_bandwidth, this, _1))
+ .set_coercer(boost::bind(&dbsrx2::set_bandwidth, this, _1))
.set(2.0*(0.8*codec_rate/2.0)); //bandwidth in lowpass, convert to complex bandpass
//default to anti-alias at different codec_rate
this->get_rx_subtree()->create<meta_range_t>("bandwidth/range")
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index 3e7df9a39..342540275 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -183,20 +183,20 @@ rfx_xcvr::rfx_xcvr(
else this->get_rx_subtree()->create<std::string>("name").set("RFX RX");
this->get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&rfx_xcvr::get_locked, this, dboard_iface::UNIT_RX));
+ .set_publisher(boost::bind(&rfx_xcvr::get_locked, this, dboard_iface::UNIT_RX));
BOOST_FOREACH(const std::string &name, _rx_gain_ranges.keys()){
this->get_rx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&rfx_xcvr::set_rx_gain, this, _1, name))
+ .set_coercer(boost::bind(&rfx_xcvr::set_rx_gain, this, _1, name))
.set(_rx_gain_ranges[name].start());
this->get_rx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(_rx_gain_ranges[name]);
}
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&rfx_xcvr::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
+ .set_coercer(boost::bind(&rfx_xcvr::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
.set((_freq_range.start() + _freq_range.stop())/2.0);
this->get_rx_subtree()->create<meta_range_t>("freq/range").set(_freq_range);
this->get_rx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&rfx_xcvr::set_rx_ant, this, _1))
+ .add_coerced_subscriber(boost::bind(&rfx_xcvr::set_rx_ant, this, _1))
.set("RX2");
this->get_rx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(rfx_rx_antennas);
@@ -219,14 +219,14 @@ rfx_xcvr::rfx_xcvr(
else this->get_tx_subtree()->create<std::string>("name").set("RFX TX");
this->get_tx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&rfx_xcvr::get_locked, this, dboard_iface::UNIT_TX));
+ .set_publisher(boost::bind(&rfx_xcvr::get_locked, this, dboard_iface::UNIT_TX));
this->get_tx_subtree()->create<int>("gains"); //phony property so this dir exists
this->get_tx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&rfx_xcvr::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
+ .set_coercer(boost::bind(&rfx_xcvr::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
.set((_freq_range.start() + _freq_range.stop())/2.0);
this->get_tx_subtree()->create<meta_range_t>("freq/range").set(_freq_range);
this->get_tx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&rfx_xcvr::set_tx_ant, this, _1)).set(rfx_tx_antennas.at(0));
+ .add_coerced_subscriber(boost::bind(&rfx_xcvr::set_tx_ant, this, _1)).set(rfx_tx_antennas.at(0));
this->get_tx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(rfx_tx_antennas);
this->get_tx_subtree()->create<std::string>("connection").set("IQ");
diff --git a/host/lib/usrp/dboard/db_sbx_common.cpp b/host/lib/usrp/dboard/db_sbx_common.cpp
index c575bba01..be02cf77a 100644
--- a/host/lib/usrp/dboard/db_sbx_common.cpp
+++ b/host/lib/usrp/dboard/db_sbx_common.cpp
@@ -159,20 +159,20 @@ sbx_xcvr::sbx_xcvr(ctor_args_t args) : xcvr_dboard_base(args){
else this->get_rx_subtree()->create<std::string>("name").set("SBX/CBX RX");
this->get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&sbx_xcvr::get_locked, this, dboard_iface::UNIT_RX));
+ .set_publisher(boost::bind(&sbx_xcvr::get_locked, this, dboard_iface::UNIT_RX));
BOOST_FOREACH(const std::string &name, sbx_rx_gain_ranges.keys()){
this->get_rx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&sbx_xcvr::set_rx_gain, this, _1, name))
+ .set_coercer(boost::bind(&sbx_xcvr::set_rx_gain, this, _1, name))
.set(sbx_rx_gain_ranges[name].start());
this->get_rx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(sbx_rx_gain_ranges[name]);
}
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&sbx_xcvr::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
+ .set_coercer(boost::bind(&sbx_xcvr::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
.set((freq_range.start() + freq_range.stop())/2.0);
this->get_rx_subtree()->create<meta_range_t>("freq/range").set(freq_range);
this->get_rx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&sbx_xcvr::set_rx_ant, this, _1))
+ .add_coerced_subscriber(boost::bind(&sbx_xcvr::set_rx_ant, this, _1))
.set("RX2");
this->get_rx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(sbx_rx_antennas);
@@ -200,20 +200,20 @@ sbx_xcvr::sbx_xcvr(ctor_args_t args) : xcvr_dboard_base(args){
else this->get_tx_subtree()->create<std::string>("name").set("SBX/CBX TX");
this->get_tx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&sbx_xcvr::get_locked, this, dboard_iface::UNIT_TX));
+ .set_publisher(boost::bind(&sbx_xcvr::get_locked, this, dboard_iface::UNIT_TX));
BOOST_FOREACH(const std::string &name, sbx_tx_gain_ranges.keys()){
this->get_tx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&sbx_xcvr::set_tx_gain, this, _1, name))
+ .set_coercer(boost::bind(&sbx_xcvr::set_tx_gain, this, _1, name))
.set(sbx_tx_gain_ranges[name].start());
this->get_tx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(sbx_tx_gain_ranges[name]);
}
this->get_tx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&sbx_xcvr::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
+ .set_coercer(boost::bind(&sbx_xcvr::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
.set((freq_range.start() + freq_range.stop())/2.0);
this->get_tx_subtree()->create<meta_range_t>("freq/range").set(freq_range);
this->get_tx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&sbx_xcvr::set_tx_ant, this, _1))
+ .add_coerced_subscriber(boost::bind(&sbx_xcvr::set_tx_ant, this, _1))
.set(sbx_tx_antennas.at(0));
this->get_tx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(sbx_tx_antennas);
diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp
index e9f60f765..92e9d331c 100644
--- a/host/lib/usrp/dboard/db_tvrx.cpp
+++ b/host/lib/usrp/dboard/db_tvrx.cpp
@@ -190,12 +190,12 @@ tvrx::tvrx(ctor_args_t args) : rx_dboard_base(args){
this->get_rx_subtree()->create<int>("sensors"); //phony property so this dir exists
BOOST_FOREACH(const std::string &name, get_tvrx_gain_ranges().keys()){
this->get_rx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&tvrx::set_gain, this, _1, name));
+ .set_coercer(boost::bind(&tvrx::set_gain, this, _1, name));
this->get_rx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(get_tvrx_gain_ranges()[name]);
}
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&tvrx::set_freq, this, _1));
+ .set_coercer(boost::bind(&tvrx::set_freq, this, _1));
this->get_rx_subtree()->create<meta_range_t>("freq/range")
.set(tvrx_freq_range);
this->get_rx_subtree()->create<std::string>("antenna/value")
diff --git a/host/lib/usrp/dboard/db_tvrx2.cpp b/host/lib/usrp/dboard/db_tvrx2.cpp
index 00c2fef50..d1fdd5508 100644
--- a/host/lib/usrp/dboard/db_tvrx2.cpp
+++ b/host/lib/usrp/dboard/db_tvrx2.cpp
@@ -957,19 +957,19 @@ tvrx2::tvrx2(ctor_args_t args) : rx_dboard_base(args){
this->get_rx_subtree()->create<std::string>("name")
.set("TVRX2");
this->get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&tvrx2::get_locked, this));
+ .set_publisher(boost::bind(&tvrx2::get_locked, this));
this->get_rx_subtree()->create<sensor_value_t>("sensors/rssi")
- .publish(boost::bind(&tvrx2::get_rssi, this));
+ .set_publisher(boost::bind(&tvrx2::get_rssi, this));
this->get_rx_subtree()->create<sensor_value_t>("sensors/temperature")
- .publish(boost::bind(&tvrx2::get_temp, this));
+ .set_publisher(boost::bind(&tvrx2::get_temp, this));
BOOST_FOREACH(const std::string &name, tvrx2_gain_ranges.keys()){
this->get_rx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&tvrx2::set_gain, this, _1, name));
+ .set_coercer(boost::bind(&tvrx2::set_gain, this, _1, name));
this->get_rx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(tvrx2_gain_ranges[name]);
}
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&tvrx2::set_lo_freq, this, _1));
+ .set_coercer(boost::bind(&tvrx2::set_lo_freq, this, _1));
this->get_rx_subtree()->create<meta_range_t>("freq/range")
.set(tvrx2_freq_range);
this->get_rx_subtree()->create<std::string>("antenna/value")
@@ -979,12 +979,12 @@ tvrx2::tvrx2(ctor_args_t args) : rx_dboard_base(args){
this->get_rx_subtree()->create<std::string>("connection")
.set(tvrx2_sd_name_to_conn[get_subdev_name()]);
this->get_rx_subtree()->create<bool>("enabled")
- .coerce(boost::bind(&tvrx2::set_enabled, this, _1))
+ .set_coercer(boost::bind(&tvrx2::set_enabled, this, _1))
.set(_enabled);
this->get_rx_subtree()->create<bool>("use_lo_offset")
.set(false);
this->get_rx_subtree()->create<double>("bandwidth/value")
- .coerce(boost::bind(&tvrx2::set_bandwidth, this, _1))
+ .set_coercer(boost::bind(&tvrx2::set_bandwidth, this, _1))
.set(_bandwidth);
this->get_rx_subtree()->create<meta_range_t>("bandwidth/range")
.set(tvrx2_bandwidth_range);
diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp
index db9f21f43..077cf4a82 100644
--- a/host/lib/usrp/dboard/db_ubx.cpp
+++ b/host/lib/usrp/dboard/db_ubx.cpp
@@ -389,12 +389,12 @@ public:
get_rx_subtree()->create<std::vector<std::string> >("power_mode/options")
.set(ubx_power_modes);
get_rx_subtree()->create<std::string>("power_mode/value")
- .subscribe(boost::bind(&ubx_xcvr::set_power_mode, this, _1))
+ .add_coerced_subscriber(boost::bind(&ubx_xcvr::set_power_mode, this, _1))
.set("performance");
get_rx_subtree()->create<std::vector<std::string> >("xcvr_mode/options")
.set(ubx_xcvr_modes);
get_rx_subtree()->create<std::string>("xcvr_mode/value")
- .subscribe(boost::bind(&ubx_xcvr::set_xcvr_mode, this, _1))
+ .add_coerced_subscriber(boost::bind(&ubx_xcvr::set_xcvr_mode, this, _1))
.set("FDX");
////////////////////////////////////////////////////////////////////
@@ -404,20 +404,20 @@ public:
get_tx_subtree()->create<device_addr_t>("tune_args")
.set(device_addr_t());
get_tx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&ubx_xcvr::get_locked, this, "TXLO"));
+ .set_publisher(boost::bind(&ubx_xcvr::get_locked, this, "TXLO"));
get_tx_subtree()->create<double>("gains/PGA0/value")
- .coerce(boost::bind(&ubx_xcvr::set_tx_gain, this, _1)).set(0);
+ .set_coercer(boost::bind(&ubx_xcvr::set_tx_gain, this, _1)).set(0);
get_tx_subtree()->create<meta_range_t>("gains/PGA0/range")
.set(ubx_tx_gain_range);
get_tx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&ubx_xcvr::set_tx_freq, this, _1))
+ .set_coercer(boost::bind(&ubx_xcvr::set_tx_freq, this, _1))
.set(ubx_freq_range.start());
get_tx_subtree()->create<meta_range_t>("freq/range")
.set(ubx_freq_range);
get_tx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(ubx_tx_antennas);
get_tx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&ubx_xcvr::set_tx_ant, this, _1))
+ .add_coerced_subscriber(boost::bind(&ubx_xcvr::set_tx_ant, this, _1))
.set(ubx_tx_antennas.at(0));
get_tx_subtree()->create<std::string>("connection")
.set("QI");
@@ -437,21 +437,21 @@ public:
get_rx_subtree()->create<device_addr_t>("tune_args")
.set(device_addr_t());
get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&ubx_xcvr::get_locked, this, "RXLO"));
+ .set_publisher(boost::bind(&ubx_xcvr::get_locked, this, "RXLO"));
get_rx_subtree()->create<double>("gains/PGA0/value")
- .coerce(boost::bind(&ubx_xcvr::set_rx_gain, this, _1))
+ .set_coercer(boost::bind(&ubx_xcvr::set_rx_gain, this, _1))
.set(0);
get_rx_subtree()->create<meta_range_t>("gains/PGA0/range")
.set(ubx_rx_gain_range);
get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&ubx_xcvr::set_rx_freq, this, _1))
+ .set_coercer(boost::bind(&ubx_xcvr::set_rx_freq, this, _1))
.set(ubx_freq_range.start());
get_rx_subtree()->create<meta_range_t>("freq/range")
.set(ubx_freq_range);
get_rx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(ubx_rx_antennas);
get_rx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&ubx_xcvr::set_rx_ant, this, _1)).set("RX2");
+ .add_coerced_subscriber(boost::bind(&ubx_xcvr::set_rx_ant, this, _1)).set("RX2");
get_rx_subtree()->create<std::string>("connection")
.set("IQ");
get_rx_subtree()->create<bool>("enabled")
diff --git a/host/lib/usrp/dboard/db_wbx_common.cpp b/host/lib/usrp/dboard/db_wbx_common.cpp
index 97357bc90..0a7e1afa2 100644
--- a/host/lib/usrp/dboard/db_wbx_common.cpp
+++ b/host/lib/usrp/dboard/db_wbx_common.cpp
@@ -69,17 +69,17 @@ wbx_base::wbx_base(ctor_args_t args) : xcvr_dboard_base(args){
this->get_rx_subtree()->create<device_addr_t>("tune_args").set(device_addr_t());
this->get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&wbx_base::get_locked, this, dboard_iface::UNIT_RX));
+ .set_publisher(boost::bind(&wbx_base::get_locked, this, dboard_iface::UNIT_RX));
BOOST_FOREACH(const std::string &name, wbx_rx_gain_ranges.keys()){
this->get_rx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&wbx_base::set_rx_gain, this, _1, name))
+ .set_coercer(boost::bind(&wbx_base::set_rx_gain, this, _1, name))
.set(wbx_rx_gain_ranges[name].start());
this->get_rx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(wbx_rx_gain_ranges[name]);
}
this->get_rx_subtree()->create<std::string>("connection").set("IQ");
this->get_rx_subtree()->create<bool>("enabled")
- .subscribe(boost::bind(&wbx_base::set_rx_enabled, this, _1))
+ .add_coerced_subscriber(boost::bind(&wbx_base::set_rx_enabled, this, _1))
.set(true); //start enabled
this->get_rx_subtree()->create<bool>("use_lo_offset").set(false);
@@ -94,7 +94,7 @@ wbx_base::wbx_base(ctor_args_t args) : xcvr_dboard_base(args){
this->get_tx_subtree()->create<device_addr_t>("tune_args").set(device_addr_t());
this->get_tx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&wbx_base::get_locked, this, dboard_iface::UNIT_TX));
+ .set_publisher(boost::bind(&wbx_base::get_locked, this, dboard_iface::UNIT_TX));
this->get_tx_subtree()->create<std::string>("connection").set("IQ");
this->get_tx_subtree()->create<bool>("use_lo_offset").set(false);
diff --git a/host/lib/usrp/dboard/db_wbx_simple.cpp b/host/lib/usrp/dboard/db_wbx_simple.cpp
index dda2def95..7a132f864 100644
--- a/host/lib/usrp/dboard/db_wbx_simple.cpp
+++ b/host/lib/usrp/dboard/db_wbx_simple.cpp
@@ -88,7 +88,7 @@ wbx_simple::wbx_simple(ctor_args_t args) : wbx_base(args){
std::string(str(boost::format("%s+GDB") % this->get_rx_subtree()->access<std::string>("name").get()
)));
this->get_rx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&wbx_simple::set_rx_ant, this, _1))
+ .add_coerced_subscriber(boost::bind(&wbx_simple::set_rx_ant, this, _1))
.set("RX2");
this->get_rx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(wbx_rx_antennas);
@@ -100,7 +100,7 @@ wbx_simple::wbx_simple(ctor_args_t args) : wbx_base(args){
std::string(str(boost::format("%s+GDB") % this->get_tx_subtree()->access<std::string>("name").get()
)));
this->get_tx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&wbx_simple::set_tx_ant, this, _1))
+ .add_coerced_subscriber(boost::bind(&wbx_simple::set_tx_ant, this, _1))
.set(wbx_tx_antennas.at(0));
this->get_tx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(wbx_tx_antennas);
diff --git a/host/lib/usrp/dboard/db_wbx_version2.cpp b/host/lib/usrp/dboard/db_wbx_version2.cpp
index 78b5b2871..d175ea000 100644
--- a/host/lib/usrp/dboard/db_wbx_version2.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version2.cpp
@@ -83,7 +83,7 @@ wbx_base::wbx_version2::wbx_version2(wbx_base *_self_wbx_base) {
////////////////////////////////////////////////////////////////////
this->get_rx_subtree()->create<std::string>("name").set("WBXv2 RX");
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&wbx_base::wbx_version2::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
+ .set_coercer(boost::bind(&wbx_base::wbx_version2::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
.set((wbx_v2_freq_range.start() + wbx_v2_freq_range.stop())/2.0);
this->get_rx_subtree()->create<meta_range_t>("freq/range").set(wbx_v2_freq_range);
@@ -93,17 +93,17 @@ wbx_base::wbx_version2::wbx_version2(wbx_base *_self_wbx_base) {
this->get_tx_subtree()->create<std::string>("name").set("WBXv2 TX");
BOOST_FOREACH(const std::string &name, wbx_v2_tx_gain_ranges.keys()){
self_base->get_tx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&wbx_base::wbx_version2::set_tx_gain, this, _1, name))
+ .set_coercer(boost::bind(&wbx_base::wbx_version2::set_tx_gain, this, _1, name))
.set(wbx_v2_tx_gain_ranges[name].start());
self_base->get_tx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(wbx_v2_tx_gain_ranges[name]);
}
this->get_tx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&wbx_base::wbx_version2::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
+ .set_coercer(boost::bind(&wbx_base::wbx_version2::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
.set((wbx_v2_freq_range.start() + wbx_v2_freq_range.stop())/2.0);
this->get_tx_subtree()->create<meta_range_t>("freq/range").set(wbx_v2_freq_range);
this->get_tx_subtree()->create<bool>("enabled")
- .subscribe(boost::bind(&wbx_base::wbx_version2::set_tx_enabled, this, _1))
+ .add_coerced_subscriber(boost::bind(&wbx_base::wbx_version2::set_tx_enabled, this, _1))
.set(true); //start enabled
//set attenuator control bits
diff --git a/host/lib/usrp/dboard/db_wbx_version3.cpp b/host/lib/usrp/dboard/db_wbx_version3.cpp
index a5821ffc2..b898a2fca 100644
--- a/host/lib/usrp/dboard/db_wbx_version3.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version3.cpp
@@ -88,7 +88,7 @@ wbx_base::wbx_version3::wbx_version3(wbx_base *_self_wbx_base) {
////////////////////////////////////////////////////////////////////
this->get_rx_subtree()->create<std::string>("name").set("WBXv3 RX");
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&wbx_base::wbx_version3::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
+ .set_coercer(boost::bind(&wbx_base::wbx_version3::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
.set((wbx_v3_freq_range.start() + wbx_v3_freq_range.stop())/2.0);
this->get_rx_subtree()->create<meta_range_t>("freq/range").set(wbx_v3_freq_range);
@@ -98,17 +98,17 @@ wbx_base::wbx_version3::wbx_version3(wbx_base *_self_wbx_base) {
this->get_tx_subtree()->create<std::string>("name").set("WBXv3 TX");
BOOST_FOREACH(const std::string &name, wbx_v3_tx_gain_ranges.keys()){
self_base->get_tx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&wbx_base::wbx_version3::set_tx_gain, this, _1, name))
+ .set_coercer(boost::bind(&wbx_base::wbx_version3::set_tx_gain, this, _1, name))
.set(wbx_v3_tx_gain_ranges[name].start());
self_base->get_tx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(wbx_v3_tx_gain_ranges[name]);
}
this->get_tx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&wbx_base::wbx_version3::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
+ .set_coercer(boost::bind(&wbx_base::wbx_version3::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
.set((wbx_v3_freq_range.start() + wbx_v3_freq_range.stop())/2.0);
this->get_tx_subtree()->create<meta_range_t>("freq/range").set(wbx_v3_freq_range);
this->get_tx_subtree()->create<bool>("enabled")
- .subscribe(boost::bind(&wbx_base::wbx_version3::set_tx_enabled, this, _1))
+ .add_coerced_subscriber(boost::bind(&wbx_base::wbx_version3::set_tx_enabled, this, _1))
.set(true); //start enabled
//set attenuator control bits
diff --git a/host/lib/usrp/dboard/db_wbx_version4.cpp b/host/lib/usrp/dboard/db_wbx_version4.cpp
index 327ae675b..721f5ed45 100644
--- a/host/lib/usrp/dboard/db_wbx_version4.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version4.cpp
@@ -92,7 +92,7 @@ wbx_base::wbx_version4::wbx_version4(wbx_base *_self_wbx_base) {
if(rx_id == 0x0063) this->get_rx_subtree()->create<std::string>("name").set("WBXv4 RX");
else if(rx_id == 0x0081) this->get_rx_subtree()->create<std::string>("name").set("WBX-120 RX");
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&wbx_base::wbx_version4::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
+ .set_coercer(boost::bind(&wbx_base::wbx_version4::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
.set((wbx_v4_freq_range.start() + wbx_v4_freq_range.stop())/2.0);
this->get_rx_subtree()->create<meta_range_t>("freq/range").set(wbx_v4_freq_range);
@@ -105,17 +105,17 @@ wbx_base::wbx_version4::wbx_version4(wbx_base *_self_wbx_base) {
else if(rx_id == 0x0081) this->get_tx_subtree()->create<std::string>("name").set("WBX-120 TX");
BOOST_FOREACH(const std::string &name, wbx_v4_tx_gain_ranges.keys()){
self_base->get_tx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&wbx_base::wbx_version4::set_tx_gain, this, _1, name))
+ .set_coercer(boost::bind(&wbx_base::wbx_version4::set_tx_gain, this, _1, name))
.set(wbx_v4_tx_gain_ranges[name].start());
self_base->get_tx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(wbx_v4_tx_gain_ranges[name]);
}
this->get_tx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&wbx_base::wbx_version4::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
+ .set_coercer(boost::bind(&wbx_base::wbx_version4::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
.set((wbx_v4_freq_range.start() + wbx_v4_freq_range.stop())/2.0);
this->get_tx_subtree()->create<meta_range_t>("freq/range").set(wbx_v4_freq_range);
this->get_tx_subtree()->create<bool>("enabled")
- .subscribe(boost::bind(&wbx_base::wbx_version4::set_tx_enabled, this, _1))
+ .add_coerced_subscriber(boost::bind(&wbx_base::wbx_version4::set_tx_enabled, this, _1))
.set(true); //start enabled
//set attenuator control bits
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp
index 092f84548..b717813cf 100644
--- a/host/lib/usrp/dboard/db_xcvr2450.cpp
+++ b/host/lib/usrp/dboard/db_xcvr2450.cpp
@@ -231,23 +231,23 @@ xcvr2450::xcvr2450(ctor_args_t args) : xcvr_dboard_base(args){
this->get_rx_subtree()->create<std::string>("name")
.set("XCVR2450 RX");
this->get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&xcvr2450::get_locked, this));
+ .set_publisher(boost::bind(&xcvr2450::get_locked, this));
this->get_rx_subtree()->create<sensor_value_t>("sensors/rssi")
- .publish(boost::bind(&xcvr2450::get_rssi, this));
+ .set_publisher(boost::bind(&xcvr2450::get_rssi, this));
BOOST_FOREACH(const std::string &name, xcvr_rx_gain_ranges.keys()){
this->get_rx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&xcvr2450::set_rx_gain, this, _1, name))
+ .set_coercer(boost::bind(&xcvr2450::set_rx_gain, this, _1, name))
.set(xcvr_rx_gain_ranges[name].start());
this->get_rx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(xcvr_rx_gain_ranges[name]);
}
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&xcvr2450::set_lo_freq, this, _1))
+ .set_coercer(boost::bind(&xcvr2450::set_lo_freq, this, _1))
.set(double(2.45e9));
this->get_rx_subtree()->create<meta_range_t>("freq/range")
.set(xcvr_freq_range);
this->get_rx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&xcvr2450::set_rx_ant, this, _1))
+ .add_coerced_subscriber(boost::bind(&xcvr2450::set_rx_ant, this, _1))
.set(xcvr_antennas.at(0));
this->get_rx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(xcvr_antennas);
@@ -258,7 +258,7 @@ xcvr2450::xcvr2450(ctor_args_t args) : xcvr_dboard_base(args){
this->get_rx_subtree()->create<bool>("use_lo_offset")
.set(false);
this->get_rx_subtree()->create<double>("bandwidth/value")
- .coerce(boost::bind(&xcvr2450::set_rx_bandwidth, this, _1)) //complex bandpass bandwidth
+ .set_coercer(boost::bind(&xcvr2450::set_rx_bandwidth, this, _1)) //complex bandpass bandwidth
.set(2.0*_rx_bandwidth); //_rx_bandwidth in lowpass, convert to complex bandpass
this->get_rx_subtree()->create<meta_range_t>("bandwidth/range")
.set(xcvr_rx_bandwidth_range);
@@ -269,21 +269,21 @@ xcvr2450::xcvr2450(ctor_args_t args) : xcvr_dboard_base(args){
this->get_tx_subtree()->create<std::string>("name")
.set("XCVR2450 TX");
this->get_tx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&xcvr2450::get_locked, this));
+ .set_publisher(boost::bind(&xcvr2450::get_locked, this));
BOOST_FOREACH(const std::string &name, xcvr_tx_gain_ranges.keys()){
this->get_tx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&xcvr2450::set_tx_gain, this, _1, name))
+ .set_coercer(boost::bind(&xcvr2450::set_tx_gain, this, _1, name))
.set(xcvr_tx_gain_ranges[name].start());
this->get_tx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(xcvr_tx_gain_ranges[name]);
}
this->get_tx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&xcvr2450::set_lo_freq, this, _1))
+ .set_coercer(boost::bind(&xcvr2450::set_lo_freq, this, _1))
.set(double(2.45e9));
this->get_tx_subtree()->create<meta_range_t>("freq/range")
.set(xcvr_freq_range);
this->get_tx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&xcvr2450::set_tx_ant, this, _1))
+ .add_coerced_subscriber(boost::bind(&xcvr2450::set_tx_ant, this, _1))
.set(xcvr_antennas.at(1));
this->get_tx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(xcvr_antennas);
@@ -294,7 +294,7 @@ xcvr2450::xcvr2450(ctor_args_t args) : xcvr_dboard_base(args){
this->get_tx_subtree()->create<bool>("use_lo_offset")
.set(false);
this->get_tx_subtree()->create<double>("bandwidth/value")
- .coerce(boost::bind(&xcvr2450::set_tx_bandwidth, this, _1)) //complex bandpass bandwidth
+ .set_coercer(boost::bind(&xcvr2450::set_tx_bandwidth, this, _1)) //complex bandpass bandwidth
.set(2.0*_tx_bandwidth); //_tx_bandwidth in lowpass, convert to complex bandpass
this->get_tx_subtree()->create<meta_range_t>("bandwidth/range")
.set(xcvr_tx_bandwidth_range);
diff --git a/host/lib/usrp/e100/e100_impl.cpp b/host/lib/usrp/e100/e100_impl.cpp
index 6d3c08534..0218e375d 100644
--- a/host/lib/usrp/e100/e100_impl.cpp
+++ b/host/lib/usrp/e100/e100_impl.cpp
@@ -217,20 +217,20 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
////////////////////////////////////////////////////////////////////
_tree->create<mboard_eeprom_t>(mb_path / "eeprom")
.set(mb_eeprom)
- .subscribe(boost::bind(&e100_impl::set_mb_eeprom, this, _1));
+ .add_coerced_subscriber(boost::bind(&e100_impl::set_mb_eeprom, this, _1));
////////////////////////////////////////////////////////////////////
// create clock control objects
////////////////////////////////////////////////////////////////////
//^^^ clock created up top, just reg props here... ^^^
_tree->create<double>(mb_path / "tick_rate")
- .publish(boost::bind(&e100_clock_ctrl::get_fpga_clock_rate, _clock_ctrl))
- .subscribe(boost::bind(&fifo_ctrl_excelsior::set_tick_rate, _fifo_ctrl, _1))
- .subscribe(boost::bind(&e100_impl::update_tick_rate, this, _1));
+ .set_publisher(boost::bind(&e100_clock_ctrl::get_fpga_clock_rate, _clock_ctrl))
+ .add_coerced_subscriber(boost::bind(&fifo_ctrl_excelsior::set_tick_rate, _fifo_ctrl, _1))
+ .add_coerced_subscriber(boost::bind(&e100_impl::update_tick_rate, this, _1));
- //subscribe the command time while we are at it
+ //add_coerced_subscriber the command time while we are at it
_tree->create<time_spec_t>(mb_path / "time/cmd")
- .subscribe(boost::bind(&fifo_ctrl_excelsior::set_time, _fifo_ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&fifo_ctrl_excelsior::set_time, _fifo_ctrl, _1));
////////////////////////////////////////////////////////////////////
// create codec control objects
@@ -241,18 +241,18 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
_tree->create<std::string>(rx_codec_path / "name").set("ad9522");
_tree->create<meta_range_t>(rx_codec_path / "gains/pga/range").set(e100_codec_ctrl::rx_pga_gain_range);
_tree->create<double>(rx_codec_path / "gains/pga/value")
- .coerce(boost::bind(&e100_impl::update_rx_codec_gain, this, _1));
+ .set_coercer(boost::bind(&e100_impl::update_rx_codec_gain, this, _1));
_tree->create<std::string>(tx_codec_path / "name").set("ad9522");
_tree->create<meta_range_t>(tx_codec_path / "gains/pga/range").set(e100_codec_ctrl::tx_pga_gain_range);
_tree->create<double>(tx_codec_path / "gains/pga/value")
- .subscribe(boost::bind(&e100_codec_ctrl::set_tx_pga_gain, _codec_ctrl, _1))
- .publish(boost::bind(&e100_codec_ctrl::get_tx_pga_gain, _codec_ctrl));
+ .add_coerced_subscriber(boost::bind(&e100_codec_ctrl::set_tx_pga_gain, _codec_ctrl, _1))
+ .set_publisher(boost::bind(&e100_codec_ctrl::get_tx_pga_gain, _codec_ctrl));
////////////////////////////////////////////////////////////////////
// and do the misc mboard sensors
////////////////////////////////////////////////////////////////////
_tree->create<sensor_value_t>(mb_path / "sensors/ref_locked")
- .publish(boost::bind(&e100_impl::get_ref_locked, this));
+ .set_publisher(boost::bind(&e100_impl::get_ref_locked, this));
////////////////////////////////////////////////////////////////////
// Create the GPSDO control
@@ -272,7 +272,7 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
BOOST_FOREACH(const std::string &name, _gps->get_sensors())
{
_tree->create<sensor_value_t>(mb_path / "sensors" / name)
- .publish(boost::bind(&gps_ctrl::get_sensor, _gps, name));
+ .set_publisher(boost::bind(&gps_ctrl::get_sensor, _gps, name));
}
}
else
@@ -288,27 +288,27 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
_tx_fe = tx_frontend_core_200::make(_fifo_ctrl, TOREG(SR_TX_FE));
_tree->create<subdev_spec_t>(mb_path / "rx_subdev_spec")
- .subscribe(boost::bind(&e100_impl::update_rx_subdev_spec, this, _1));
+ .add_coerced_subscriber(boost::bind(&e100_impl::update_rx_subdev_spec, this, _1));
_tree->create<subdev_spec_t>(mb_path / "tx_subdev_spec")
- .subscribe(boost::bind(&e100_impl::update_tx_subdev_spec, this, _1));
+ .add_coerced_subscriber(boost::bind(&e100_impl::update_tx_subdev_spec, this, _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")
- .coerce(boost::bind(&rx_frontend_core_200::set_dc_offset, _rx_fe, _1))
+ .set_coercer(boost::bind(&rx_frontend_core_200::set_dc_offset, _rx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<bool>(rx_fe_path / "dc_offset" / "enable")
- .subscribe(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, _rx_fe, _1))
+ .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, _rx_fe, _1))
.set(true);
_tree->create<std::complex<double> >(rx_fe_path / "iq_balance" / "value")
- .subscribe(boost::bind(&rx_frontend_core_200::set_iq_balance, _rx_fe, _1))
+ .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_iq_balance, _rx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<std::complex<double> >(tx_fe_path / "dc_offset" / "value")
- .coerce(boost::bind(&tx_frontend_core_200::set_dc_offset, _tx_fe, _1))
+ .set_coercer(boost::bind(&tx_frontend_core_200::set_dc_offset, _tx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<std::complex<double> >(tx_fe_path / "iq_balance" / "value")
- .subscribe(boost::bind(&tx_frontend_core_200::set_iq_balance, _tx_fe, _1))
+ .add_coerced_subscriber(boost::bind(&tx_frontend_core_200::set_iq_balance, _tx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
////////////////////////////////////////////////////////////////////
@@ -327,20 +327,20 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
_rx_dsps[dspno]->set_link_rate(E100_RX_LINK_RATE_BPS);
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&rx_dsp_core_200::set_tick_rate, _rx_dsps[dspno], _1));
+ .add_coerced_subscriber(boost::bind(&rx_dsp_core_200::set_tick_rate, _rx_dsps[dspno], _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")
- .publish(boost::bind(&rx_dsp_core_200::get_host_rates, _rx_dsps[dspno]));
+ .set_publisher(boost::bind(&rx_dsp_core_200::get_host_rates, _rx_dsps[dspno]));
_tree->create<double>(rx_dsp_path / "rate/value")
.set(1e6) //some default
- .coerce(boost::bind(&rx_dsp_core_200::set_host_rate, _rx_dsps[dspno], _1))
- .subscribe(boost::bind(&e100_impl::update_rx_samp_rate, this, dspno, _1));
+ .set_coercer(boost::bind(&rx_dsp_core_200::set_host_rate, _rx_dsps[dspno], _1))
+ .add_coerced_subscriber(boost::bind(&e100_impl::update_rx_samp_rate, this, dspno, _1));
_tree->create<double>(rx_dsp_path / "freq/value")
- .coerce(boost::bind(&rx_dsp_core_200::set_freq, _rx_dsps[dspno], _1));
+ .set_coercer(boost::bind(&rx_dsp_core_200::set_freq, _rx_dsps[dspno], _1));
_tree->create<meta_range_t>(rx_dsp_path / "freq/range")
- .publish(boost::bind(&rx_dsp_core_200::get_freq_range, _rx_dsps[dspno]));
+ .set_publisher(boost::bind(&rx_dsp_core_200::get_freq_range, _rx_dsps[dspno]));
_tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd")
- .subscribe(boost::bind(&rx_dsp_core_200::issue_stream_command, _rx_dsps[dspno], _1));
+ .add_coerced_subscriber(boost::bind(&rx_dsp_core_200::issue_stream_command, _rx_dsps[dspno], _1));
}
////////////////////////////////////////////////////////////////////
@@ -351,17 +351,17 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
);
_tx_dsp->set_link_rate(E100_TX_LINK_RATE_BPS);
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&tx_dsp_core_200::set_tick_rate, _tx_dsp, _1));
+ .add_coerced_subscriber(boost::bind(&tx_dsp_core_200::set_tick_rate, _tx_dsp, _1));
_tree->create<meta_range_t>(mb_path / "tx_dsps/0/rate/range")
- .publish(boost::bind(&tx_dsp_core_200::get_host_rates, _tx_dsp));
+ .set_publisher(boost::bind(&tx_dsp_core_200::get_host_rates, _tx_dsp));
_tree->create<double>(mb_path / "tx_dsps/0/rate/value")
.set(1e6) //some default
- .coerce(boost::bind(&tx_dsp_core_200::set_host_rate, _tx_dsp, _1))
- .subscribe(boost::bind(&e100_impl::update_tx_samp_rate, this, 0, _1));
+ .set_coercer(boost::bind(&tx_dsp_core_200::set_host_rate, _tx_dsp, _1))
+ .add_coerced_subscriber(boost::bind(&e100_impl::update_tx_samp_rate, this, 0, _1));
_tree->create<double>(mb_path / "tx_dsps/0/freq/value")
- .coerce(boost::bind(&tx_dsp_core_200::set_freq, _tx_dsp, _1));
+ .set_coercer(boost::bind(&tx_dsp_core_200::set_freq, _tx_dsp, _1));
_tree->create<meta_range_t>(mb_path / "tx_dsps/0/freq/range")
- .publish(boost::bind(&tx_dsp_core_200::get_freq_range, _tx_dsp));
+ .set_publisher(boost::bind(&tx_dsp_core_200::get_freq_range, _tx_dsp));
////////////////////////////////////////////////////////////////////
// create time control objects
@@ -375,21 +375,21 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
_fifo_ctrl, TOREG(SR_TIME64), time64_rb_bases
);
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&time64_core_200::set_tick_rate, _time64, _1));
+ .add_coerced_subscriber(boost::bind(&time64_core_200::set_tick_rate, _time64, _1));
_tree->create<time_spec_t>(mb_path / "time/now")
- .publish(boost::bind(&time64_core_200::get_time_now, _time64))
- .subscribe(boost::bind(&time64_core_200::set_time_now, _time64, _1));
+ .set_publisher(boost::bind(&time64_core_200::get_time_now, _time64))
+ .add_coerced_subscriber(boost::bind(&time64_core_200::set_time_now, _time64, _1));
_tree->create<time_spec_t>(mb_path / "time/pps")
- .publish(boost::bind(&time64_core_200::get_time_last_pps, _time64))
- .subscribe(boost::bind(&time64_core_200::set_time_next_pps, _time64, _1));
+ .set_publisher(boost::bind(&time64_core_200::get_time_last_pps, _time64))
+ .add_coerced_subscriber(boost::bind(&time64_core_200::set_time_next_pps, _time64, _1));
//setup time source props
_tree->create<std::string>(mb_path / "time_source/value")
- .subscribe(boost::bind(&time64_core_200::set_time_source, _time64, _1));
+ .add_coerced_subscriber(boost::bind(&time64_core_200::set_time_source, _time64, _1));
_tree->create<std::vector<std::string> >(mb_path / "time_source/options")
- .publish(boost::bind(&time64_core_200::get_time_sources, _time64));
+ .set_publisher(boost::bind(&time64_core_200::get_time_sources, _time64));
//setup reference source props
_tree->create<std::string>(mb_path / "clock_source/value")
- .subscribe(boost::bind(&e100_impl::update_clock_source, this, _1));
+ .add_coerced_subscriber(boost::bind(&e100_impl::update_clock_source, this, _1));
std::vector<std::string> clock_sources = boost::assign::list_of("internal")("external")("auto");
if (_gps and _gps->gps_detected()) clock_sources.push_back("gpsdo");
_tree->create<std::vector<std::string> >(mb_path / "clock_source/options").set(clock_sources);
@@ -399,7 +399,7 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
////////////////////////////////////////////////////////////////////
_user = user_settings_core_200::make(_fifo_ctrl, TOREG(SR_USER_REGS));
_tree->create<user_settings_core_200::user_reg_t>(mb_path / "user/regs")
- .subscribe(boost::bind(&user_settings_core_200::set_reg, _user, _1));
+ .add_coerced_subscriber(boost::bind(&user_settings_core_200::set_reg, _user, _1));
////////////////////////////////////////////////////////////////////
// create dboard control objects
@@ -417,13 +417,13 @@ e100_impl::e100_impl(const uhd::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)
- .subscribe(boost::bind(&e100_impl::set_db_eeprom, this, "rx", _1));
+ .add_coerced_subscriber(boost::bind(&e100_impl::set_db_eeprom, this, "rx", _1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/tx_eeprom")
.set(tx_db_eeprom)
- .subscribe(boost::bind(&e100_impl::set_db_eeprom, this, "tx", _1));
+ .add_coerced_subscriber(boost::bind(&e100_impl::set_db_eeprom, this, "tx", _1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/gdb_eeprom")
.set(gdb_eeprom)
- .subscribe(boost::bind(&e100_impl::set_db_eeprom, this, "gdb", _1));
+ .add_coerced_subscriber(boost::bind(&e100_impl::set_db_eeprom, this, "gdb", _1));
//create a new dboard interface and manager
_dboard_iface = make_e100_dboard_iface(_fifo_ctrl, _fpga_i2c_ctrl, _fifo_ctrl/*spi*/, _clock_ctrl, _codec_ctrl);
@@ -437,12 +437,12 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
const fs_path db_tx_fe_path = mb_path / "dboards" / "A" / "tx_frontends";
BOOST_FOREACH(const std::string &name, _tree->list(db_tx_fe_path)){
_tree->access<double>(db_tx_fe_path / name / "freq" / "value")
- .subscribe(boost::bind(&e100_impl::set_tx_fe_corrections, this, _1));
+ .add_coerced_subscriber(boost::bind(&e100_impl::set_tx_fe_corrections, this, _1));
}
const fs_path db_rx_fe_path = mb_path / "dboards" / "A" / "rx_frontends";
BOOST_FOREACH(const std::string &name, _tree->list(db_rx_fe_path)){
_tree->access<double>(db_rx_fe_path / name / "freq" / "value")
- .subscribe(boost::bind(&e100_impl::set_rx_fe_corrections, this, _1));
+ .add_coerced_subscriber(boost::bind(&e100_impl::set_rx_fe_corrections, this, _1));
}
//initialize io handling
@@ -457,8 +457,8 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
////////////////////////////////////////////////////////////////////
this->update_rates();
- _tree->access<double>(mb_path / "tick_rate") //now subscribe the clock rate setter
- .subscribe(boost::bind(&e100_clock_ctrl::set_fpga_clock_rate, _clock_ctrl, _1));
+ _tree->access<double>(mb_path / "tick_rate") //now add_coerced_subscriber the clock rate setter
+ .add_coerced_subscriber(boost::bind(&e100_clock_ctrl::set_fpga_clock_rate, _clock_ctrl, _1));
//reset cordic rates and their properties to zero
BOOST_FOREACH(const std::string &name, _tree->list(mb_path / "rx_dsps")){
diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp
index fae09ba63..5a589a7fd 100644
--- a/host/lib/usrp/e300/e300_impl.cpp
+++ b/host/lib/usrp/e300/e300_impl.cpp
@@ -471,14 +471,14 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
BOOST_FOREACH(const std::string &name, _sensor_manager->get_sensors())
{
_tree->create<sensor_value_t>(mb_path / "sensors" / name)
- .publish(boost::bind(&e300_sensor_manager::get_sensor, _sensor_manager, name));
+ .set_publisher(boost::bind(&e300_sensor_manager::get_sensor, _sensor_manager, name));
}
#ifdef E300_GPSD
if (_gps) {
BOOST_FOREACH(const std::string &name, _gps->get_sensors())
{
_tree->create<sensor_value_t>(mb_path / "sensors" / name)
- .publish(boost::bind(&gpsd_iface::get_sensor, _gps, name));
+ .set_publisher(boost::bind(&gpsd_iface::get_sensor, _gps, name));
}
}
#endif
@@ -488,7 +488,7 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
////////////////////////////////////////////////////////////////////
_tree->create<mboard_eeprom_t>(mb_path / "eeprom")
.set(_eeprom_manager->get_mb_eeprom()) // set first...
- .subscribe(boost::bind(
+ .add_coerced_subscriber(boost::bind(
&e300_eeprom_manager::write_mb_eeprom,
_eeprom_manager, _1));
@@ -496,9 +496,9 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
// clocking
////////////////////////////////////////////////////////////////////
_tree->create<double>(mb_path / "tick_rate")
- .coerce(boost::bind(&e300_impl::_set_tick_rate, this, _1))
- .publish(boost::bind(&e300_impl::_get_tick_rate, this))
- .subscribe(boost::bind(&e300_impl::_update_tick_rate, this, _1));
+ .set_coercer(boost::bind(&e300_impl::_set_tick_rate, this, _1))
+ .set_publisher(boost::bind(&e300_impl::_get_tick_rate, this))
+ .add_coerced_subscriber(boost::bind(&e300_impl::_update_tick_rate, this, _1));
//default some chains on -- needed for setup purposes
_codec_ctrl->set_active_chains(true, false, true, false);
@@ -522,30 +522,30 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
BOOST_FOREACH(const gpio_attr_map_t::value_type attr, gpio_attr_map)
{
_tree->create<boost::uint32_t>(mb_path / "gpio" / "INT0" / attr.second)
- .subscribe(boost::bind(&gpio_atr_3000::set_gpio_attr, fp_gpio, attr.first, _1))
+ .add_coerced_subscriber(boost::bind(&gpio_atr_3000::set_gpio_attr, fp_gpio, attr.first, _1))
.set(0);
}
_tree->create<boost::uint8_t>(mb_path / "gpio" / "INT0" / "READBACK")
- .publish(boost::bind(&gpio_atr_3000::read_gpio, fp_gpio));
+ .set_publisher(boost::bind(&gpio_atr_3000::read_gpio, fp_gpio));
////////////////////////////////////////////////////////////////////
// register the time keepers - only one can be the highlander
////////////////////////////////////////////////////////////////////
_tree->create<time_spec_t>(mb_path / "time" / "now")
- .publish(boost::bind(&time_core_3000::get_time_now, _radio_perifs[0].time64))
- .subscribe(boost::bind(&e300_impl::_set_time, this, _1))
+ .set_publisher(boost::bind(&time_core_3000::get_time_now, _radio_perifs[0].time64))
+ .add_coerced_subscriber(boost::bind(&e300_impl::_set_time, this, _1))
.set(0.0);
//re-sync the times when the tick rate changes
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&e300_impl::_sync_times, this));
+ .add_coerced_subscriber(boost::bind(&e300_impl::_sync_times, this));
_tree->create<time_spec_t>(mb_path / "time" / "pps")
- .publish(boost::bind(&time_core_3000::get_time_last_pps, _radio_perifs[0].time64))
- .subscribe(boost::bind(&time_core_3000::set_time_next_pps, _radio_perifs[0].time64, _1))
- .subscribe(boost::bind(&time_core_3000::set_time_next_pps, _radio_perifs[1].time64, _1));
+ .set_publisher(boost::bind(&time_core_3000::get_time_last_pps, _radio_perifs[0].time64))
+ .add_coerced_subscriber(boost::bind(&time_core_3000::set_time_next_pps, _radio_perifs[0].time64, _1))
+ .add_coerced_subscriber(boost::bind(&time_core_3000::set_time_next_pps, _radio_perifs[1].time64, _1));
//setup time source props
_tree->create<std::string>(mb_path / "time_source" / "value")
- .subscribe(boost::bind(&e300_impl::_update_time_source, this, _1))
+ .add_coerced_subscriber(boost::bind(&e300_impl::_update_time_source, this, _1))
.set(e300::DEFAULT_TIME_SRC);
#ifdef E300_GPSD
static const std::vector<std::string> time_sources = boost::assign::list_of("none")("internal")("external")("gpsdo");
@@ -555,7 +555,7 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
_tree->create<std::vector<std::string> >(mb_path / "time_source" / "options").set(time_sources);
//setup reference source props
_tree->create<std::string>(mb_path / "clock_source" / "value")
- .subscribe(boost::bind(&e300_impl::_update_clock_source, this, _1))
+ .add_coerced_subscriber(boost::bind(&e300_impl::_update_clock_source, this, _1))
.set(e300::DEFAULT_CLOCK_SRC);
static const std::vector<std::string> clock_sources = boost::assign::list_of("internal"); //external,gpsdo not supported
_tree->create<std::vector<std::string> >(mb_path / "clock_source" / "options").set(clock_sources);
@@ -566,13 +566,13 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
dboard_eeprom_t db_eeprom;
_tree->create<dboard_eeprom_t>(mb_path / "dboards" / "A" / "rx_eeprom")
.set(_eeprom_manager->get_db_eeprom())
- .subscribe(boost::bind(
+ .add_coerced_subscriber(boost::bind(
&e300_eeprom_manager::write_db_eeprom,
_eeprom_manager, _1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards" / "A" / "tx_eeprom")
.set(_eeprom_manager->get_db_eeprom())
- .subscribe(boost::bind(
+ .add_coerced_subscriber(boost::bind(
&e300_eeprom_manager::write_db_eeprom,
_eeprom_manager, _1));
@@ -605,10 +605,10 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
_tree->create<subdev_spec_t>(mb_path / "rx_subdev_spec")
.set(subdev_spec_t())
- .subscribe(boost::bind(&e300_impl::_update_subdev_spec, this, "rx", _1));
+ .add_coerced_subscriber(boost::bind(&e300_impl::_update_subdev_spec, this, "rx", _1));
_tree->create<subdev_spec_t>(mb_path / "tx_subdev_spec")
.set(subdev_spec_t())
- .subscribe(boost::bind(&e300_impl::_update_subdev_spec, this, "tx", _1));
+ .add_coerced_subscriber(boost::bind(&e300_impl::_update_subdev_spec, this, "tx", _1));
////////////////////////////////////////////////////////////////////
// do some post-init tasks
@@ -1007,25 +1007,25 @@ void e300_impl::_setup_radio(const size_t dspno)
// connect rx dsp control objects
////////////////////////////////////////////////////////////////////
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&rx_vita_core_3000::set_tick_rate, perif.framer, _1))
- .subscribe(boost::bind(&rx_dsp_core_3000::set_tick_rate, perif.ddc, _1));
+ .add_coerced_subscriber(boost::bind(&rx_vita_core_3000::set_tick_rate, perif.framer, _1))
+ .add_coerced_subscriber(boost::bind(&rx_dsp_core_3000::set_tick_rate, perif.ddc, _1));
const fs_path rx_dsp_path = mb_path / "rx_dsps" / str(boost::format("%u") % dspno);
perif.ddc->populate_subtree(_tree->subtree(rx_dsp_path));
_tree->access<double>(rx_dsp_path / "rate" / "value")
- .subscribe(boost::bind(&e300_impl::_update_rx_samp_rate, this, dspno, _1))
+ .add_coerced_subscriber(boost::bind(&e300_impl::_update_rx_samp_rate, this, dspno, _1))
;
_tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd")
- .subscribe(boost::bind(&rx_vita_core_3000::issue_stream_command, perif.framer, _1));
+ .add_coerced_subscriber(boost::bind(&rx_vita_core_3000::issue_stream_command, perif.framer, _1));
////////////////////////////////////////////////////////////////////
// create tx dsp control objects
////////////////////////////////////////////////////////////////////
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&tx_dsp_core_3000::set_tick_rate, perif.duc, _1));
+ .add_coerced_subscriber(boost::bind(&tx_dsp_core_3000::set_tick_rate, perif.duc, _1));
const fs_path tx_dsp_path = mb_path / "tx_dsps" / str(boost::format("%u") % dspno);
perif.duc->populate_subtree(_tree->subtree(tx_dsp_path));
_tree->access<double>(tx_dsp_path / "rate" / "value")
- .subscribe(boost::bind(&e300_impl::_update_tx_samp_rate, this, dspno, _1))
+ .add_coerced_subscriber(boost::bind(&e300_impl::_update_tx_samp_rate, this, dspno, _1))
;
////////////////////////////////////////////////////////////////////
@@ -1045,10 +1045,10 @@ void e300_impl::_setup_radio(const size_t dspno)
// This will connect all the e300_impl-specific items
_tree->create<sensor_value_t>(rf_fe_path / "sensors" / "lo_locked")
- .publish(boost::bind(&e300_impl::_get_fe_pll_lock, this, dir == TX_DIRECTION))
+ .set_publisher(boost::bind(&e300_impl::_get_fe_pll_lock, this, dir == TX_DIRECTION))
;
_tree->access<double>(rf_fe_path / "freq" / "value")
- .subscribe(boost::bind(&e300_impl::_update_fe_lo_freq, this, key, _1))
+ .add_coerced_subscriber(boost::bind(&e300_impl::_update_fe_lo_freq, this, key, _1))
;
// Antenna Setup
@@ -1056,7 +1056,7 @@ void e300_impl::_setup_radio(const size_t dspno)
static const std::vector<std::string> ants = boost::assign::list_of("TX/RX")("RX2");
_tree->create<std::vector<std::string> >(rf_fe_path / "antenna" / "options").set(ants);
_tree->create<std::string>(rf_fe_path / "antenna" / "value")
- .subscribe(boost::bind(&e300_impl::_update_antenna_sel, this, dspno, _1))
+ .add_coerced_subscriber(boost::bind(&e300_impl::_update_antenna_sel, this, dspno, _1))
.set("RX2");
}
else if (dir == TX_DIRECTION) {
diff --git a/host/lib/usrp/n230/n230_impl.cpp b/host/lib/usrp/n230/n230_impl.cpp
index b005182cf..5e8aa37b7 100644
--- a/host/lib/usrp/n230/n230_impl.cpp
+++ b/host/lib/usrp/n230/n230_impl.cpp
@@ -314,7 +314,7 @@ void n230_impl::_initialize_property_tree(const fs_path& mb_path)
//------------------------------------------------------------------
_tree->create<mboard_eeprom_t>(mb_path / "eeprom")
.set(_eeprom_mgr->get_mb_eeprom()) //Set first...
- .subscribe(boost::bind(&n230_eeprom_manager::write_mb_eeprom, _eeprom_mgr, _1)); //..then enable writer
+ .add_coerced_subscriber(boost::bind(&n230_eeprom_manager::write_mb_eeprom, _eeprom_mgr, _1)); //..then enable writer
//------------------------------------------------------------------
// Create codec nodes
@@ -333,22 +333,22 @@ void n230_impl::_initialize_property_tree(const fs_path& mb_path)
// Create clock and time control nodes
//------------------------------------------------------------------
_tree->create<double>(mb_path / "tick_rate")
- .coerce(boost::bind(&n230_clk_pps_ctrl::set_tick_rate, _resource_mgr->get_clk_pps_ctrl_sptr(), _1))
- .publish(boost::bind(&n230_clk_pps_ctrl::get_tick_rate, _resource_mgr->get_clk_pps_ctrl_sptr()))
- .subscribe(boost::bind(&n230_stream_manager::update_tick_rate, _stream_mgr, _1));
+ .set_coercer(boost::bind(&n230_clk_pps_ctrl::set_tick_rate, _resource_mgr->get_clk_pps_ctrl_sptr(), _1))
+ .set_publisher(boost::bind(&n230_clk_pps_ctrl::get_tick_rate, _resource_mgr->get_clk_pps_ctrl_sptr()))
+ .add_coerced_subscriber(boost::bind(&n230_stream_manager::update_tick_rate, _stream_mgr, _1));
//Register time now and pps onto available radio cores
//radio0 is the master
_tree->create<time_spec_t>(mb_path / "time" / "cmd");
_tree->create<time_spec_t>(mb_path / "time" / "now")
- .publish(boost::bind(&time_core_3000::get_time_now, _resource_mgr->get_radio(0).time));
+ .set_publisher(boost::bind(&time_core_3000::get_time_now, _resource_mgr->get_radio(0).time));
_tree->create<time_spec_t>(mb_path / "time" / "pps")
- .publish(boost::bind(&time_core_3000::get_time_last_pps, _resource_mgr->get_radio(0).time));
+ .set_publisher(boost::bind(&time_core_3000::get_time_last_pps, _resource_mgr->get_radio(0).time));
//Setup time source props
_tree->create<std::string>(mb_path / "time_source" / "value")
- .subscribe(boost::bind(&n230_impl::_check_time_source, this, _1))
- .subscribe(boost::bind(&n230_clk_pps_ctrl::set_pps_source, _resource_mgr->get_clk_pps_ctrl_sptr(), _1))
+ .add_coerced_subscriber(boost::bind(&n230_impl::_check_time_source, this, _1))
+ .add_coerced_subscriber(boost::bind(&n230_clk_pps_ctrl::set_pps_source, _resource_mgr->get_clk_pps_ctrl_sptr(), _1))
.set(n230::DEFAULT_TIME_SRC);
static const std::vector<std::string> time_sources = boost::assign::list_of("none")("external")("gpsdo");
_tree->create<std::vector<std::string> >(mb_path / "time_source" / "options")
@@ -356,24 +356,24 @@ void n230_impl::_initialize_property_tree(const fs_path& mb_path)
//Setup reference source props
_tree->create<std::string>(mb_path / "clock_source" / "value")
- .subscribe(boost::bind(&n230_impl::_check_clock_source, this, _1))
- .subscribe(boost::bind(&n230_clk_pps_ctrl::set_clock_source, _resource_mgr->get_clk_pps_ctrl_sptr(), _1))
+ .add_coerced_subscriber(boost::bind(&n230_impl::_check_clock_source, this, _1))
+ .add_coerced_subscriber(boost::bind(&n230_clk_pps_ctrl::set_clock_source, _resource_mgr->get_clk_pps_ctrl_sptr(), _1))
.set(n230::DEFAULT_CLOCK_SRC);
static const std::vector<std::string> clock_sources = boost::assign::list_of("internal")("external")("gpsdo");
_tree->create<std::vector<std::string> >(mb_path / "clock_source" / "options")
.set(clock_sources);
_tree->create<sensor_value_t>(mb_path / "sensors" / "ref_locked")
- .publish(boost::bind(&n230_clk_pps_ctrl::get_ref_locked, _resource_mgr->get_clk_pps_ctrl_sptr()));
+ .set_publisher(boost::bind(&n230_clk_pps_ctrl::get_ref_locked, _resource_mgr->get_clk_pps_ctrl_sptr()));
//------------------------------------------------------------------
// Create frontend mapping
//------------------------------------------------------------------
_tree->create<subdev_spec_t>(mb_path / "rx_subdev_spec")
.set(subdev_spec_t())
- .subscribe(boost::bind(&n230_impl::_update_rx_subdev_spec, this, _1));
+ .add_coerced_subscriber(boost::bind(&n230_impl::_update_rx_subdev_spec, this, _1));
_tree->create<subdev_spec_t>(mb_path / "tx_subdev_spec")
.set(subdev_spec_t())
- .subscribe(boost::bind(&n230_impl::_update_tx_subdev_spec, this, _1));
+ .add_coerced_subscriber(boost::bind(&n230_impl::_update_tx_subdev_spec, this, _1));
//------------------------------------------------------------------
// Create a fake dboard to put frontends in
@@ -413,24 +413,24 @@ void n230_impl::_initialize_property_tree(const fs_path& mb_path)
//------------------------------------------------------------------
_tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "DDR")
.set(0)
- .subscribe(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
+ .add_coerced_subscriber(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
_resource_mgr->get_minisas_gpio_ctrl_sptr(0), gpio_atr::GPIO_DDR, _1));
_tree->create<boost::uint32_t>(mb_path / "gpio" / "FP1" / "DDR")
.set(0)
- .subscribe(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
+ .add_coerced_subscriber(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
_resource_mgr->get_minisas_gpio_ctrl_sptr(1), gpio_atr::GPIO_DDR, _1));
_tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "OUT")
.set(0)
- .subscribe(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
+ .add_coerced_subscriber(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
_resource_mgr->get_minisas_gpio_ctrl_sptr(0), gpio_atr::GPIO_OUT, _1));
_tree->create<boost::uint32_t>(mb_path / "gpio" / "FP1" / "OUT")
.set(0)
- .subscribe(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
+ .add_coerced_subscriber(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
_resource_mgr->get_minisas_gpio_ctrl_sptr(1), gpio_atr::GPIO_OUT, _1));
_tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "READBACK")
- .publish(boost::bind(&gpio_atr::gpio_atr_3000::read_gpio, _resource_mgr->get_minisas_gpio_ctrl_sptr(0)));
+ .set_publisher(boost::bind(&gpio_atr::gpio_atr_3000::read_gpio, _resource_mgr->get_minisas_gpio_ctrl_sptr(0)));
_tree->create<boost::uint32_t>(mb_path / "gpio" / "FP1" / "READBACK")
- .publish(boost::bind(&gpio_atr::gpio_atr_3000::read_gpio, _resource_mgr->get_minisas_gpio_ctrl_sptr(1)));
+ .set_publisher(boost::bind(&gpio_atr::gpio_atr_3000::read_gpio, _resource_mgr->get_minisas_gpio_ctrl_sptr(1)));
//------------------------------------------------------------------
// GPSDO sensors
@@ -440,7 +440,7 @@ void n230_impl::_initialize_property_tree(const fs_path& mb_path)
BOOST_FOREACH(const std::string &name, gps_ctrl->get_sensors())
{
_tree->create<sensor_value_t>(mb_path / "sensors" / name)
- .publish(boost::bind(&gps_ctrl::get_sensor, gps_ctrl, name));
+ .set_publisher(boost::bind(&gps_ctrl::get_sensor, gps_ctrl, name));
}
}
}
@@ -454,48 +454,48 @@ void n230_impl::_initialize_radio_properties(const fs_path& mb_path, size_t inst
//Time
_tree->access<time_spec_t>(mb_path / "time" / "cmd")
- .subscribe(boost::bind(&radio_ctrl_core_3000::set_time, perif.ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&radio_ctrl_core_3000::set_time, perif.ctrl, _1));
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&radio_ctrl_core_3000::set_tick_rate, perif.ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&radio_ctrl_core_3000::set_tick_rate, perif.ctrl, _1));
_tree->access<time_spec_t>(mb_path / "time" / "now")
- .subscribe(boost::bind(&time_core_3000::set_time_now, perif.time, _1));
+ .add_coerced_subscriber(boost::bind(&time_core_3000::set_time_now, perif.time, _1));
_tree->access<time_spec_t>(mb_path / "time" / "pps")
- .subscribe(boost::bind(&time_core_3000::set_time_next_pps, perif.time, _1));
+ .add_coerced_subscriber(boost::bind(&time_core_3000::set_time_next_pps, perif.time, _1));
//RX DSP
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&rx_vita_core_3000::set_tick_rate, perif.framer, _1))
- .subscribe(boost::bind(&rx_dsp_core_3000::set_tick_rate, perif.ddc, _1));
+ .add_coerced_subscriber(boost::bind(&rx_vita_core_3000::set_tick_rate, perif.framer, _1))
+ .add_coerced_subscriber(boost::bind(&rx_dsp_core_3000::set_tick_rate, perif.ddc, _1));
const fs_path rx_dsp_path = mb_path / "rx_dsps" / str(boost::format("%u") % instance);
_tree->create<meta_range_t>(rx_dsp_path / "rate" / "range")
- .publish(boost::bind(&rx_dsp_core_3000::get_host_rates, perif.ddc));
+ .set_publisher(boost::bind(&rx_dsp_core_3000::get_host_rates, perif.ddc));
_tree->create<double>(rx_dsp_path / "rate" / "value")
- .coerce(boost::bind(&rx_dsp_core_3000::set_host_rate, perif.ddc, _1))
- .subscribe(boost::bind(&n230_stream_manager::update_rx_samp_rate, _stream_mgr, instance, _1))
+ .set_coercer(boost::bind(&rx_dsp_core_3000::set_host_rate, perif.ddc, _1))
+ .add_coerced_subscriber(boost::bind(&n230_stream_manager::update_rx_samp_rate, _stream_mgr, instance, _1))
.set(n230::DEFAULT_RX_SAMP_RATE);
_tree->create<double>(rx_dsp_path / "freq" / "value")
- .coerce(boost::bind(&rx_dsp_core_3000::set_freq, perif.ddc, _1))
+ .set_coercer(boost::bind(&rx_dsp_core_3000::set_freq, perif.ddc, _1))
.set(n230::DEFAULT_DDC_FREQ);
_tree->create<meta_range_t>(rx_dsp_path / "freq" / "range")
- .publish(boost::bind(&rx_dsp_core_3000::get_freq_range, perif.ddc));
+ .set_publisher(boost::bind(&rx_dsp_core_3000::get_freq_range, perif.ddc));
_tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd")
- .subscribe(boost::bind(&rx_vita_core_3000::issue_stream_command, perif.framer, _1));
+ .add_coerced_subscriber(boost::bind(&rx_vita_core_3000::issue_stream_command, perif.framer, _1));
//TX DSP
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&tx_dsp_core_3000::set_tick_rate, perif.duc, _1));
+ .add_coerced_subscriber(boost::bind(&tx_dsp_core_3000::set_tick_rate, perif.duc, _1));
const fs_path tx_dsp_path = mb_path / "tx_dsps" / str(boost::format("%u") % instance);
_tree->create<meta_range_t>(tx_dsp_path / "rate" / "range")
- .publish(boost::bind(&tx_dsp_core_3000::get_host_rates, perif.duc));
+ .set_publisher(boost::bind(&tx_dsp_core_3000::get_host_rates, perif.duc));
_tree->create<double>(tx_dsp_path / "rate" / "value")
- .coerce(boost::bind(&tx_dsp_core_3000::set_host_rate, perif.duc, _1))
- .subscribe(boost::bind(&n230_stream_manager::update_tx_samp_rate, _stream_mgr, instance, _1))
+ .set_coercer(boost::bind(&tx_dsp_core_3000::set_host_rate, perif.duc, _1))
+ .add_coerced_subscriber(boost::bind(&n230_stream_manager::update_tx_samp_rate, _stream_mgr, instance, _1))
.set(n230::DEFAULT_TX_SAMP_RATE);
_tree->create<double>(tx_dsp_path / "freq" / "value")
- .coerce(boost::bind(&tx_dsp_core_3000::set_freq, perif.duc, _1))
+ .set_coercer(boost::bind(&tx_dsp_core_3000::set_freq, perif.duc, _1))
.set(n230::DEFAULT_DUC_FREQ);
_tree->create<meta_range_t>(tx_dsp_path / "freq" / "range")
- .publish(boost::bind(&tx_dsp_core_3000::get_freq_range, perif.duc));
+ .set_publisher(boost::bind(&tx_dsp_core_3000::get_freq_range, perif.duc));
//RF Frontend Interfacing
static const std::vector<direction_t> data_directions = boost::assign::list_of(RX_DIRECTION)(TX_DIRECTION);
@@ -517,7 +517,7 @@ void n230_impl::_initialize_radio_properties(const fs_path& mb_path, size_t inst
_tree->create<std::vector<std::string> >(rf_fe_path / "antenna" / "options")
.set(ants);
_tree->create<std::string>(rf_fe_path / "antenna" / "value")
- .subscribe(boost::bind(&n230_frontend_ctrl::set_antenna_sel, _resource_mgr->get_frontend_ctrl_sptr(), instance, _1))
+ .add_coerced_subscriber(boost::bind(&n230_frontend_ctrl::set_antenna_sel, _resource_mgr->get_frontend_ctrl_sptr(), instance, _1))
.set("RX2");
}
if (key[0] == 'T') {
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index dbd5408e8..cd9b1356f 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -209,13 +209,13 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
const fs_path mb_path = "/mboards/0";
_tree->create<std::string>(mb_path / "name").set("USRP1");
_tree->create<std::string>(mb_path / "load_eeprom")
- .subscribe(boost::bind(&fx2_ctrl::usrp_load_eeprom, _fx2_ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&fx2_ctrl::usrp_load_eeprom, _fx2_ctrl, _1));
////////////////////////////////////////////////////////////////////
// create user-defined control objects
////////////////////////////////////////////////////////////////////
_tree->create<std::pair<boost::uint8_t, boost::uint32_t> >(mb_path / "user" / "regs")
- .subscribe(boost::bind(&usrp1_impl::set_reg, this, _1));
+ .add_coerced_subscriber(boost::bind(&usrp1_impl::set_reg, this, _1));
////////////////////////////////////////////////////////////////////
// setup the mboard eeprom
@@ -223,7 +223,7 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
const mboard_eeprom_t mb_eeprom(*_fx2_ctrl, USRP1_EEPROM_MAP_KEY);
_tree->create<mboard_eeprom_t>(mb_path / "eeprom")
.set(mb_eeprom)
- .subscribe(boost::bind(&usrp1_impl::set_mb_eeprom, this, _1));
+ .add_coerced_subscriber(boost::bind(&usrp1_impl::set_mb_eeprom, this, _1));
////////////////////////////////////////////////////////////////////
// create clock control objects
@@ -247,7 +247,7 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
}
UHD_MSG(status) << boost::format("Using FPGA clock rate of %fMHz...") % (_master_clock_rate/1e6) << std::endl;
_tree->create<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&usrp1_impl::update_tick_rate, this, _1))
+ .add_coerced_subscriber(boost::bind(&usrp1_impl::update_tick_rate, this, _1))
.set(_master_clock_rate);
////////////////////////////////////////////////////////////////////
@@ -260,13 +260,13 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
_tree->create<std::string>(rx_codec_path / "name").set("ad9522");
_tree->create<meta_range_t>(rx_codec_path / "gains/pga/range").set(usrp1_codec_ctrl::rx_pga_gain_range);
_tree->create<double>(rx_codec_path / "gains/pga/value")
- .coerce(boost::bind(&usrp1_impl::update_rx_codec_gain, this, db, _1))
+ .set_coercer(boost::bind(&usrp1_impl::update_rx_codec_gain, this, db, _1))
.set(0.0);
_tree->create<std::string>(tx_codec_path / "name").set("ad9522");
_tree->create<meta_range_t>(tx_codec_path / "gains/pga/range").set(usrp1_codec_ctrl::tx_pga_gain_range);
_tree->create<double>(tx_codec_path / "gains/pga/value")
- .subscribe(boost::bind(&usrp1_codec_ctrl::set_tx_pga_gain, _dbc[db].codec, _1))
- .publish(boost::bind(&usrp1_codec_ctrl::get_tx_pga_gain, _dbc[db].codec))
+ .add_coerced_subscriber(boost::bind(&usrp1_codec_ctrl::set_tx_pga_gain, _dbc[db].codec, _1))
+ .set_publisher(boost::bind(&usrp1_codec_ctrl::get_tx_pga_gain, _dbc[db].codec))
.set(0.0);
}
@@ -281,18 +281,18 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
////////////////////////////////////////////////////////////////////
_tree->create<subdev_spec_t>(mb_path / "rx_subdev_spec")
.set(subdev_spec_t())
- .subscribe(boost::bind(&usrp1_impl::update_rx_subdev_spec, this, _1));
+ .add_coerced_subscriber(boost::bind(&usrp1_impl::update_rx_subdev_spec, this, _1));
_tree->create<subdev_spec_t>(mb_path / "tx_subdev_spec")
.set(subdev_spec_t())
- .subscribe(boost::bind(&usrp1_impl::update_tx_subdev_spec, this, _1));
+ .add_coerced_subscriber(boost::bind(&usrp1_impl::update_tx_subdev_spec, this, _1));
BOOST_FOREACH(const std::string &db, _dbc.keys()){
const fs_path rx_fe_path = mb_path / "rx_frontends" / db;
_tree->create<std::complex<double> >(rx_fe_path / "dc_offset" / "value")
- .coerce(boost::bind(&usrp1_impl::set_rx_dc_offset, this, db, _1))
+ .set_coercer(boost::bind(&usrp1_impl::set_rx_dc_offset, this, db, _1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<bool>(rx_fe_path / "dc_offset" / "enable")
- .subscribe(boost::bind(&usrp1_impl::set_enb_rx_dc_offset, this, db, _1))
+ .add_coerced_subscriber(boost::bind(&usrp1_impl::set_enb_rx_dc_offset, this, db, _1))
.set(true);
}
@@ -303,19 +303,19 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
for (size_t dspno = 0; dspno < get_num_ddcs(); dspno++){
fs_path rx_dsp_path = mb_path / str(boost::format("rx_dsps/%u") % dspno);
_tree->create<meta_range_t>(rx_dsp_path / "rate/range")
- .publish(boost::bind(&usrp1_impl::get_rx_dsp_host_rates, this));
+ .set_publisher(boost::bind(&usrp1_impl::get_rx_dsp_host_rates, this));
_tree->create<double>(rx_dsp_path / "rate/value")
.set(1e6) //some default rate
- .coerce(boost::bind(&usrp1_impl::update_rx_samp_rate, this, dspno, _1));
+ .set_coercer(boost::bind(&usrp1_impl::update_rx_samp_rate, this, dspno, _1));
_tree->create<double>(rx_dsp_path / "freq/value")
- .coerce(boost::bind(&usrp1_impl::update_rx_dsp_freq, this, dspno, _1));
+ .set_coercer(boost::bind(&usrp1_impl::update_rx_dsp_freq, this, dspno, _1));
_tree->create<meta_range_t>(rx_dsp_path / "freq/range")
- .publish(boost::bind(&usrp1_impl::get_rx_dsp_freq_range, this));
+ .set_publisher(boost::bind(&usrp1_impl::get_rx_dsp_freq_range, this));
_tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd");
if (dspno == 0){
- //only subscribe the callback for dspno 0 since it will stream all dsps
+ //only add_coerced_subscriber the callback for dspno 0 since it will stream all dsps
_tree->access<stream_cmd_t>(rx_dsp_path / "stream_cmd")
- .subscribe(boost::bind(&soft_time_ctrl::issue_stream_cmd, _soft_time_ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&soft_time_ctrl::issue_stream_cmd, _soft_time_ctrl, _1));
}
}
@@ -326,22 +326,22 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
for (size_t dspno = 0; dspno < get_num_ducs(); dspno++){
fs_path tx_dsp_path = mb_path / str(boost::format("tx_dsps/%u") % dspno);
_tree->create<meta_range_t>(tx_dsp_path / "rate/range")
- .publish(boost::bind(&usrp1_impl::get_tx_dsp_host_rates, this));
+ .set_publisher(boost::bind(&usrp1_impl::get_tx_dsp_host_rates, this));
_tree->create<double>(tx_dsp_path / "rate/value")
.set(1e6) //some default rate
- .coerce(boost::bind(&usrp1_impl::update_tx_samp_rate, this, dspno, _1));
+ .set_coercer(boost::bind(&usrp1_impl::update_tx_samp_rate, this, dspno, _1));
_tree->create<double>(tx_dsp_path / "freq/value")
- .coerce(boost::bind(&usrp1_impl::update_tx_dsp_freq, this, dspno, _1));
+ .set_coercer(boost::bind(&usrp1_impl::update_tx_dsp_freq, this, dspno, _1));
_tree->create<meta_range_t>(tx_dsp_path / "freq/range")
- .publish(boost::bind(&usrp1_impl::get_tx_dsp_freq_range, this));
+ .set_publisher(boost::bind(&usrp1_impl::get_tx_dsp_freq_range, this));
}
////////////////////////////////////////////////////////////////////
// create time control objects
////////////////////////////////////////////////////////////////////
_tree->create<time_spec_t>(mb_path / "time/now")
- .publish(boost::bind(&soft_time_ctrl::get_time, _soft_time_ctrl))
- .subscribe(boost::bind(&soft_time_ctrl::set_time, _soft_time_ctrl, _1));
+ .set_publisher(boost::bind(&soft_time_ctrl::get_time, _soft_time_ctrl))
+ .add_coerced_subscriber(boost::bind(&soft_time_ctrl::set_time, _soft_time_ctrl, _1));
_tree->create<std::vector<std::string> >(mb_path / "clock_source/options").set(std::vector<std::string>(1, "internal"));
_tree->create<std::vector<std::string> >(mb_path / "time_source/options").set(std::vector<std::string>(1, "none"));
@@ -365,13 +365,13 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
//create the properties and register subscribers
_tree->create<dboard_eeprom_t>(mb_path / "dboards" / db/ "rx_eeprom")
.set(rx_db_eeprom)
- .subscribe(boost::bind(&usrp1_impl::set_db_eeprom, this, db, "rx", _1));
+ .add_coerced_subscriber(boost::bind(&usrp1_impl::set_db_eeprom, this, db, "rx", _1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards" / db/ "tx_eeprom")
.set(tx_db_eeprom)
- .subscribe(boost::bind(&usrp1_impl::set_db_eeprom, this, db, "tx", _1));
+ .add_coerced_subscriber(boost::bind(&usrp1_impl::set_db_eeprom, this, db, "tx", _1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards" / db/ "gdb_eeprom")
.set(gdb_eeprom)
- .subscribe(boost::bind(&usrp1_impl::set_db_eeprom, this, db, "gdb", _1));
+ .add_coerced_subscriber(boost::bind(&usrp1_impl::set_db_eeprom, this, db, "gdb", _1));
//create a new dboard interface and manager
_dbc[db].dboard_iface = make_dboard_iface(
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 7b59dfaf1..938595838 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -474,15 +474,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)
- .subscribe(boost::bind(&usrp2_impl::set_mb_eeprom, this, mb, _1));
+ .add_coerced_subscriber(boost::bind(&usrp2_impl::set_mb_eeprom, this, mb, _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")
- .publish(boost::bind(&usrp2_clock_ctrl::get_master_clock_rate, _mbc[mb].clock))
- .subscribe(boost::bind(&usrp2_impl::update_tick_rate, this, _1));
+ .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));
////////////////////////////////////////////////////////////////
// create codec control objects
@@ -500,10 +500,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")
- .subscribe(boost::bind(&usrp2_codec_ctrl::set_rx_digital_gain, _mbc[mb].codec, _1)).set(0);
+ .add_coerced_subscriber(boost::bind(&usrp2_codec_ctrl::set_rx_digital_gain, _mbc[mb].codec, _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")
- .subscribe(boost::bind(&usrp2_codec_ctrl::set_rx_digital_fine_gain, _mbc[mb].codec, _1)).set(0);
+ .add_coerced_subscriber(boost::bind(&usrp2_codec_ctrl::set_rx_digital_fine_gain, _mbc[mb].codec, _1)).set(0);
}break;
case usrp2_iface::USRP2_REV3:
@@ -550,7 +550,7 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
BOOST_FOREACH(const std::string &name, _mbc[mb].gps->get_sensors())
{
_tree->create<sensor_value_t>(mb_path / "sensors" / name)
- .publish(boost::bind(&gps_ctrl::get_sensor, _mbc[mb].gps, name));
+ .set_publisher(boost::bind(&gps_ctrl::get_sensor, _mbc[mb].gps, name));
}
}
else
@@ -563,9 +563,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")
- .publish(boost::bind(&usrp2_impl::get_mimo_locked, this, mb));
+ .set_publisher(boost::bind(&usrp2_impl::get_mimo_locked, this, mb));
_tree->create<sensor_value_t>(mb_path / "sensors/ref_locked")
- .publish(boost::bind(&usrp2_impl::get_ref_locked, this, mb));
+ .set_publisher(boost::bind(&usrp2_impl::get_ref_locked, this, mb));
////////////////////////////////////////////////////////////////
// create frontend control objects
@@ -578,27 +578,27 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
);
_tree->create<subdev_spec_t>(mb_path / "rx_subdev_spec")
- .subscribe(boost::bind(&usrp2_impl::update_rx_subdev_spec, this, mb, _1));
+ .add_coerced_subscriber(boost::bind(&usrp2_impl::update_rx_subdev_spec, this, mb, _1));
_tree->create<subdev_spec_t>(mb_path / "tx_subdev_spec")
- .subscribe(boost::bind(&usrp2_impl::update_tx_subdev_spec, this, mb, _1));
+ .add_coerced_subscriber(boost::bind(&usrp2_impl::update_tx_subdev_spec, this, mb, _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")
- .coerce(boost::bind(&rx_frontend_core_200::set_dc_offset, _mbc[mb].rx_fe, _1))
+ .set_coercer(boost::bind(&rx_frontend_core_200::set_dc_offset, _mbc[mb].rx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<bool>(rx_fe_path / "dc_offset" / "enable")
- .subscribe(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, _mbc[mb].rx_fe, _1))
+ .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, _mbc[mb].rx_fe, _1))
.set(true);
_tree->create<std::complex<double> >(rx_fe_path / "iq_balance" / "value")
- .subscribe(boost::bind(&rx_frontend_core_200::set_iq_balance, _mbc[mb].rx_fe, _1))
+ .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_iq_balance, _mbc[mb].rx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<std::complex<double> >(tx_fe_path / "dc_offset" / "value")
- .coerce(boost::bind(&tx_frontend_core_200::set_dc_offset, _mbc[mb].tx_fe, _1))
+ .set_coercer(boost::bind(&tx_frontend_core_200::set_dc_offset, _mbc[mb].tx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
_tree->create<std::complex<double> >(tx_fe_path / "iq_balance" / "value")
- .subscribe(boost::bind(&tx_frontend_core_200::set_iq_balance, _mbc[mb].tx_fe, _1))
+ .add_coerced_subscriber(boost::bind(&tx_frontend_core_200::set_iq_balance, _mbc[mb].tx_fe, _1))
.set(std::complex<double>(0.0, 0.0));
////////////////////////////////////////////////////////////////
@@ -613,20 +613,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")
- .subscribe(boost::bind(&rx_dsp_core_200::set_tick_rate, _mbc[mb].rx_dsps[dspno], _1));
+ .add_coerced_subscriber(boost::bind(&rx_dsp_core_200::set_tick_rate, _mbc[mb].rx_dsps[dspno], _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")
- .publish(boost::bind(&rx_dsp_core_200::get_host_rates, _mbc[mb].rx_dsps[dspno]));
+ .set_publisher(boost::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
- .coerce(boost::bind(&rx_dsp_core_200::set_host_rate, _mbc[mb].rx_dsps[dspno], _1))
- .subscribe(boost::bind(&usrp2_impl::update_rx_samp_rate, this, mb, dspno, _1));
+ .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));
_tree->create<double>(rx_dsp_path / "freq/value")
- .coerce(boost::bind(&rx_dsp_core_200::set_freq, _mbc[mb].rx_dsps[dspno], _1));
+ .set_coercer(boost::bind(&rx_dsp_core_200::set_freq, _mbc[mb].rx_dsps[dspno], _1));
_tree->create<meta_range_t>(rx_dsp_path / "freq/range")
- .publish(boost::bind(&rx_dsp_core_200::get_freq_range, _mbc[mb].rx_dsps[dspno]));
+ .set_publisher(boost::bind(&rx_dsp_core_200::get_freq_range, _mbc[mb].rx_dsps[dspno]));
_tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd")
- .subscribe(boost::bind(&rx_dsp_core_200::issue_stream_command, _mbc[mb].rx_dsps[dspno], _1));
+ .add_coerced_subscriber(boost::bind(&rx_dsp_core_200::issue_stream_command, _mbc[mb].rx_dsps[dspno], _1));
}
////////////////////////////////////////////////////////////////
@@ -637,17 +637,17 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
);
_mbc[mb].tx_dsp->set_link_rate(USRP2_LINK_RATE_BPS);
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&tx_dsp_core_200::set_tick_rate, _mbc[mb].tx_dsp, _1));
+ .add_coerced_subscriber(boost::bind(&tx_dsp_core_200::set_tick_rate, _mbc[mb].tx_dsp, _1));
_tree->create<meta_range_t>(mb_path / "tx_dsps/0/rate/range")
- .publish(boost::bind(&tx_dsp_core_200::get_host_rates, _mbc[mb].tx_dsp));
+ .set_publisher(boost::bind(&tx_dsp_core_200::get_host_rates, _mbc[mb].tx_dsp));
_tree->create<double>(mb_path / "tx_dsps/0/rate/value")
.set(1e6) //some default
- .coerce(boost::bind(&tx_dsp_core_200::set_host_rate, _mbc[mb].tx_dsp, _1))
- .subscribe(boost::bind(&usrp2_impl::update_tx_samp_rate, this, mb, 0, _1));
+ .set_coercer(boost::bind(&tx_dsp_core_200::set_host_rate, _mbc[mb].tx_dsp, _1))
+ .add_coerced_subscriber(boost::bind(&usrp2_impl::update_tx_samp_rate, this, mb, 0, _1));
_tree->create<double>(mb_path / "tx_dsps/0/freq/value")
- .coerce(boost::bind(&tx_dsp_core_200::set_freq, _mbc[mb].tx_dsp, _1));
+ .set_coercer(boost::bind(&tx_dsp_core_200::set_freq, _mbc[mb].tx_dsp, _1));
_tree->create<meta_range_t>(mb_path / "tx_dsps/0/freq/range")
- .publish(boost::bind(&tx_dsp_core_200::get_freq_range, _mbc[mb].tx_dsp));
+ .set_publisher(boost::bind(&tx_dsp_core_200::get_freq_range, _mbc[mb].tx_dsp));
//setup dsp flow control
const double ups_per_sec = device_args_i.cast<double>("ups_per_sec", 20);
@@ -670,22 +670,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")
- .subscribe(boost::bind(&time64_core_200::set_tick_rate, _mbc[mb].time64, _1));
+ .add_coerced_subscriber(boost::bind(&time64_core_200::set_tick_rate, _mbc[mb].time64, _1));
_tree->create<time_spec_t>(mb_path / "time/now")
- .publish(boost::bind(&time64_core_200::get_time_now, _mbc[mb].time64))
- .subscribe(boost::bind(&time64_core_200::set_time_now, _mbc[mb].time64, _1));
+ .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));
_tree->create<time_spec_t>(mb_path / "time/pps")
- .publish(boost::bind(&time64_core_200::get_time_last_pps, _mbc[mb].time64))
- .subscribe(boost::bind(&time64_core_200::set_time_next_pps, _mbc[mb].time64, _1));
+ .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));
//setup time source props
_tree->create<std::string>(mb_path / "time_source/value")
- .subscribe(boost::bind(&time64_core_200::set_time_source, _mbc[mb].time64, _1))
+ .add_coerced_subscriber(boost::bind(&time64_core_200::set_time_source, _mbc[mb].time64, _1))
.set("none");
_tree->create<std::vector<std::string> >(mb_path / "time_source/options")
- .publish(boost::bind(&time64_core_200::get_time_sources, _mbc[mb].time64));
+ .set_publisher(boost::bind(&time64_core_200::get_time_sources, _mbc[mb].time64));
//setup reference source props
_tree->create<std::string>(mb_path / "clock_source/value")
- .subscribe(boost::bind(&usrp2_impl::update_clock_source, this, mb, _1))
+ .add_coerced_subscriber(boost::bind(&usrp2_impl::update_clock_source, this, mb, _1))
.set("internal");
std::vector<std::string> clock_sources = boost::assign::list_of("internal")("external")("mimo");
if (_mbc[mb].gps and _mbc[mb].gps->gps_detected()) clock_sources.push_back("gpsdo");
@@ -697,18 +697,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")
- .subscribe(boost::bind(&usrp2_fifo_ctrl::set_time, _mbc[mb].fifo_ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&usrp2_fifo_ctrl::set_time, _mbc[mb].fifo_ctrl, _1));
default: break; //otherwise, do not register
}
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&usrp2_fifo_ctrl::set_tick_rate, _mbc[mb].fifo_ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&usrp2_fifo_ctrl::set_tick_rate, _mbc[mb].fifo_ctrl, _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")
- .subscribe(boost::bind(&user_settings_core_200::set_reg, _mbc[mb].user, _1));
+ .add_coerced_subscriber(boost::bind(&user_settings_core_200::set_reg, _mbc[mb].user, _1));
////////////////////////////////////////////////////////////////
// create dboard control objects
@@ -726,13 +726,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)
- .subscribe(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "rx", _1));
+ .add_coerced_subscriber(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "rx", _1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/tx_eeprom")
.set(tx_db_eeprom)
- .subscribe(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "tx", _1));
+ .add_coerced_subscriber(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "tx", _1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/gdb_eeprom")
.set(gdb_eeprom)
- .subscribe(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "gdb", _1));
+ .add_coerced_subscriber(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "gdb", _1));
//create a new dboard interface and manager
_mbc[mb].dboard_iface = make_usrp2_dboard_iface(_mbc[mb].wbiface, _mbc[mb].iface/*i2c*/, _mbc[mb].spiface, _mbc[mb].clock);
@@ -746,12 +746,12 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
const fs_path db_tx_fe_path = mb_path / "dboards" / "A" / "tx_frontends";
BOOST_FOREACH(const std::string &name, _tree->list(db_tx_fe_path)){
_tree->access<double>(db_tx_fe_path / name / "freq" / "value")
- .subscribe(boost::bind(&usrp2_impl::set_tx_fe_corrections, this, mb, _1));
+ .add_coerced_subscriber(boost::bind(&usrp2_impl::set_tx_fe_corrections, this, mb, _1));
}
const fs_path db_rx_fe_path = mb_path / "dboards" / "A" / "rx_frontends";
BOOST_FOREACH(const std::string &name, _tree->list(db_rx_fe_path)){
_tree->access<double>(db_rx_fe_path / name / "freq" / "value")
- .subscribe(boost::bind(&usrp2_impl::set_rx_fe_corrections, this, mb, _1));
+ .add_coerced_subscriber(boost::bind(&usrp2_impl::set_rx_fe_corrections, this, mb, _1));
}
}
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 9a31ac98e..fc8e2090b 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -578,7 +578,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
const mboard_eeprom_t mb_eeprom(*eeprom16, "X300");
_tree->create<mboard_eeprom_t>(mb_path / "eeprom")
.set(mb_eeprom)
- .subscribe(boost::bind(&x300_impl::set_mb_eeprom, this, mb.zpu_i2c, _1));
+ .add_coerced_subscriber(boost::bind(&x300_impl::set_mb_eeprom, this, mb.zpu_i2c, _1));
bool recover_mb_eeprom = dev_addr.has_key("recover_mb_eeprom");
if (recover_mb_eeprom) {
@@ -700,7 +700,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
// create clock properties
////////////////////////////////////////////////////////////////////
_tree->create<double>(mb_path / "tick_rate")
- .publish(boost::bind(&x300_clock_ctrl::get_master_clock_rate, mb.clock));
+ .set_publisher(boost::bind(&x300_clock_ctrl::get_master_clock_rate, mb.clock));
_tree->create<time_spec_t>(mb_path / "time" / "cmd");
@@ -729,7 +729,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
BOOST_FOREACH(const std::string &name, mb.gps->get_sensors())
{
_tree->create<sensor_value_t>(mb_path / "sensors" / name)
- .publish(boost::bind(&gps_ctrl::get_sensor, mb.gps, name));
+ .set_publisher(boost::bind(&gps_ctrl::get_sensor, mb.gps, name));
}
}
else
@@ -801,35 +801,35 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
{
_tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / attr.second)
.set(0)
- .subscribe(boost::bind(&gpio_atr_3000::set_gpio_attr, mb.fp_gpio, attr.first, _1));
+ .add_coerced_subscriber(boost::bind(&gpio_atr_3000::set_gpio_attr, mb.fp_gpio, attr.first, _1));
}
_tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "READBACK")
- .publish(boost::bind(&gpio_atr_3000::read_gpio, mb.fp_gpio));
+ .set_publisher(boost::bind(&gpio_atr_3000::read_gpio, mb.fp_gpio));
////////////////////////////////////////////////////////////////////
// register the time keepers - only one can be the highlander
////////////////////////////////////////////////////////////////////
_tree->create<time_spec_t>(mb_path / "time" / "now")
- .publish(boost::bind(&time_core_3000::get_time_now, mb.radio_perifs[0].time64))
- .subscribe(boost::bind(&x300_impl::sync_times, this, mb, _1))
+ .set_publisher(boost::bind(&time_core_3000::get_time_now, mb.radio_perifs[0].time64))
+ .add_coerced_subscriber(boost::bind(&x300_impl::sync_times, this, mb, _1))
.set(0.0);
_tree->create<time_spec_t>(mb_path / "time" / "pps")
- .publish(boost::bind(&time_core_3000::get_time_last_pps, mb.radio_perifs[0].time64))
- .subscribe(boost::bind(&time_core_3000::set_time_next_pps, mb.radio_perifs[0].time64, _1))
- .subscribe(boost::bind(&time_core_3000::set_time_next_pps, mb.radio_perifs[1].time64, _1));
+ .set_publisher(boost::bind(&time_core_3000::get_time_last_pps, mb.radio_perifs[0].time64))
+ .add_coerced_subscriber(boost::bind(&time_core_3000::set_time_next_pps, mb.radio_perifs[0].time64, _1))
+ .add_coerced_subscriber(boost::bind(&time_core_3000::set_time_next_pps, mb.radio_perifs[1].time64, _1));
////////////////////////////////////////////////////////////////////
// setup time sources and properties
////////////////////////////////////////////////////////////////////
_tree->create<std::string>(mb_path / "time_source" / "value")
.set("internal")
- .subscribe(boost::bind(&x300_impl::update_time_source, this, boost::ref(mb), _1));
+ .add_coerced_subscriber(boost::bind(&x300_impl::update_time_source, this, boost::ref(mb), _1));
static const std::vector<std::string> time_sources = boost::assign::list_of("internal")("external")("gpsdo");
_tree->create<std::vector<std::string> >(mb_path / "time_source" / "options").set(time_sources);
//setup the time output, default to ON
_tree->create<bool>(mb_path / "time_source" / "output")
- .subscribe(boost::bind(&x300_impl::set_time_source_out, this, boost::ref(mb), _1))
+ .add_coerced_subscriber(boost::bind(&x300_impl::set_time_source_out, this, boost::ref(mb), _1))
.set(true);
////////////////////////////////////////////////////////////////////
@@ -837,7 +837,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
////////////////////////////////////////////////////////////////////
_tree->create<std::string>(mb_path / "clock_source" / "value")
.set("internal")
- .subscribe(boost::bind(&x300_impl::update_clock_source, this, boost::ref(mb), _1));
+ .add_coerced_subscriber(boost::bind(&x300_impl::update_clock_source, this, boost::ref(mb), _1));
static const std::vector<std::string> clock_source_options = boost::assign::list_of("internal")("external")("gpsdo");
_tree->create<std::vector<std::string> >(mb_path / "clock_source" / "options").set(clock_source_options);
@@ -853,12 +853,12 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
//setup the clock output, default to ON
_tree->create<bool>(mb_path / "clock_source" / "output")
- .subscribe(boost::bind(&x300_clock_ctrl::set_ref_out, mb.clock, _1));
+ .add_coerced_subscriber(boost::bind(&x300_clock_ctrl::set_ref_out, mb.clock, _1));
//initialize tick rate (must be done before setting time)
_tree->access<double>(mb_path / "tick_rate")
- .subscribe(boost::bind(&x300_impl::set_tick_rate, this, boost::ref(mb), _1))
- .subscribe(boost::bind(&x300_impl::update_tick_rate, this, boost::ref(mb), _1))
+ .add_coerced_subscriber(boost::bind(&x300_impl::set_tick_rate, this, boost::ref(mb), _1))
+ .add_coerced_subscriber(boost::bind(&x300_impl::update_tick_rate, this, boost::ref(mb), _1))
.set(mb.clock->get_master_clock_rate());
////////////////////////////////////////////////////////////////////
@@ -868,15 +868,15 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
_tree->create<std::vector<size_t> >(mb_path / "rx_chan_dsp_mapping").set(default_map);
_tree->create<std::vector<size_t> >(mb_path / "tx_chan_dsp_mapping").set(default_map);
_tree->create<subdev_spec_t>(mb_path / "rx_subdev_spec")
- .subscribe(boost::bind(&x300_impl::update_subdev_spec, this, "rx", mb_i, _1));
+ .add_coerced_subscriber(boost::bind(&x300_impl::update_subdev_spec, this, "rx", mb_i, _1));
_tree->create<subdev_spec_t>(mb_path / "tx_subdev_spec")
- .subscribe(boost::bind(&x300_impl::update_subdev_spec, this, "tx", mb_i, _1));
+ .add_coerced_subscriber(boost::bind(&x300_impl::update_subdev_spec, this, "tx", mb_i, _1));
////////////////////////////////////////////////////////////////////
// and do the misc mboard sensors
////////////////////////////////////////////////////////////////////
_tree->create<sensor_value_t>(mb_path / "sensors" / "ref_locked")
- .publish(boost::bind(&x300_impl::get_ref_locked, this, mb));
+ .set_publisher(boost::bind(&x300_impl::get_ref_locked, this, mb));
////////////////////////////////////////////////////////////////////
// do some post-init tasks
@@ -1008,7 +1008,7 @@ void x300_impl::setup_radio(const size_t mb_i, const std::string &slot_name, con
self_cal_adc_capture_delay(mb, radio_index, dev_addr.has_key("self_cal_adc_delay"));
_tree->access<time_spec_t>(mb_path / "time" / "cmd")
- .subscribe(boost::bind(&radio_ctrl_core_3000::set_time, perif.ctrl, _1));
+ .add_coerced_subscriber(boost::bind(&radio_ctrl_core_3000::set_time, perif.ctrl, _1));
////////////////////////////////////////////////////////////////
// create codec control objects
@@ -1020,7 +1020,7 @@ void x300_impl::setup_radio(const size_t mb_i, const std::string &slot_name, con
_tree->create<meta_range_t>(mb_path / "rx_codecs" / slot_name / "gains" / "digital" / "range").set(meta_range_t(0, 6.0, 0.5));
_tree->create<double>(mb_path / "rx_codecs" / slot_name / "gains" / "digital" / "value")
- .subscribe(boost::bind(&x300_adc_ctrl::set_gain, perif.adc, _1)).set(0);
+ .add_coerced_subscriber(boost::bind(&x300_adc_ctrl::set_gain, perif.adc, _1)).set(0);
////////////////////////////////////////////////////////////////////
// front end corrections
@@ -1034,10 +1034,10 @@ void x300_impl::setup_radio(const size_t mb_i, const std::string &slot_name, con
const fs_path rx_dsp_path = mb_path / "rx_dsps" / str(boost::format("%u") % radio_index);
perif.ddc->populate_subtree(_tree->subtree(rx_dsp_path));
_tree->access<double>(rx_dsp_path / "rate" / "value")
- .subscribe(boost::bind(&x300_impl::update_rx_samp_rate, this, boost::ref(mb), radio_index, _1))
+ .add_coerced_subscriber(boost::bind(&x300_impl::update_rx_samp_rate, this, boost::ref(mb), radio_index, _1))
;
_tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd")
- .subscribe(boost::bind(&rx_vita_core_3000::issue_stream_command, perif.framer, _1));
+ .add_coerced_subscriber(boost::bind(&rx_vita_core_3000::issue_stream_command, perif.framer, _1));
////////////////////////////////////////////////////////////////////
// connect tx dsp control objects
@@ -1045,7 +1045,7 @@ void x300_impl::setup_radio(const size_t mb_i, const std::string &slot_name, con
const fs_path tx_dsp_path = mb_path / "tx_dsps" / str(boost::format("%u") % radio_index);
perif.duc->populate_subtree(_tree->subtree(tx_dsp_path));
_tree->access<double>(tx_dsp_path / "rate" / "value")
- .subscribe(boost::bind(&x300_impl::update_tx_samp_rate, this, boost::ref(mb), radio_index, _1))
+ .add_coerced_subscriber(boost::bind(&x300_impl::update_tx_samp_rate, this, boost::ref(mb), radio_index, _1))
;
////////////////////////////////////////////////////////////////////
@@ -1055,13 +1055,13 @@ void x300_impl::setup_radio(const size_t mb_i, const std::string &slot_name, con
const size_t j = (slot_name == "B")? 0x2 : 0x0;
_tree->create<dboard_eeprom_t>(db_path / "rx_eeprom")
.set(mb.db_eeproms[X300_DB0_RX_EEPROM | j])
- .subscribe(boost::bind(&x300_impl::set_db_eeprom, this, mb.zpu_i2c, (0x50 | X300_DB0_RX_EEPROM | j), _1));
+ .add_coerced_subscriber(boost::bind(&x300_impl::set_db_eeprom, this, mb.zpu_i2c, (0x50 | X300_DB0_RX_EEPROM | j), _1));
_tree->create<dboard_eeprom_t>(db_path / "tx_eeprom")
.set(mb.db_eeproms[X300_DB0_TX_EEPROM | j])
- .subscribe(boost::bind(&x300_impl::set_db_eeprom, this, mb.zpu_i2c, (0x50 | X300_DB0_TX_EEPROM | j), _1));
+ .add_coerced_subscriber(boost::bind(&x300_impl::set_db_eeprom, this, mb.zpu_i2c, (0x50 | X300_DB0_TX_EEPROM | j), _1));
_tree->create<dboard_eeprom_t>(db_path / "gdb_eeprom")
.set(mb.db_eeproms[X300_DB0_GDB_EEPROM | j])
- .subscribe(boost::bind(&x300_impl::set_db_eeprom, this, mb.zpu_i2c, (0x50 | X300_DB0_GDB_EEPROM | j), _1));
+ .add_coerced_subscriber(boost::bind(&x300_impl::set_db_eeprom, this, mb.zpu_i2c, (0x50 | X300_DB0_GDB_EEPROM | j), _1));
//create a new dboard interface
x300_dboard_iface_config_t db_config;
@@ -1090,19 +1090,19 @@ void x300_impl::setup_radio(const size_t mb_i, const std::string &slot_name, con
//now that dboard is created -- register into rx antenna event
const std::string fe_name = _tree->list(db_path / "rx_frontends").front();
_tree->access<std::string>(db_path / "rx_frontends" / fe_name / "antenna" / "value")
- .subscribe(boost::bind(&x300_impl::update_atr_leds, this, mb.radio_perifs[radio_index].leds, _1));
+ .add_coerced_subscriber(boost::bind(&x300_impl::update_atr_leds, this, mb.radio_perifs[radio_index].leds, _1));
this->update_atr_leds(mb.radio_perifs[radio_index].leds, ""); //init anyway, even if never called
//bind frontend corrections to the dboard freq props
const fs_path db_tx_fe_path = db_path / "tx_frontends";
BOOST_FOREACH(const std::string &name, _tree->list(db_tx_fe_path)) {
_tree->access<double>(db_tx_fe_path / name / "freq" / "value")
- .subscribe(boost::bind(&x300_impl::set_tx_fe_corrections, this, mb_path, slot_name, _1));
+ .add_coerced_subscriber(boost::bind(&x300_impl::set_tx_fe_corrections, this, mb_path, slot_name, _1));
}
const fs_path db_rx_fe_path = db_path / "rx_frontends";
BOOST_FOREACH(const std::string &name, _tree->list(db_rx_fe_path)) {
_tree->access<double>(db_rx_fe_path / name / "freq" / "value")
- .subscribe(boost::bind(&x300_impl::set_rx_fe_corrections, this, mb_path, slot_name, _1));
+ .add_coerced_subscriber(boost::bind(&x300_impl::set_rx_fe_corrections, this, mb_path, slot_name, _1));
}
}
diff --git a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
index 22c26b42c..cd851976f 100644
--- a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
+++ b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
@@ -236,21 +236,21 @@ octoclock_impl::octoclock_impl(const device_addr_t &_device_addr){
_oc_dict[oc].eeprom = octoclock_eeprom_t(_oc_dict[oc].ctrl_xport);
_tree->create<octoclock_eeprom_t>(oc_path / "eeprom")
.set(_oc_dict[oc].eeprom)
- .subscribe(boost::bind(&octoclock_impl::_set_eeprom, this, oc, _1));
+ .add_coerced_subscriber(boost::bind(&octoclock_impl::_set_eeprom, this, oc, _1));
////////////////////////////////////////////////////////////////////
// Initialize non-GPSDO sensors
////////////////////////////////////////////////////////////////////
_tree->create<boost::uint32_t>(oc_path / "time")
- .publish(boost::bind(&octoclock_impl::_get_time, this, oc));
+ .set_publisher(boost::bind(&octoclock_impl::_get_time, this, oc));
_tree->create<sensor_value_t>(oc_path / "sensors/ext_ref_detected")
- .publish(boost::bind(&octoclock_impl::_ext_ref_detected, this, oc));
+ .set_publisher(boost::bind(&octoclock_impl::_ext_ref_detected, this, oc));
_tree->create<sensor_value_t>(oc_path / "sensors/gps_detected")
- .publish(boost::bind(&octoclock_impl::_gps_detected, this, oc));
+ .set_publisher(boost::bind(&octoclock_impl::_gps_detected, this, oc));
_tree->create<sensor_value_t>(oc_path / "sensors/using_ref")
- .publish(boost::bind(&octoclock_impl::_which_ref, this, oc));
+ .set_publisher(boost::bind(&octoclock_impl::_which_ref, this, oc));
_tree->create<sensor_value_t>(oc_path / "sensors/switch_pos")
- .publish(boost::bind(&octoclock_impl::_switch_pos, this, oc));
+ .set_publisher(boost::bind(&octoclock_impl::_switch_pos, this, oc));
////////////////////////////////////////////////////////////////////
// Check reference and GPSDO
@@ -270,7 +270,7 @@ octoclock_impl::octoclock_impl(const device_addr_t &_device_addr){
if(_oc_dict[oc].gps and _oc_dict[oc].gps->gps_detected()){
BOOST_FOREACH(const std::string &name, _oc_dict[oc].gps->get_sensors()){
_tree->create<sensor_value_t>(oc_path / "sensors" / name)
- .publish(boost::bind(&gps_ctrl::get_sensor, _oc_dict[oc].gps, name));
+ .set_publisher(boost::bind(&gps_ctrl::get_sensor, _oc_dict[oc].gps, name));
}
}
else{