aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b100/b100_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/b100/b100_impl.cpp')
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index 1a38bf3b7..25f99e85e 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -19,7 +19,7 @@
#include "b100_impl.hpp"
#include "b100_regs.hpp"
#include <uhd/transport/usb_control.hpp>
-#include <uhd/utils/msg.hpp>
+#include <uhd/utils/log.hpp>
#include <uhd/utils/cast.hpp>
#include <uhd/exception.hpp>
#include <uhd/utils/static.hpp>
@@ -73,17 +73,17 @@ static device_addrs_t b100_find(const device_addr_t &hint)
//find the usrps and load firmware
size_t found = 0;
- BOOST_FOREACH(usb_device_handle::sptr handle, usb_device_handle::get_device_list(vid, pid)) {
+ for(usb_device_handle::sptr handle: usb_device_handle::get_device_list(vid, pid)) {
//extract the firmware path for the b100
std::string b100_fw_image;
try{
b100_fw_image = find_image_path(hint.get("fw", B100_FW_FILE_NAME));
}
catch(...){
- UHD_MSG(warning) << boost::format("Could not locate B100 firmware. %s\n") % print_utility_error("uhd_images_downloader.py");
+ UHD_LOGGER_WARNING("B100") << boost::format("Could not locate B100 firmware. %s\n") % print_utility_error("uhd_images_downloader.py");
return b100_addrs;
}
- UHD_LOG << "the firmware image: " << b100_fw_image << std::endl;
+ UHD_LOGGER_DEBUG("B100") << "the firmware image: " << b100_fw_image ;
usb_control::sptr control;
try{control = usb_control::make(handle, 0);}
@@ -102,7 +102,7 @@ static device_addrs_t b100_find(const device_addr_t &hint)
//search for the device until found or timeout
while (boost::get_system_time() < timeout_time and b100_addrs.empty() and found != 0)
{
- BOOST_FOREACH(usb_device_handle::sptr handle, usb_device_handle::get_device_list(vid, pid))
+ for(usb_device_handle::sptr handle: usb_device_handle::get_device_list(vid, pid))
{
usb_control::sptr control;
try{control = usb_control::make(handle, 0);}
@@ -161,7 +161,7 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
//locate the matching handle in the device list
usb_device_handle::sptr handle;
- BOOST_FOREACH(usb_device_handle::sptr dev_handle, device_list) {
+ for(usb_device_handle::sptr dev_handle: device_list) {
if (dev_handle->get_serial() == device_addr["serial"]){
handle = dev_handle;
break;
@@ -202,9 +202,9 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
//try reset once in the case of failure
catch(const uhd::exception &ex){
if (initialization_count > 1) throw;
- UHD_MSG(warning) <<
+ UHD_LOGGER_WARNING("B100") <<
"The control endpoint was left in a bad state.\n"
- "Attempting endpoint re-enumeration...\n" << ex.what() << std::endl;
+ "Attempting endpoint re-enumeration...\n" << ex.what() ;
_fifo_ctrl.reset();
_ctrl_transport.reset();
_fx2_ctrl->usrp_fx2_reset();
@@ -230,9 +230,9 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
//try reset once in the case of failure
catch(const uhd::exception &){
if (initialization_count > 1) throw;
- UHD_MSG(warning) <<
+ UHD_LOGGER_WARNING("B100") <<
"The control endpoint was left in a bad state.\n"
- "Attempting endpoint re-enumeration...\n" << std::endl;
+ "Attempting endpoint re-enumeration...\n" ;
_fifo_ctrl.reset();
_ctrl_transport.reset();
_fx2_ctrl->usrp_fx2_reset();
@@ -478,12 +478,12 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
//bind frontend corrections to the dboard freq props
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)){
+ for(const std::string &name: _tree->list(db_tx_fe_path)){
_tree->access<double>(db_tx_fe_path / name / "freq" / "value")
.add_coerced_subscriber(boost::bind(&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)){
+ for(const std::string &name: _tree->list(db_rx_fe_path)){
_tree->access<double>(db_rx_fe_path / name / "freq" / "value")
.add_coerced_subscriber(boost::bind(&b100_impl::set_rx_fe_corrections, this, _1));
}
@@ -504,10 +504,10 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
.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")){
+ for(const std::string &name: _tree->list(mb_path / "rx_dsps")){
_tree->access<double>(mb_path / "rx_dsps" / name / "freq" / "value").set(0.0);
}
- BOOST_FOREACH(const std::string &name, _tree->list(mb_path / "tx_dsps")){
+ for(const std::string &name: _tree->list(mb_path / "tx_dsps")){
_tree->access<double>(mb_path / "tx_dsps" / name / "freq" / "value").set(0.0);
}