From 99c2730bc9db270560671f2d7d173768465ed51f Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 31 Oct 2016 14:30:52 -0700 Subject: Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types) - Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be , but not all of our compilers support that). --- host/lib/usrp/e300/e300_remote_codec_ctrl.cpp | 116 +++++++++++++------------- 1 file changed, 58 insertions(+), 58 deletions(-) (limited to 'host/lib/usrp/e300/e300_remote_codec_ctrl.cpp') diff --git a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp index 6ec39131d..b7c46c17d 100644 --- a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp +++ b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp @@ -17,7 +17,7 @@ #include "e300_remote_codec_ctrl.hpp" -#include +#include #include #include #include @@ -36,17 +36,17 @@ public: { } - void set_timed_spi(uhd::spi_iface::sptr, boost::uint32_t ) {}; - void set_safe_spi(uhd::spi_iface::sptr, boost::uint32_t ) {}; + void set_timed_spi(uhd::spi_iface::sptr, uint32_t ) {}; + void set_safe_spi(uhd::spi_iface::sptr, uint32_t ) {}; double set_gain(const std::string &which, const double value) { _clear(); - _args.action = uhd::htonx(transaction_t::ACTION_SET_GAIN); - if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); - else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); - else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); - else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); + _args.action = uhd::htonx(transaction_t::ACTION_SET_GAIN); + if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); + else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); + else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); + else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string."); _args.gain = value; @@ -57,9 +57,9 @@ public: double set_clock_rate(const double rate) { _clear(); - _args.action = uhd::htonx( + _args.action = uhd::htonx( transaction_t::ACTION_SET_CLOCK_RATE); - _args.which = uhd::htonx( + _args.which = uhd::htonx( transaction_t::CHAIN_NONE); /*Unused*/ _args.rate = rate; @@ -70,12 +70,12 @@ public: void set_active_chains(bool tx1, bool tx2, bool rx1, bool rx2) { _clear(); - _args.action = uhd::htonx( + _args.action = uhd::htonx( transaction_t::ACTION_SET_ACTIVE_CHANS); /*Unused*/ - _args.which = uhd::htonx( + _args.which = uhd::htonx( transaction_t::CHAIN_NONE); - _args.bits = uhd::htonx( + _args.bits = uhd::htonx( (tx1 ? (1<<0) : 0) | (tx2 ? (1<<1) : 0) | (rx1 ? (1<<2) : 0) | @@ -87,11 +87,11 @@ public: double tune(const std::string &which, const double value) { _clear(); - _args.action = uhd::htonx(transaction_t::ACTION_TUNE); - if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); - else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); - else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); - else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); + _args.action = uhd::htonx(transaction_t::ACTION_TUNE); + if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); + else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); + else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); + else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string."); _args.freq = value; @@ -102,11 +102,11 @@ public: double get_freq(const std::string &which) { _clear(); - _args.action = uhd::htonx(transaction_t::ACTION_GET_FREQ); - if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); - else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); - else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); - else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); + _args.action = uhd::htonx(transaction_t::ACTION_GET_FREQ); + if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); + else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); + else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); + else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string."); _transact(); @@ -116,9 +116,9 @@ public: void data_port_loopback(const bool on) { _clear(); - _args.action = uhd::htonx(transaction_t::ACTION_SET_LOOPBACK); - _args.which = uhd::htonx(transaction_t::CHAIN_NONE); /*Unused*/ - _args.bits = uhd::htonx(on ? 1 : 0); + _args.action = uhd::htonx(transaction_t::ACTION_SET_LOOPBACK); + _args.which = uhd::htonx(transaction_t::CHAIN_NONE); /*Unused*/ + _args.bits = uhd::htonx(on ? 1 : 0); _transact(); } @@ -126,11 +126,11 @@ public: sensor_value_t get_rssi(const std::string &which) { _clear(); - _args.action = uhd::htonx(transaction_t::ACTION_GET_RSSI); - if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); - else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); + _args.action = uhd::htonx(transaction_t::ACTION_GET_RSSI); + if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); + else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string."); - _args.bits = uhd::htonx(0); + _args.bits = uhd::htonx(0); _transact(); return sensor_value_t("RSSI", _retval.rssi, "dB"); @@ -139,9 +139,9 @@ public: sensor_value_t get_temperature() { _clear(); - _args.action = uhd::htonx(transaction_t::ACTION_GET_TEMPERATURE); - _args.which = uhd::htonx(transaction_t::CHAIN_NONE); /*Unused*/ - _args.bits = uhd::htonx(0); + _args.action = uhd::htonx(transaction_t::ACTION_GET_TEMPERATURE); + _args.which = uhd::htonx(transaction_t::CHAIN_NONE); /*Unused*/ + _args.bits = uhd::htonx(0); _transact(); return sensor_value_t("temp", _retval.temp, "C"); @@ -150,11 +150,11 @@ public: void set_dc_offset_auto(const std::string &which, const bool on) { _clear(); - _args.action = uhd::htonx(transaction_t::ACTION_SET_DC_OFFSET_AUTO); - if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); - else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); - else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); - else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); + _args.action = uhd::htonx(transaction_t::ACTION_SET_DC_OFFSET_AUTO); + if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); + else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); + else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); + else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string."); _args.use_dc_correction = on ? 1 : 0; @@ -164,11 +164,11 @@ public: void set_iq_balance_auto(const std::string &which, const bool on) { _clear(); - _args.action = uhd::htonx(transaction_t::ACTION_SET_IQ_BALANCE_AUTO); - if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); - else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); - else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); - else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); + _args.action = uhd::htonx(transaction_t::ACTION_SET_IQ_BALANCE_AUTO); + if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); + else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); + else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); + else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string."); _args.use_iq_correction = on ? 1 : 0; @@ -178,11 +178,11 @@ public: void set_agc(const std::string &which, bool enable) { _clear(); - _args.action = uhd::htonx(transaction_t::ACTION_SET_AGC); - if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); - else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); - else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); - else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); + _args.action = uhd::htonx(transaction_t::ACTION_SET_AGC); + if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); + else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); + else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); + else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string."); _args.use_agc = enable ? 1 : 0; @@ -192,12 +192,12 @@ public: void set_agc_mode(const std::string &which, const std::string &mode) { _clear(); - _args.action = uhd::htonx(transaction_t::ACTION_SET_AGC_MODE); + _args.action = uhd::htonx(transaction_t::ACTION_SET_AGC_MODE); - if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); - else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); - else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); - else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); + if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); + else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); + else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); + else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string."); if(mode == "slow") { @@ -215,11 +215,11 @@ public: double set_bw_filter(const std::string &which, const double bw) { _clear(); - _args.action = uhd::htonx(transaction_t::ACTION_SET_BW); - if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); - else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); - else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); - else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); + _args.action = uhd::htonx(transaction_t::ACTION_SET_BW); + if (which == "TX1") _args.which = uhd::htonx(transaction_t::CHAIN_TX1); + else if (which == "TX2") _args.which = uhd::htonx(transaction_t::CHAIN_TX2); + else if (which == "RX1") _args.which = uhd::htonx(transaction_t::CHAIN_RX1); + else if (which == "RX2") _args.which = uhd::htonx(transaction_t::CHAIN_RX2); else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string."); _args.bw = bw; -- cgit v1.2.3