diff options
Diffstat (limited to 'host/lib/usrp/dboard')
-rw-r--r-- | host/lib/usrp/dboard/db_basic_and_lf.cpp | 18 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_dbsrx.cpp | 26 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_rfx.cpp | 10 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_sbx.cpp | 10 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_tvrx.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_unknown.cpp | 14 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_wbx_common.cpp | 10 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_xcvr2450.cpp | 1 |
8 files changed, 32 insertions, 63 deletions
diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp index 3fffeab0c..6f8de9a7b 100644 --- a/host/lib/usrp/dboard/db_basic_and_lf.cpp +++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp @@ -20,7 +20,7 @@ #include <uhd/types/ranges.hpp> #include <uhd/utils/assert_has.hpp> #include <uhd/utils/static.hpp> -#include <uhd/utils/warning.hpp> +#include <uhd/utils/msg.hpp> #include <uhd/usrp/dboard_base.hpp> #include <uhd/usrp/dboard_manager.hpp> #include <boost/assign/list_of.hpp> @@ -202,11 +202,9 @@ void basic_rx::rx_set(const wax::obj &key_, const wax::obj &val){ return; //always enabled case SUBDEV_PROP_BANDWIDTH: - uhd::warning::post( - str(boost::format("%s: No tunable bandwidth, fixed filtered to %0.2fMHz") - % get_rx_id().to_pp_string() % _max_freq - ) - ); + UHD_MSG(warning) << boost::format( + "%s: No tunable bandwidth, fixed filtered to %0.2fMHz" + ) % get_rx_id().to_pp_string() % _max_freq; return; default: UHD_THROW_PROP_SET_ERROR(); @@ -309,11 +307,9 @@ void basic_tx::tx_set(const wax::obj &key_, const wax::obj &val){ return; //always enabled case SUBDEV_PROP_BANDWIDTH: - uhd::warning::post( - str(boost::format("%s: No tunable bandwidth, fixed filtered to %0.2fMHz") - % get_tx_id().to_pp_string() % _max_freq - ) - ); + UHD_MSG(warning) << boost::format( + "%s: No tunable bandwidth, fixed filtered to %0.2fMHz" + ) % get_tx_id().to_pp_string() % _max_freq; return; default: UHD_THROW_PROP_SET_ERROR(); diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp index dbe2f6370..cfe06db29 100644 --- a/host/lib/usrp/dboard/db_dbsrx.cpp +++ b/host/lib/usrp/dboard/db_dbsrx.cpp @@ -24,7 +24,7 @@ #include <uhd/utils/static.hpp> #include <uhd/utils/assert_has.hpp> #include <uhd/utils/algorithm.hpp> -#include <uhd/utils/warning.hpp> +#include <uhd/utils/msg.hpp> #include <uhd/types/ranges.hpp> #include <uhd/types/sensors.hpp> #include <uhd/types/dict.hpp> @@ -175,25 +175,21 @@ UHD_STATIC_BLOCK(reg_dbsrx_dboard){ dbsrx::dbsrx(ctor_args_t args) : rx_dboard_base(args){ //warn user about incorrect DBID on USRP1, requires R193 populated if (this->get_iface()->get_special_props().soft_clock_divider and this->get_rx_id() == 0x000D) - uhd::warning::post( - str(boost::format( + UHD_MSG(warning) << boost::format( "DBSRX: incorrect dbid\n" "Expected dbid 0x0002 and R193\n" "found dbid == %d\n" "Please see the daughterboard app notes" - ) % this->get_rx_id().to_pp_string()) - ); + ) % this->get_rx_id().to_pp_string(); //warn user about incorrect DBID on non-USRP1, requires R194 populated if (not this->get_iface()->get_special_props().soft_clock_divider and this->get_rx_id() == 0x0002) - uhd::warning::post( - str(boost::format( + UHD_MSG(warning) << boost::format( "DBSRX: incorrect dbid\n" "Expected dbid 0x000D and R194\n" "found dbid == %d\n" "Please see the daughterboard app notes" - ) % this->get_rx_id().to_pp_string()) - ); + ) % this->get_rx_id().to_pp_string(); //enable only the clocks we need this->get_iface()->set_clock_enabled(dboard_iface::UNIT_RX, true); @@ -342,11 +338,9 @@ void dbsrx::set_lo_freq(double target_freq){ //vtune is too low, try lower frequency vco if (_max2118_read_regs.adc == 0){ if (_max2118_write_regs.osc_band == 0){ - uhd::warning::post( - str(boost::format( + UHD_MSG(warning) << boost::format( "DBSRX: Tuning exceeded vco range, _max2118_write_regs.osc_band == %d\n" - ) % int(_max2118_write_regs.osc_band)) - ); + ) % int(_max2118_write_regs.osc_band); UHD_ASSERT_THROW(_max2118_read_regs.adc != 0); //just to cause a throw } if (_max2118_write_regs.osc_band <= 0) break; @@ -356,11 +350,9 @@ void dbsrx::set_lo_freq(double target_freq){ //vtune is too high, try higher frequency vco if (_max2118_read_regs.adc == 7){ if (_max2118_write_regs.osc_band == 7){ - uhd::warning::post( - str(boost::format( + UHD_MSG(warning) << boost::format( "DBSRX: Tuning exceeded vco range, _max2118_write_regs.osc_band == %d\n" - ) % int(_max2118_write_regs.osc_band)) - ); + ) % int(_max2118_write_regs.osc_band); UHD_ASSERT_THROW(_max2118_read_regs.adc != 7); //just to cause a throw } if (_max2118_write_regs.osc_band >= 7) break; diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp index 1f0290179..61f9130d4 100644 --- a/host/lib/usrp/dboard/db_rfx.cpp +++ b/host/lib/usrp/dboard/db_rfx.cpp @@ -41,7 +41,7 @@ #include <uhd/utils/log.hpp> #include <uhd/utils/static.hpp> #include <uhd/utils/algorithm.hpp> -#include <uhd/utils/warning.hpp> +#include <uhd/utils/msg.hpp> #include <uhd/usrp/dboard_id.hpp> #include <uhd/usrp/dboard_base.hpp> #include <uhd/usrp/dboard_manager.hpp> @@ -514,9 +514,7 @@ void rfx_xcvr::rx_set(const wax::obj &key_, const wax::obj &val){ return; //always enabled case SUBDEV_PROP_BANDWIDTH: - uhd::warning::post( - str(boost::format("RFX: No tunable bandwidth, fixed filtered to 40MHz")) - ); + UHD_MSG(warning) << "RFX: No tunable bandwidth, fixed filtered to 40MHz"; return; default: UHD_THROW_PROP_SET_ERROR(); @@ -616,9 +614,7 @@ void rfx_xcvr::tx_set(const wax::obj &key_, const wax::obj &val){ return; //always enabled case SUBDEV_PROP_BANDWIDTH: - uhd::warning::post( - str(boost::format("RFX: No tunable bandwidth, fixed filtered to 40MHz")) - ); + UHD_MSG(warning) << "RFX: No tunable bandwidth, fixed filtered to 40MHz"; return; default: UHD_THROW_PROP_SET_ERROR(); diff --git a/host/lib/usrp/dboard/db_sbx.cpp b/host/lib/usrp/dboard/db_sbx.cpp index 4d8753fab..6ca89b81a 100644 --- a/host/lib/usrp/dboard/db_sbx.cpp +++ b/host/lib/usrp/dboard/db_sbx.cpp @@ -81,7 +81,7 @@ #include <uhd/utils/log.hpp> #include <uhd/utils/static.hpp> #include <uhd/utils/algorithm.hpp> -#include <uhd/utils/warning.hpp> +#include <uhd/utils/msg.hpp> #include <uhd/usrp/dboard_base.hpp> #include <uhd/usrp/dboard_manager.hpp> #include <boost/assign/list_of.hpp> @@ -674,9 +674,7 @@ void sbx_xcvr::rx_set(const wax::obj &key_, const wax::obj &val){ return; //always enabled case SUBDEV_PROP_BANDWIDTH: - uhd::warning::post( - str(boost::format("SBX: No tunable bandwidth, fixed filtered to 40MHz")) - ); + UHD_MSG(warning) << "SBX: No tunable bandwidth, fixed filtered to 40MHz"; return; default: UHD_THROW_PROP_SET_ERROR(); @@ -780,9 +778,7 @@ void sbx_xcvr::tx_set(const wax::obj &key_, const wax::obj &val){ return; //always enabled case SUBDEV_PROP_BANDWIDTH: - uhd::warning::post( - str(boost::format("SBX: No tunable bandwidth, fixed filtered to 40MHz")) - ); + UHD_MSG(warning) << "SBX: No tunable bandwidth, fixed filtered to 40MHz"; return; default: UHD_THROW_PROP_SET_ERROR(); diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp index cd7216c22..1ff0fb785 100644 --- a/host/lib/usrp/dboard/db_tvrx.cpp +++ b/host/lib/usrp/dboard/db_tvrx.cpp @@ -31,7 +31,7 @@ #include <uhd/utils/static.hpp> #include <uhd/utils/assert_has.hpp> #include <uhd/utils/algorithm.hpp> -#include <uhd/utils/warning.hpp> +#include <uhd/utils/msg.hpp> #include <uhd/types/ranges.hpp> #include <uhd/types/sensors.hpp> #include <uhd/types/dict.hpp> @@ -485,9 +485,7 @@ void tvrx::rx_set(const wax::obj &key_, const wax::obj &val){ return; //always enabled case SUBDEV_PROP_BANDWIDTH: - uhd::warning::post( - str(boost::format("TVRX: No tunable bandwidth, fixed filtered to 6MHz")) - ); + UHD_MSG(warning) << "TVRX: No tunable bandwidth, fixed filtered to 6MHz"; return; default: UHD_THROW_PROP_SET_ERROR(); diff --git a/host/lib/usrp/dboard/db_unknown.cpp b/host/lib/usrp/dboard/db_unknown.cpp index cef4bee4a..6cacab231 100644 --- a/host/lib/usrp/dboard/db_unknown.cpp +++ b/host/lib/usrp/dboard/db_unknown.cpp @@ -19,7 +19,7 @@ #include <uhd/types/ranges.hpp> #include <uhd/utils/assert_has.hpp> #include <uhd/utils/static.hpp> -#include <uhd/utils/warning.hpp> +#include <uhd/utils/msg.hpp> #include <uhd/usrp/dboard_base.hpp> #include <uhd/usrp/dboard_manager.hpp> #include <boost/assign/list_of.hpp> @@ -50,11 +50,11 @@ static void warn_if_old_rfx(const dboard_id_t &dboard_id, const std::string &xx) if ( (xx == "RX" and rx_id == dboard_id) or (xx == "TX" and tx_id == dboard_id) - ) uhd::warning::post(str(boost::format( + ) UHD_MSG(warning) << boost::format( "Detected %s daughterboard %s\n" "This board requires modification to use.\n" "See the daughterboard application notes.\n" - ) % xx % name)); + ) % xx % name; } } @@ -183,9 +183,7 @@ void unknown_rx::rx_set(const wax::obj &key_, const wax::obj &val){ return; //always enabled case SUBDEV_PROP_BANDWIDTH: - uhd::warning::post( - str(boost::format("Unknown Daughterboard: No tunable bandwidth, fixed filtered to 0.0MHz")) - ); + UHD_MSG(warning) << "Unknown Daughterboard: No tunable bandwidth, fixed filtered to 0.0MHz"; return; default: UHD_THROW_PROP_SET_ERROR(); @@ -281,9 +279,7 @@ void unknown_tx::tx_set(const wax::obj &key_, const wax::obj &val){ return; //always enabled case SUBDEV_PROP_BANDWIDTH: - uhd::warning::post( - str(boost::format("Unknown Daughterboard: No tunable bandwidth, fixed filtered to 0.0MHz")) - ); + UHD_MSG(warning) << "Unknown Daughterboard: No tunable bandwidth, fixed filtered to 0.0MHz"; return; default: UHD_THROW_PROP_SET_ERROR(); diff --git a/host/lib/usrp/dboard/db_wbx_common.cpp b/host/lib/usrp/dboard/db_wbx_common.cpp index fdee14607..131729f42 100644 --- a/host/lib/usrp/dboard/db_wbx_common.cpp +++ b/host/lib/usrp/dboard/db_wbx_common.cpp @@ -58,7 +58,7 @@ #include <uhd/types/sensors.hpp> #include <uhd/utils/assert_has.hpp> #include <uhd/utils/algorithm.hpp> -#include <uhd/utils/warning.hpp> +#include <uhd/utils/msg.hpp> #include <uhd/usrp/dboard_base.hpp> #include <boost/assign/list_of.hpp> #include <boost/format.hpp> @@ -472,9 +472,7 @@ void wbx_base::rx_set(const wax::obj &key_, const wax::obj &val){ return; case SUBDEV_PROP_BANDWIDTH: - uhd::warning::post( - str(boost::format("WBX: No tunable bandwidth, fixed filtered to 40MHz")) - ); + UHD_MSG(warning) << "WBX: No tunable bandwidth, fixed filtered to 40MHz"; return; default: UHD_THROW_PROP_SET_ERROR(); @@ -572,9 +570,7 @@ void wbx_base::tx_set(const wax::obj &key_, const wax::obj &val){ return; case SUBDEV_PROP_BANDWIDTH: - uhd::warning::post( - str(boost::format("WBX: No tunable bandwidth, fixed filtered to 40MHz")) - ); + UHD_MSG(warning) << "WBX: No tunable bandwidth, fixed filtered to 40MHz"; return; default: UHD_THROW_PROP_SET_ERROR(); diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp index 4bda43251..c775eae38 100644 --- a/host/lib/usrp/dboard/db_xcvr2450.cpp +++ b/host/lib/usrp/dboard/db_xcvr2450.cpp @@ -52,7 +52,6 @@ #include <uhd/utils/static.hpp> #include <uhd/utils/assert_has.hpp> #include <uhd/utils/algorithm.hpp> -#include <uhd/utils/warning.hpp> #include <uhd/types/ranges.hpp> #include <uhd/types/sensors.hpp> #include <uhd/types/dict.hpp> |