aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorDerek Kozel <derek.kozel@ettus.com>2016-11-03 15:46:47 -0700
committerMartin Braun <martin.braun@ettus.com>2016-11-04 09:23:29 -0700
commitbeb713da9291ae1d2a793a4a13dfdd4fc9c8e104 (patch)
treec208f116a07fdee2c8e7f8c7201be01b4952122c /host/lib
parent4594f7d783563fb434a3974533347d234169c2f5 (diff)
downloaduhd-beb713da9291ae1d2a793a4a13dfdd4fc9c8e104.tar.gz
uhd-beb713da9291ae1d2a793a4a13dfdd4fc9c8e104.tar.bz2
uhd-beb713da9291ae1d2a793a4a13dfdd4fc9c8e104.zip
X300: Check dboard time property before subscribing
If a daughterboard does not have a time/cmd property then no subscriber should be added to the motherboard time/cmd property.
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/x300/x300_radio_ctrl_impl.cpp11
-rw-r--r--host/lib/usrp/x300/x300_radio_ctrl_impl.hpp2
2 files changed, 7 insertions, 6 deletions
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
index 991b97696..0a57e337e 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
@@ -125,9 +125,10 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(x300_radio_ctrl)
// Bind the daughterboard command time to the motherboard level property
////////////////////////////////////////////////////////////////
- if (_tree->exists(fs_path("time") / "cmd")) {
+ if (_tree->exists(fs_path("time") / "cmd") and
+ _tree->exists(fs_path("dboards" / _radio_slot / "rx_frontends" / _rx_fe_map.at(i).db_fe_name / "time" / "cmd"))) {
_tree->access<time_spec_t>(fs_path("time") / "cmd")
- .add_coerced_subscriber(boost::bind(&x300_radio_ctrl_impl::set_fe_cmd_time, this, _1, i));
+ .add_coerced_subscriber(boost::bind(&x300_radio_ctrl_impl::set_fe_cmd_time, this, _1, i));
}
}
@@ -172,11 +173,11 @@ double x300_radio_ctrl_impl::set_rate(double /* rate */)
return get_rate();
}
-time_spec_t x300_radio_ctrl_impl::set_fe_cmd_time(const time_spec_t &time, const size_t chan)
+void x300_radio_ctrl_impl::set_fe_cmd_time(const time_spec_t &time, const size_t chan)
{
- return _tree->access<time_spec_t>(
+ _tree->access<time_spec_t>(
fs_path("dboards" / _radio_slot / "rx_frontends" / _rx_fe_map.at(chan).db_fe_name / "time" / "cmd")
- ).set(time).get();
+ ).set(time);
}
void x300_radio_ctrl_impl::set_tx_antenna(const std::string &ant, const size_t chan)
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
index 5b9d47841..73640af01 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
@@ -161,7 +161,7 @@ private:
void set_rx_fe_corrections(const uhd::fs_path &db_path, const uhd::fs_path &rx_fe_corr_path, const double lo_freq);
void set_tx_fe_corrections(const uhd::fs_path &db_path, const uhd::fs_path &tx_fe_corr_path, const double lo_freq);
- time_spec_t set_fe_cmd_time(const time_spec_t &time, const size_t chan);
+ void set_fe_cmd_time(const time_spec_t &time, const size_t chan);
private: // members
enum radio_connection_t { PRIMARY, SECONDARY };