aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/legacy_compat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/rfnoc/legacy_compat.cpp')
-rw-r--r--host/lib/rfnoc/legacy_compat.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp
index 8d64cb51a..dc711b909 100644
--- a/host/lib/rfnoc/legacy_compat.cpp
+++ b/host/lib/rfnoc/legacy_compat.cpp
@@ -26,14 +26,14 @@
#include <uhd/types/stream_cmd.hpp>
#include <uhd/types/direction.hpp>
#include <uhd/types/ranges.hpp>
-#include <uhd/utils/msg.hpp>
+
#include <uhd/utils/log.hpp>
#include <uhd/transport/chdr.hpp>
#include <uhd/usrp/multi_usrp.hpp>
#include <boost/make_shared.hpp>
#include <boost/assign.hpp>
-#define UHD_LEGACY_LOG() UHD_LOGV(never)
+#define UHD_LEGACY_LOG() UHD_LOGGER_TRACE("RFNOC")
using namespace uhd::rfnoc;
using uhd::usrp::subdev_spec_t;
@@ -143,21 +143,21 @@ public:
}
connect_blocks();
if (args.has_key("skip_ddc")) {
- UHD_LEGACY_LOG() << "[legacy_compat] Skipping DDCs by user request." << std::endl;
+ UHD_LEGACY_LOG() << "[legacy_compat] Skipping DDCs by user request." ;
} else if (not _has_ddcs) {
- UHD_MSG(warning)
+ UHD_LOGGER_WARNING("RFNOC")
<< "[legacy_compat] No DDCs detected. You will only be able to receive at the radio frontend rate."
- << std::endl;
+ ;
}
if (args.has_key("skip_duc")) {
- UHD_LEGACY_LOG() << "[legacy_compat] Skipping DUCs by user request." << std::endl;
+ UHD_LEGACY_LOG() << "[legacy_compat] Skipping DUCs by user request." ;
} else if (not _has_ducs) {
- UHD_MSG(warning) << "[legacy_compat] No DUCs detected. You will only be able to transmit at the radio frontend rate." << std::endl;
+ UHD_LOGGER_WARNING("RFNOC") << "[legacy_compat] No DUCs detected. You will only be able to transmit at the radio frontend rate." ;
}
if (args.has_key("skip_dram")) {
- UHD_LEGACY_LOG() << "[legacy_compat] Skipping DRAM by user request." << std::endl;
+ UHD_LEGACY_LOG() << "[legacy_compat] Skipping DRAM by user request." ;
} else if (not _has_dmafifo) {
- UHD_MSG(warning) << "[legacy_compat] No DMA FIFO detected. You will only be able to transmit at slow rates." << std::endl;
+ UHD_LOGGER_WARNING("RFNOC") << "[legacy_compat] No DMA FIFO detected. You will only be able to transmit at slow rates." ;
}
for (size_t mboard = 0; mboard < _num_mboards; mboard++) {
@@ -241,7 +241,7 @@ public:
void issue_stream_cmd(const stream_cmd_t &stream_cmd, size_t mboard, size_t chan)
{
- UHD_LEGACY_LOG() << "[legacy_compat] issue_stream_cmd() " << std::endl;
+ UHD_LEGACY_LOG() << "[legacy_compat] issue_stream_cmd() " ;
const size_t &radio_index = _rx_channel_map[mboard][chan].radio_index;
const size_t &port_index = _rx_channel_map[mboard][chan].port_index;
if (_has_ddcs) {
@@ -259,7 +259,7 @@ public:
args.otw_format = "sc16";
}
_update_stream_args_for_streaming<uhd::RX_DIRECTION>(args, _rx_channel_map);
- UHD_LEGACY_LOG() << "[legacy_compat] rx stream args: " << args.args.to_string() << std::endl;
+ UHD_LEGACY_LOG() << "[legacy_compat] rx stream args: " << args.args.to_string() ;
uhd::rx_streamer::sptr streamer = _device->get_rx_stream(args);
for(const size_t chan: args.channels) {
_rx_stream_cache[chan] = streamer;
@@ -276,7 +276,7 @@ public:
args.otw_format = "sc16";
}
_update_stream_args_for_streaming<uhd::TX_DIRECTION>(args, _tx_channel_map);
- UHD_LEGACY_LOG() << "[legacy_compat] tx stream args: " << args.args.to_string() << std::endl;
+ UHD_LEGACY_LOG() << "[legacy_compat] tx stream args: " << args.args.to_string() ;
uhd::tx_streamer::sptr streamer = _device->get_tx_stream(args);
for(const size_t chan: args.channels) {
_tx_stream_cache[chan] = streamer;
@@ -573,7 +573,7 @@ private: // methods
const size_t this_spp = get_block_ctrl<radio_ctrl>(i, RADIO_BLOCK_NAME, k)->get_arg<int>("spp");
if (this_spp != _rx_spp) {
- UHD_LOG << str(
+ UHD_LOGGER_WARNING("RFNOC") << str(
boost::format("[legacy compat] Radios have differing spp values: %s has %d, others have %d. UHD will use smaller spp value for all connections. Performance might be not optimal.")
% radio_block_id.to_string() % this_spp % _rx_spp
);
@@ -865,7 +865,7 @@ legacy_compat::sptr legacy_compat::make(
if (legacy_cache.count(device.get()) and not legacy_cache.at(device.get()).expired()) {
legacy_compat::sptr legacy_compat_copy = legacy_cache.at(device.get()).lock();
UHD_ASSERT_THROW(bool(legacy_compat_copy));
- UHD_LEGACY_LOG() << "[legacy_compat] Using existing legacy compat object for this device." << std::endl;
+ UHD_LEGACY_LOG() << "[legacy_compat] Using existing legacy compat object for this device." ;
return legacy_compat_copy;
}