diff options
Diffstat (limited to 'host/lib/usrp/usrp1')
| -rw-r--r-- | host/lib/usrp/usrp1/usrp1_impl.cpp | 52 | 
1 files changed, 26 insertions, 26 deletions
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(  | 
