aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/n230
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-06-27 19:06:50 -0700
committerMartin Braun <martin.braun@ettus.com>2017-06-29 13:40:07 -0700
commit47cdd6319c74a7b823843aad5ff3fa370ed1e6ef (patch)
tree216e88f36dbb5ba0b933f0a5ec3c2a151e972589 /host/lib/usrp/n230
parent412a7053cc0698fd8e1a09d9c40ec2f96cf629af (diff)
downloaduhd-47cdd6319c74a7b823843aad5ff3fa370ed1e6ef.tar.gz
uhd-47cdd6319c74a7b823843aad5ff3fa370ed1e6ef.tar.bz2
uhd-47cdd6319c74a7b823843aad5ff3fa370ed1e6ef.zip
uhd: Replaced many lexical_cast with appropriate C++11 equivalents
Diffstat (limited to 'host/lib/usrp/n230')
-rw-r--r--host/lib/usrp/n230/n230_eeprom_manager.cpp6
-rw-r--r--host/lib/usrp/n230/n230_resource_manager.cpp4
-rw-r--r--host/lib/usrp/n230/n230_stream_manager.cpp16
3 files changed, 12 insertions, 14 deletions
diff --git a/host/lib/usrp/n230/n230_eeprom_manager.cpp b/host/lib/usrp/n230/n230_eeprom_manager.cpp
index c21eb9ddb..4a996ef61 100644
--- a/host/lib/usrp/n230/n230_eeprom_manager.cpp
+++ b/host/lib/usrp/n230/n230_eeprom_manager.cpp
@@ -68,9 +68,9 @@ const mboard_eeprom_t& n230_eeprom_manager::read_mb_eeprom()
uint16_t ver_major = uhd::htonx<uint16_t>(map.data_version_major);
uint16_t ver_minor = uhd::htonx<uint16_t>(map.data_version_minor);
- _mb_eeprom["product"] = boost::lexical_cast<std::string>(
+ _mb_eeprom["product"] = std::to_string(
uhd::htonx<uint16_t>(map.hw_product));
- _mb_eeprom["revision"] = boost::lexical_cast<std::string>(
+ _mb_eeprom["revision"] = std::to_string(
uhd::htonx<uint16_t>(map.hw_revision));
//The revision_compat field does not exist in version 1.0
//EEPROM version 1.0 will only exist on HW revision 1 so it is safe to set
@@ -78,7 +78,7 @@ const mboard_eeprom_t& n230_eeprom_manager::read_mb_eeprom()
if (ver_major == 1 and ver_minor == 0) {
_mb_eeprom["revision_compat"] = _mb_eeprom["revision"];
} else {
- _mb_eeprom["revision_compat"] = boost::lexical_cast<std::string>(
+ _mb_eeprom["revision_compat"] = std::to_string(
uhd::htonx<uint16_t>(map.hw_revision_compat));
}
_mb_eeprom["serial"] = _bytes_to_string(
diff --git a/host/lib/usrp/n230/n230_resource_manager.cpp b/host/lib/usrp/n230/n230_resource_manager.cpp
index 61a80ae43..d454afd40 100644
--- a/host/lib/usrp/n230/n230_resource_manager.cpp
+++ b/host/lib/usrp/n230/n230_resource_manager.cpp
@@ -26,9 +26,7 @@
#include <uhd/utils/paths.hpp>
#include <boost/format.hpp>
#include <boost/thread.hpp>
-#include <boost/lexical_cast.hpp>
#include <boost/functional/hash.hpp>
-#include <boost/lexical_cast.hpp>
#include <boost/make_shared.hpp>
#include "n230_fw_defs.h"
#include "n230_fw_host_iface.h"
@@ -419,7 +417,7 @@ transport::zero_copy_if::sptr n230_resource_manager::_create_transport(
default_buff_args.num_send_frames = 32;
transport::zero_copy_if::sptr xport = transport::udp_zero_copy::make(
- eth_conn.ip_addr, boost::lexical_cast<std::string>(fpga::CVITA_UDP_PORT),
+ eth_conn.ip_addr, std::to_string(fpga::CVITA_UDP_PORT),
default_buff_args, buff_params_out, buff_params);
if (xport.get()) {
diff --git a/host/lib/usrp/n230/n230_stream_manager.cpp b/host/lib/usrp/n230/n230_stream_manager.cpp
index 95da2752e..0d5aa693f 100644
--- a/host/lib/usrp/n230/n230_stream_manager.cpp
+++ b/host/lib/usrp/n230/n230_stream_manager.cpp
@@ -80,13 +80,13 @@ rx_streamer::sptr n230_stream_manager::get_rx_stream(const uhd::stream_args_t &a
//TODO: Propagate the device_args class into streamer in the future
device_addr_t device_addr = args.args;
if (not device_addr.has_key("recv_buff_size")) {
- device_addr["recv_buff_size"] = boost::lexical_cast<std::string>(_dev_args.get_recv_buff_size());
+ device_addr["recv_buff_size"] = std::to_string(_dev_args.get_recv_buff_size());
}
if (not device_addr.has_key("recv_frame_size")) {
- device_addr["recv_frame_size"] = boost::lexical_cast<std::string>(_dev_args.get_recv_frame_size());
+ device_addr["recv_frame_size"] = std::to_string(_dev_args.get_recv_frame_size());
}
if (not device_addr.has_key("num_recv_frames")) {
- device_addr["num_recv_frames"] = boost::lexical_cast<std::string>(_dev_args.get_num_recv_frames());
+ device_addr["num_recv_frames"] = std::to_string(_dev_args.get_num_recv_frames());
}
transport::udp_zero_copy::buff_params buff_params_out;
@@ -170,7 +170,7 @@ rx_streamer::sptr n230_stream_manager::get_rx_stream(const uhd::stream_args_t &a
if (prop_tree) {
//TODO: Update this to support multiple motherboards
const fs_path mb_path = "/mboards/0";
- prop_tree->access<double>(mb_path / "rx_dsps" / boost::lexical_cast<std::string>(chan) / "rate" / "value").update();
+ prop_tree->access<double>(mb_path / "rx_dsps" / std::to_string(chan) / "rate" / "value").update();
}
}
update_stream_states();
@@ -207,13 +207,13 @@ tx_streamer::sptr n230_stream_manager::get_tx_stream(const uhd::stream_args_t &a
//TODO: Propagate the device_args class into streamer in the future
device_addr_t device_addr = args.args;
if (not device_addr.has_key("send_buff_size")) {
- device_addr["send_buff_size"] = boost::lexical_cast<std::string>(_dev_args.get_send_buff_size());
+ device_addr["send_buff_size"] = std::to_string(_dev_args.get_send_buff_size());
}
if (not device_addr.has_key("send_frame_size")) {
- device_addr["send_frame_size"] = boost::lexical_cast<std::string>(_dev_args.get_send_frame_size());
+ device_addr["send_frame_size"] = std::to_string(_dev_args.get_send_frame_size());
}
if (not device_addr.has_key("num_send_frames")) {
- device_addr["num_send_frames"] = boost::lexical_cast<std::string>(_dev_args.get_num_send_frames());
+ device_addr["num_send_frames"] = std::to_string(_dev_args.get_num_send_frames());
}
transport::udp_zero_copy::buff_params buff_params_out;
@@ -295,7 +295,7 @@ tx_streamer::sptr n230_stream_manager::get_tx_stream(const uhd::stream_args_t &a
if (prop_tree) {
//TODO: Update this to support multiple motherboards
const fs_path mb_path = "/mboards/0";
- prop_tree->access<double>(mb_path / "tx_dsps" / boost::lexical_cast<std::string>(chan) / "rate" / "value").update();
+ prop_tree->access<double>(mb_path / "tx_dsps" / std::to_string(chan) / "rate" / "value").update();
}
}
update_stream_states();