aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-07-22 01:19:03 -0700
committerJosh Blum <josh@joshknows.com>2011-07-22 13:59:47 -0700
commitda40a1aebc16ca05219883c18b2cf96989c470fd (patch)
tree24d3c902b2d5795755be3171388fef81a0da3a7a /host/lib/usrp
parent833b5369378d5788dd430451803bf36a96dc3901 (diff)
downloaduhd-da40a1aebc16ca05219883c18b2cf96989c470fd.tar.gz
uhd-da40a1aebc16ca05219883c18b2cf96989c470fd.tar.bz2
uhd-da40a1aebc16ca05219883c18b2cf96989c470fd.zip
uhd: replaced boost filesystem path with fs_path in property tree
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp8
-rw-r--r--host/lib/usrp/b100/io_impl.cpp4
-rw-r--r--host/lib/usrp/e100/e100_impl.cpp8
-rw-r--r--host/lib/usrp/e100/io_impl.cpp4
-rw-r--r--host/lib/usrp/multi_usrp.cpp10
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp10
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp4
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp10
8 files changed, 29 insertions, 29 deletions
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index 2e2421ed3..ea9c91c50 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -209,7 +209,7 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
////////////////////////////////////////////////////////////////////
_tree = property_tree::make();
_tree->create<std::string>("/name").set("B-Series Device");
- const property_tree::path_type mb_path = "/mboards/0";
+ const fs_path mb_path = "/mboards/0";
_tree->create<std::string>(mb_path / "name").set("B100 (B-Hundo)");
_tree->create<std::string>(mb_path / "load_eeprom")
.subscribe(boost::bind(&fx2_ctrl::usrp_load_eeprom, _fx2_ctrl, _1));
@@ -234,8 +234,8 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
// create codec control objects
////////////////////////////////////////////////////////////////////
_codec_ctrl = b100_codec_ctrl::make(_fpga_spi_ctrl);
- const property_tree::path_type rx_codec_path = mb_path / "rx_codecs/A";
- const property_tree::path_type tx_codec_path = mb_path / "tx_codecs/A";
+ const fs_path rx_codec_path = mb_path / "rx_codecs/A";
+ const fs_path tx_codec_path = mb_path / "tx_codecs/A";
_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")
@@ -276,7 +276,7 @@ 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));
- property_tree::path_type rx_dsp_path = mb_path / str(boost::format("rx_dsps/%u") % dspno);
+ fs_path rx_dsp_path = mb_path / str(boost::format("rx_dsps/%u") % dspno);
_tree->create<double>(rx_dsp_path / "rate/value")
.coerce(boost::bind(&rx_dsp_core_200::set_host_rate, _rx_dsps[dspno], _1))
.subscribe(boost::bind(&b100_impl::update_rx_samp_rate, this, _1));
diff --git a/host/lib/usrp/b100/io_impl.cpp b/host/lib/usrp/b100/io_impl.cpp
index d841188c0..34535217a 100644
--- a/host/lib/usrp/b100/io_impl.cpp
+++ b/host/lib/usrp/b100/io_impl.cpp
@@ -140,7 +140,7 @@ void b100_impl::update_tx_samp_rate(const double rate){
void b100_impl::update_rx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
boost::mutex::scoped_lock recv_lock = _io_impl->recv_handler.get_scoped_lock();
- property_tree::path_type root = "/mboards/0/dboards";
+ fs_path root = "/mboards/0/dboards";
//sanity checking
validate_subdev_spec(_tree, spec, "rx");
@@ -169,7 +169,7 @@ void b100_impl::update_rx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
void b100_impl::update_tx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
boost::mutex::scoped_lock send_lock = _io_impl->send_handler.get_scoped_lock();
- property_tree::path_type root = "/mboards/0/dboards";
+ fs_path root = "/mboards/0/dboards";
//sanity checking
validate_subdev_spec(_tree, spec, "tx");
diff --git a/host/lib/usrp/e100/e100_impl.cpp b/host/lib/usrp/e100/e100_impl.cpp
index cca4ee9b3..0defb2973 100644
--- a/host/lib/usrp/e100/e100_impl.cpp
+++ b/host/lib/usrp/e100/e100_impl.cpp
@@ -170,7 +170,7 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
////////////////////////////////////////////////////////////////////
_tree = property_tree::make();
_tree->create<std::string>("/name").set("E-Series Device");
- const property_tree::path_type mb_path = "/mboards/0";
+ const fs_path mb_path = "/mboards/0";
_tree->create<std::string>(mb_path / "name").set("E100 (euewanee)");
////////////////////////////////////////////////////////////////////
@@ -193,8 +193,8 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
// create codec control objects
////////////////////////////////////////////////////////////////////
_codec_ctrl = e100_codec_ctrl::make(_fpga_spi_ctrl);
- const property_tree::path_type rx_codec_path = mb_path / "rx_codecs/A";
- const property_tree::path_type tx_codec_path = mb_path / "tx_codecs/A";
+ const fs_path rx_codec_path = mb_path / "rx_codecs/A";
+ const fs_path tx_codec_path = mb_path / "tx_codecs/A";
_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")
@@ -235,7 +235,7 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
_rx_dsps[dspno]->set_link_rate(E100_LINK_RATE_BPS);
_tree->access<double>(mb_path / "tick_rate")
.subscribe(boost::bind(&rx_dsp_core_200::set_tick_rate, _rx_dsps[dspno], _1));
- property_tree::path_type rx_dsp_path = mb_path / str(boost::format("rx_dsps/%u") % dspno);
+ fs_path rx_dsp_path = mb_path / str(boost::format("rx_dsps/%u") % dspno);
_tree->create<double>(rx_dsp_path / "rate/value")
.coerce(boost::bind(&rx_dsp_core_200::set_host_rate, _rx_dsps[dspno], _1))
.subscribe(boost::bind(&e100_impl::update_rx_samp_rate, this, _1));
diff --git a/host/lib/usrp/e100/io_impl.cpp b/host/lib/usrp/e100/io_impl.cpp
index a10b3ffb3..0b81c1a86 100644
--- a/host/lib/usrp/e100/io_impl.cpp
+++ b/host/lib/usrp/e100/io_impl.cpp
@@ -218,7 +218,7 @@ void e100_impl::update_tx_samp_rate(const double rate){
void e100_impl::update_rx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
boost::mutex::scoped_lock recv_lock = _io_impl->recv_handler.get_scoped_lock();
- property_tree::path_type root = "/mboards/0/dboards";
+ fs_path root = "/mboards/0/dboards";
//sanity checking
validate_subdev_spec(_tree, spec, "rx");
@@ -247,7 +247,7 @@ void e100_impl::update_rx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
void e100_impl::update_tx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
boost::mutex::scoped_lock send_lock = _io_impl->send_handler.get_scoped_lock();
- property_tree::path_type root = "/mboards/0/dboards";
+ fs_path root = "/mboards/0/dboards";
//sanity checking
validate_subdev_spec(_tree, spec, "tx");
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index f9f5e675f..49cbe522f 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -634,30 +634,30 @@ private:
return mcp;
}
- property_tree::path_type mb_root(const size_t mboard){
+ fs_path mb_root(const size_t mboard){
const std::string name = _tree->list("/mboards").at(mboard);
return "/mboards/" + name;
}
- property_tree::path_type rx_dsp_root(const size_t chan){
+ fs_path rx_dsp_root(const size_t chan){
mboard_chan_pair mcp = rx_chan_to_mcp(chan);
const std::string name = _tree->list(mb_root(mcp.mboard) / "rx_dsps").at(mcp.chan);
return mb_root(mcp.mboard) / "rx_dsps" / name;
}
- property_tree::path_type tx_dsp_root(const size_t chan){
+ fs_path tx_dsp_root(const size_t chan){
mboard_chan_pair mcp = tx_chan_to_mcp(chan);
const std::string name = _tree->list(mb_root(mcp.mboard) / "tx_dsps").at(mcp.chan);
return mb_root(mcp.mboard) / "tx_dsps" / name;
}
- property_tree::path_type rx_rf_fe_root(const size_t chan){
+ fs_path rx_rf_fe_root(const size_t chan){
mboard_chan_pair mcp = rx_chan_to_mcp(chan);
const subdev_spec_pair_t spec = get_rx_subdev_spec(mcp.mboard).at(mcp.chan);
return mb_root(mcp.mboard) / "dboards" / spec.db_name / "rx_frontends" / spec.sd_name;
}
- property_tree::path_type tx_rf_fe_root(const size_t chan){
+ fs_path tx_rf_fe_root(const size_t chan){
mboard_chan_pair mcp = tx_chan_to_mcp(chan);
const subdev_spec_pair_t spec = get_tx_subdev_spec(mcp.mboard).at(mcp.chan);
return mb_root(mcp.mboard) / "dboards" / spec.db_name / "tx_frontends" / spec.sd_name;
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index 7a8f6497c..7c9e61e94 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -208,7 +208,7 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
////////////////////////////////////////////////////////////////////
_tree = property_tree::make();
_tree->create<std::string>("/name").set("USRP1 Device");
- const property_tree::path_type mb_path = "/mboards/0";
+ const fs_path mb_path = "/mboards/0";
_tree->create<std::string>(mb_path / "name").set("USRP1 (Classic)");
_tree->create<std::string>(mb_path / "load_eeprom")
.subscribe(boost::bind(&fx2_ctrl::usrp_load_eeprom, _fx2_ctrl, _1));
@@ -239,8 +239,8 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
////////////////////////////////////////////////////////////////////
BOOST_FOREACH(const std::string &db, _dbc.keys()){
_dbc[db].codec = usrp1_codec_ctrl::make(_iface, (db == "A")? SPI_ENABLE_CODEC_A : SPI_ENABLE_CODEC_B);
- const property_tree::path_type rx_codec_path = mb_path / "rx_codecs" / db;
- const property_tree::path_type tx_codec_path = mb_path / "tx_codecs" / db;
+ const fs_path rx_codec_path = mb_path / "rx_codecs" / db;
+ const fs_path tx_codec_path = mb_path / "tx_codecs" / db;
_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")
@@ -270,7 +270,7 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
// create rx dsp control objects
////////////////////////////////////////////////////////////////////
for (size_t dspno = 0; dspno < get_num_ddcs(); dspno++){
- property_tree::path_type rx_dsp_path = mb_path / str(boost::format("rx_dsps/%u") % dspno);
+ fs_path rx_dsp_path = mb_path / str(boost::format("rx_dsps/%u") % dspno);
_tree->create<double>(rx_dsp_path / "rate/value")
.coerce(boost::bind(&usrp1_impl::update_rx_samp_rate, this, _1));
_tree->create<double>(rx_dsp_path / "freq/value")
@@ -289,7 +289,7 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
// create tx dsp control objects
////////////////////////////////////////////////////////////////////
for (size_t dspno = 0; dspno < get_num_ducs(); dspno++){
- property_tree::path_type tx_dsp_path = mb_path / str(boost::format("tx_dsps/%u") % dspno);
+ fs_path tx_dsp_path = mb_path / str(boost::format("tx_dsps/%u") % dspno);
_tree->create<double>(tx_dsp_path / "rate/value")
.coerce(boost::bind(&usrp1_impl::update_tx_samp_rate, this, _1));
_tree->create<double>(tx_dsp_path / "freq/value")
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index 67bf25c2b..aef3f3a39 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -316,7 +316,7 @@ static subdev_spec_t replace_zero_in_spec(const std::string &type, const subdev_
subdev_spec_t usrp2_impl::update_rx_subdev_spec(const std::string &which_mb, const subdev_spec_t &spec_){
const subdev_spec_t spec = replace_zero_in_spec("RX", spec_);
boost::mutex::scoped_lock recv_lock = _io_impl->recv_handler.get_scoped_lock();
- property_tree::path_type root = "/mboards/" + which_mb + "/dboards";
+ fs_path root = "/mboards/" + which_mb + "/dboards";
//sanity checking
validate_subdev_spec(_tree, spec, "rx", which_mb);
@@ -352,7 +352,7 @@ subdev_spec_t usrp2_impl::update_rx_subdev_spec(const std::string &which_mb, con
subdev_spec_t usrp2_impl::update_tx_subdev_spec(const std::string &which_mb, const subdev_spec_t &spec_){
const subdev_spec_t spec = replace_zero_in_spec("TX", spec_);
boost::mutex::scoped_lock send_lock = _io_impl->send_handler.get_scoped_lock();
- property_tree::path_type root = "/mboards/" + which_mb + "/dboards";
+ fs_path root = "/mboards/" + which_mb + "/dboards";
//sanity checking
validate_subdev_spec(_tree, spec, "tx", which_mb);
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 9a8269e6f..f87eb067e 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -328,7 +328,7 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
const device_addr_t device_args_i = device_args[mbi];
const std::string mb = boost::lexical_cast<std::string>(mbi);
const std::string addr = device_args_i["addr"];
- const property_tree::path_type mb_path = "/mboards/" + mb;
+ const fs_path mb_path = "/mboards/" + mb;
////////////////////////////////////////////////////////////////
// create the iface that controls i2c, spi, uart, and wb
@@ -395,8 +395,8 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
////////////////////////////////////////////////////////////////
// create codec control objects
////////////////////////////////////////////////////////////////
- const property_tree::path_type rx_codec_path = mb_path / "rx_codecs/A";
- const property_tree::path_type tx_codec_path = mb_path / "tx_codecs/A";
+ const fs_path rx_codec_path = mb_path / "rx_codecs/A";
+ const fs_path tx_codec_path = mb_path / "tx_codecs/A";
_tree->create<int>(rx_codec_path / "gains"); //phony property so this dir exists
_tree->create<int>(tx_codec_path / "gains"); //phony property so this dir exists
_mbc[mb].codec = usrp2_codec_ctrl::make(_mbc[mb].iface);
@@ -479,7 +479,7 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
//The dsp core starts streaming briefly... now we flush
_mbc[mb].rx_dsp_xports[dspno]->get_recv_buff(0.01).get(); //recv with timeout for lingering
_mbc[mb].rx_dsp_xports[dspno]->get_recv_buff(0.01).get(); //recv with timeout for expected
- property_tree::path_type rx_dsp_path = mb_path / str(boost::format("rx_dsps/%u") % dspno);
+ fs_path rx_dsp_path = mb_path / str(boost::format("rx_dsps/%u") % dspno);
_tree->create<double>(rx_dsp_path / "rate/value")
.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, _1));
@@ -595,7 +595,7 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
//do some post-init tasks
BOOST_FOREACH(const std::string &mb, _mbc.keys()){
- property_tree::path_type root = "/mboards/" + mb;
+ fs_path root = "/mboards/" + mb;
_tree->access<double>(root / "tick_rate").update();
//and now that the tick rate is set, init the host rates to something