aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/device.cpp8
-rw-r--r--host/lib/rfnoc/block_ctrl_base.cpp2
-rw-r--r--host/lib/rfnoc/legacy_compat.cpp32
-rw-r--r--host/lib/transport/muxed_zero_copy_if.cpp4
-rw-r--r--host/lib/transport/nirio/niriok_proxy_impl_v1.cpp10
-rw-r--r--host/lib/transport/nirio_zero_copy.cpp2
-rw-r--r--host/lib/transport/udp_zero_copy.cpp2
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp2
-rw-r--r--host/lib/usrp/b200/b200_iface.cpp2
-rw-r--r--host/lib/usrp/common/adf5355.cpp12
-rw-r--r--host/lib/usrp/cores/dma_fifo_core_3000.cpp3
-rw-r--r--host/lib/usrp/dboard/db_ubx.cpp2
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp2
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp4
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp2
-rw-r--r--host/lib/utils/gain_group.cpp2
16 files changed, 53 insertions, 38 deletions
diff --git a/host/lib/device.cpp b/host/lib/device.cpp
index ff4bbc212..c75ecad77 100644
--- a/host/lib/device.cpp
+++ b/host/lib/device.cpp
@@ -162,13 +162,11 @@ device::sptr device::make(const device_addr_t &hint, device_filter_t filter, siz
static uhd::dict<size_t, boost::weak_ptr<device> > hash_to_device;
//try to find an existing device
- try{
- UHD_ASSERT_THROW(hash_to_device.has_key(dev_hash));
- UHD_ASSERT_THROW(not hash_to_device[dev_hash].expired());
+ if (hash_to_device.has_key(dev_hash) and not hash_to_device[dev_hash].expired()){
return hash_to_device[dev_hash].lock();
}
- //create and register a new device
- catch(const uhd::assertion_error &){
+ else {
+ //create and register a new device
device::sptr dev = maker(dev_addr);
hash_to_device[dev_hash] = dev;
return dev;
diff --git a/host/lib/rfnoc/block_ctrl_base.cpp b/host/lib/rfnoc/block_ctrl_base.cpp
index 20299a3c3..fa4928a69 100644
--- a/host/lib/rfnoc/block_ctrl_base.cpp
+++ b/host/lib/rfnoc/block_ctrl_base.cpp
@@ -408,7 +408,7 @@ void block_ctrl_base::clear_command_time(const size_t port)
iface_sptr->set_time(time_spec_t(0.0));
}
-void block_ctrl_base::clear(const size_t /* port */)
+void block_ctrl_base::clear()
{
UHD_RFNOC_BLOCK_TRACE() << "block_ctrl_base::clear() " << std::endl;
// Call parent...
diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp
index e1eff757e..b660a21c7 100644
--- a/host/lib/rfnoc/legacy_compat.cpp
+++ b/host/lib/rfnoc/legacy_compat.cpp
@@ -103,6 +103,15 @@ uhd::meta_range_t lambda_const_meta_range(const double start, const double stop,
{
return uhd::meta_range_t(start, stop, step);
}
+
+/*! Recreate passed property without bound subscribers. Maintains current property value.
+*/
+template <typename T>
+static void recreate_property(const uhd::fs_path &path, uhd::property_tree::sptr &tree) {
+ T temp = tree->access<T>(path).get();
+ tree->remove(path);
+ tree->create<T>(path).set(temp);
+}
/************************************************************************
* Class Definition
***********************************************************************/
@@ -169,6 +178,11 @@ public:
}
}
+ ~legacy_compat_impl()
+ {
+ remove_prop_subscribers();
+ }
+
/************************************************************************
* API Calls
***********************************************************************/
@@ -590,6 +604,24 @@ private: // methods
}
}
+
+ /*! Remove properties with bound functions in property tree and recreate
+ */
+ void remove_prop_subscribers()
+ {
+ for (size_t mboard_idx = 0; mboard_idx < _num_mboards; mboard_idx++) {
+ uhd::fs_path root = mb_root(mboard_idx);
+ // Subdev specs
+ if (_tree->exists(root / "tx_subdev_spec")) {
+ recreate_property<subdev_spec_t>(root / "tx_subdev_spec", _tree);
+ }
+
+ if (_tree->exists(root / "rx_subdev_spec")) {
+ recreate_property<subdev_spec_t>(root / "rx_subdev_spec", _tree);
+ }
+ }
+ }
+
/*! Default block connections.
*
* Tx connections:
diff --git a/host/lib/transport/muxed_zero_copy_if.cpp b/host/lib/transport/muxed_zero_copy_if.cpp
index 7a2b76165..37bea7355 100644
--- a/host/lib/transport/muxed_zero_copy_if.cpp
+++ b/host/lib/transport/muxed_zero_copy_if.cpp
@@ -106,7 +106,7 @@ private:
stream_mrb(size_t size) : _buff(new char[size]) {}
~stream_mrb() {
- delete _buff;
+ delete[] _buff;
}
void release() {}
@@ -118,7 +118,7 @@ private:
}
private:
- char *_buff;
+ char *_buff;
};
class stream_impl : public zero_copy_if
diff --git a/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp b/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp
index 444e98f1b..dbe9e4abd 100644
--- a/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp
+++ b/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp
@@ -49,11 +49,11 @@ const uint32_t NIRIO_IOCTL_GET_IFACE_NUM =
METHOD_BUFFERED,
FILE_READ_DATA); ///< Get the interface number for a device
-const uint32_t NIRIO_IOCTL_GET_SESSION =
- CTL_CODE(FILE_DEVICE_UNKNOWN,
- NIRIO_IOCTL_BASE + 8,
- METHOD_BUFFERED,
- FILE_READ_ACCESS); ///< Gets a previously opened session to a device
+//const uint32_t NIRIO_IOCTL_GET_SESSION =
+ //CTL_CODE(FILE_DEVICE_UNKNOWN,
+ //NIRIO_IOCTL_BASE + 8,
+ //METHOD_BUFFERED,
+ //FILE_READ_ACCESS); ///< Gets a previously opened session to a device
const uint32_t NIRIO_IOCTL_POST_OPEN =
CTL_CODE(FILE_DEVICE_UNKNOWN,
diff --git a/host/lib/transport/nirio_zero_copy.cpp b/host/lib/transport/nirio_zero_copy.cpp
index 1eb431a19..8bec49a5f 100644
--- a/host/lib/transport/nirio_zero_copy.cpp
+++ b/host/lib/transport/nirio_zero_copy.cpp
@@ -75,7 +75,6 @@ private:
nirio_fifo<fifo_data_t>& _fifo;
fifo_data_t* _typed_buffer;
const size_t _frame_size;
- size_t _num_frames;
};
class nirio_zero_copy_msb : public managed_send_buffer
@@ -116,7 +115,6 @@ private:
nirio_fifo<fifo_data_t>& _fifo;
fifo_data_t* _typed_buffer;
const size_t _frame_size;
- size_t _num_frames;
};
class nirio_zero_copy_impl : public nirio_zero_copy {
diff --git a/host/lib/transport/udp_zero_copy.cpp b/host/lib/transport/udp_zero_copy.cpp
index 70fb5b552..036a84a05 100644
--- a/host/lib/transport/udp_zero_copy.cpp
+++ b/host/lib/transport/udp_zero_copy.cpp
@@ -32,7 +32,7 @@ using namespace uhd::transport;
namespace asio = boost::asio;
//A reasonable number of frames for send/recv and async/sync
-static const size_t DEFAULT_NUM_FRAMES = 32;
+//static const size_t DEFAULT_NUM_FRAMES = 32;
/***********************************************************************
* Check registry for correct fast-path setting (windows only)
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index d0b9d835d..1a38bf3b7 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -39,8 +39,6 @@ using namespace uhd::transport;
const uint16_t B100_VENDOR_ID = 0x2500;
const uint16_t B100_PRODUCT_ID = 0x0002;
-const uint16_t FX2_VENDOR_ID = 0x04b4;
-const uint16_t FX2_PRODUCT_ID = 0x8613;
static const boost::posix_time::milliseconds REENUMERATION_TIMEOUT_MS(3000);
/***********************************************************************
diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp
index 4e6dd2144..6f9bdd330 100644
--- a/host/lib/usrp/b200/b200_iface.cpp
+++ b/host/lib/usrp/b200/b200_iface.cpp
@@ -59,7 +59,7 @@ const static uint8_t B200_VREQ_SET_FW_HASH = 0x1E;
const static uint8_t B200_VREQ_GET_FW_HASH = 0x1F;
const static uint8_t B200_VREQ_LOOP = 0x22;
const static uint8_t B200_VREQ_FPGA_CONFIG = 0x55;
-const static uint8_t B200_VREQ_FPGA_RESET = 0x62;
+//const static uint8_t B200_VREQ_FPGA_RESET = 0x62;
const static uint8_t B200_VREQ_GPIF_RESET = 0x72;
const static uint8_t B200_VREQ_GET_USB = 0x80;
const static uint8_t B200_VREQ_GET_STATUS = 0x83;
diff --git a/host/lib/usrp/common/adf5355.cpp b/host/lib/usrp/common/adf5355.cpp
index ee9b54622..ee9d1d1d9 100644
--- a/host/lib/usrp/common/adf5355.cpp
+++ b/host/lib/usrp/common/adf5355.cpp
@@ -34,21 +34,21 @@ double todbl(data_t val) {
}
static const double ADF5355_DOUBLER_MAX_REF_FREQ = 60e6;
-static const double ADF5355_MAX_FREQ_PFD = 125e6;
-static const double ADF5355_PRESCALER_THRESH = 7e9;
+//static const double ADF5355_MAX_FREQ_PFD = 125e6;
+//static const double ADF5355_PRESCALER_THRESH = 7e9;
static const double ADF5355_MIN_VCO_FREQ = 3.4e9;
-static const double ADF5355_MAX_VCO_FREQ = 6.8e9;
+//static const double ADF5355_MAX_VCO_FREQ = 6.8e9;
static const double ADF5355_MAX_OUT_FREQ = 6.8e9;
static const double ADF5355_MIN_OUT_FREQ = (3.4e9 / 64);
-static const double ADF5355_MAX_OUTB_FREQ = (6.8e9 * 2);
-static const double ADF5355_MIN_OUTB_FREQ = (3.4e9 * 2);
+//static const double ADF5355_MAX_OUTB_FREQ = (6.8e9 * 2);
+//static const double ADF5355_MIN_OUTB_FREQ = (3.4e9 * 2);
static const double ADF5355_PHASE_RESYNC_TIME = 400e-6;
static const uint32_t ADF5355_MOD1 = 16777216;
static const uint32_t ADF5355_MAX_MOD2 = 16384;
-static const uint16_t ADF5355_MIN_INT_PRESCALER_89 = 75;
+//static const uint16_t ADF5355_MIN_INT_PRESCALER_89 = 75;
class adf5355_impl : public adf5355_iface
{
diff --git a/host/lib/usrp/cores/dma_fifo_core_3000.cpp b/host/lib/usrp/cores/dma_fifo_core_3000.cpp
index 908ba906e..e1a841b96 100644
--- a/host/lib/usrp/cores/dma_fifo_core_3000.cpp
+++ b/host/lib/usrp/cores/dma_fifo_core_3000.cpp
@@ -223,7 +223,7 @@ public:
public:
dma_fifo_core_3000_impl(wb_iface::sptr iface, const size_t base, const size_t readback):
- _iface(iface), _base(base), _fifo_readback(iface, base, readback),
+ _iface(iface), _fifo_readback(iface, base, readback),
_fifo_ctrl_reg(base), _base_addr_reg(base), _addr_mask_reg(base),
_bist_ctrl_reg(base), _bist_cfg_reg(base), _bist_delay_reg(base), _bist_sid_reg(base)
{
@@ -368,7 +368,6 @@ private:
private:
wb_iface::sptr _iface;
- const size_t _base;
boost::mutex _mutex;
bool _has_ext_bist;
diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp
index 05a02c321..82472fd9b 100644
--- a/host/lib/usrp/dboard/db_ubx.cpp
+++ b/host/lib/usrp/dboard/db_ubx.cpp
@@ -1246,8 +1246,6 @@ private:
power_mode_t _power_mode;
std::string _xcvr_mode;
size_t _rev;
- double _prev_tx_freq;
- double _prev_rx_freq;
ubx_gpio_reg_t _tx_gpio_reg;
ubx_gpio_reg_t _rx_gpio_reg;
int64_t _tx_sync_delay;
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index baecc6081..09352c5e0 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -38,8 +38,6 @@ using namespace uhd::transport;
const uint16_t USRP1_VENDOR_ID = 0xfffe;
const uint16_t USRP1_PRODUCT_ID = 0x0002;
-const uint16_t FX2_VENDOR_ID = 0x04b4;
-const uint16_t FX2_PRODUCT_ID = 0x8613;
static const boost::posix_time::milliseconds REENUMERATION_TIMEOUT_MS(3000);
const std::vector<usrp1_impl::dboard_slot_t> usrp1_impl::_dboard_slots = boost::assign::list_of
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index ae39028a1..199436fa2 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -50,10 +50,6 @@ static UHD_INLINE pt::time_duration to_time_dur(double timeout){
return pt::microseconds(long(timeout*1e6));
}
-static UHD_INLINE double from_time_dur(const pt::time_duration &time_dur){
- return 1e-6*time_dur.total_microseconds();
-}
-
/***********************************************************************
* constants
**********************************************************************/
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 522d6c6d0..021f0e3e5 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -62,7 +62,7 @@ static const uint32_t MIN_PROTO_COMPAT_I2C = 7;
// The register compat number must reflect the protocol compatibility
// and the compatibility of the register mapping (more likely to change).
static const uint32_t MIN_PROTO_COMPAT_REG = 10;
-static const uint32_t MIN_PROTO_COMPAT_UART = 7;
+//static const uint32_t MIN_PROTO_COMPAT_UART = 7;
class usrp2_iface_impl : public usrp2_iface{
public:
diff --git a/host/lib/utils/gain_group.cpp b/host/lib/utils/gain_group.cpp
index e907a6573..9428702d1 100644
--- a/host/lib/utils/gain_group.cpp
+++ b/host/lib/utils/gain_group.cpp
@@ -27,8 +27,6 @@
using namespace uhd;
-static const bool verbose = false;
-
static bool compare_by_step_size(
const size_t &rhs, const size_t &lhs, std::vector<gain_fcns_t> &fcns
){