aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/n230/n230_impl.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-04-26 13:13:32 -0700
committerMartin Braun <martin.braun@ettus.com>2018-05-02 17:01:21 -0700
commit5d9a7c92d3eb0a9cb719e6e6386d533da59a51db (patch)
tree024bda2ede2231784b55c48e1a23ab39fd97182d /host/lib/usrp/n230/n230_impl.cpp
parentc52c0b69fc151c7596f9754e6b1e40dede531134 (diff)
downloaduhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.tar.gz
uhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.tar.bz2
uhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.zip
lib: Purge use of boost::assign, except for uhd::dict
Replaced with initialization lists. Note: uhd::dict does not work with initializer lists without making changes to said data structure. This commit has no functional changes, so keeping the boost::assigns for uhd::dict.
Diffstat (limited to 'host/lib/usrp/n230/n230_impl.cpp')
-rw-r--r--host/lib/usrp/n230/n230_impl.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/host/lib/usrp/n230/n230_impl.cpp b/host/lib/usrp/n230/n230_impl.cpp
index 0595ee29d..854585ae2 100644
--- a/host/lib/usrp/n230/n230_impl.cpp
+++ b/host/lib/usrp/n230/n230_impl.cpp
@@ -32,7 +32,6 @@
#include <boost/lexical_cast.hpp>
#include <boost/bind.hpp>
#include <boost/algorithm/string.hpp>
-#include <boost/assign/list_of.hpp>
#include <boost/asio/ip/address_v4.hpp>
#include <boost/asio.hpp> //used for htonl and ntohl
#include <boost/make_shared.hpp>
@@ -342,7 +341,7 @@ void n230_impl::_initialize_property_tree(const fs_path& mb_path)
.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");
+ const std::vector<std::string> time_sources{"none", "external", "gpsdo"};
_tree->create<std::vector<std::string> >(mb_path / "time_source" / "options")
.set(time_sources);
@@ -351,7 +350,7 @@ void n230_impl::_initialize_property_tree(const fs_path& mb_path)
.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");
+ const std::vector<std::string> clock_sources{"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")
@@ -524,8 +523,7 @@ void n230_impl::_initialize_radio_properties(const fs_path& mb_path, size_t inst
.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);
- for(direction_t direction: data_directions) {
+ for (direction_t direction : std::vector<direction_t>{RX_DIRECTION, TX_DIRECTION}) {
const std::string dir_str = (direction == RX_DIRECTION) ? "rx" : "tx";
const std::string key = boost::to_upper_copy(dir_str) + str(boost::format("%u") % (instance + 1));
const fs_path rf_fe_path = mb_path / "dboards" / "A" / (dir_str + "_frontends") / ((instance==0)?"A":"B");
@@ -539,17 +537,15 @@ void n230_impl::_initialize_radio_properties(const fs_path& mb_path, size_t inst
//Setup antenna stuff
if (key[0] == 'R') {
- 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);
+ .set({"TX/RX", "RX2"});
_tree->create<std::string>(rf_fe_path / "antenna" / "value")
.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') {
- static const std::vector<std::string> ants(1, "TX/RX");
_tree->create<std::vector<std::string> >(rf_fe_path / "antenna" / "options")
- .set(ants);
+ .set({"TX/RX"});
_tree->create<std::string>(rf_fe_path / "antenna" / "value")
.set("TX/RX");
}