aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/db_rfx.cpp
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-08-25 21:09:06 -0700
committerAshish Chaudhari <ashish@ettus.com>2016-02-11 14:36:20 -0800
commit27a08ccddc94c4945d48445b14c23fe6d186f9ef (patch)
treeaa0675904822e6dba9358cddc4ca1d66a3df3b7b /host/lib/usrp/dboard/db_rfx.cpp
parent0d74d16093c9350205eb704b1aa6a4bcefa5667d (diff)
downloaduhd-27a08ccddc94c4945d48445b14c23fe6d186f9ef.tar.gz
uhd-27a08ccddc94c4945d48445b14c23fe6d186f9ef.tar.bz2
uhd-27a08ccddc94c4945d48445b14c23fe6d186f9ef.zip
prop_tree: Multiple API enhancements to uhd::property
- Added desired and coerced values and accessors to property - Added support to register desired subscribers - set APIs don't reallocate storage for a property value - Renamed callback method registration APIs - Registering 2 coercers or publishers for a property will throw - Registering a coercer and a publisher for the same property will throw
Diffstat (limited to 'host/lib/usrp/dboard/db_rfx.cpp')
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index 3e7df9a39..342540275 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -183,20 +183,20 @@ rfx_xcvr::rfx_xcvr(
else this->get_rx_subtree()->create<std::string>("name").set("RFX RX");
this->get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&rfx_xcvr::get_locked, this, dboard_iface::UNIT_RX));
+ .set_publisher(boost::bind(&rfx_xcvr::get_locked, this, dboard_iface::UNIT_RX));
BOOST_FOREACH(const std::string &name, _rx_gain_ranges.keys()){
this->get_rx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&rfx_xcvr::set_rx_gain, this, _1, name))
+ .set_coercer(boost::bind(&rfx_xcvr::set_rx_gain, this, _1, name))
.set(_rx_gain_ranges[name].start());
this->get_rx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(_rx_gain_ranges[name]);
}
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&rfx_xcvr::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
+ .set_coercer(boost::bind(&rfx_xcvr::set_lo_freq, this, dboard_iface::UNIT_RX, _1))
.set((_freq_range.start() + _freq_range.stop())/2.0);
this->get_rx_subtree()->create<meta_range_t>("freq/range").set(_freq_range);
this->get_rx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&rfx_xcvr::set_rx_ant, this, _1))
+ .add_coerced_subscriber(boost::bind(&rfx_xcvr::set_rx_ant, this, _1))
.set("RX2");
this->get_rx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(rfx_rx_antennas);
@@ -219,14 +219,14 @@ rfx_xcvr::rfx_xcvr(
else this->get_tx_subtree()->create<std::string>("name").set("RFX TX");
this->get_tx_subtree()->create<sensor_value_t>("sensors/lo_locked")
- .publish(boost::bind(&rfx_xcvr::get_locked, this, dboard_iface::UNIT_TX));
+ .set_publisher(boost::bind(&rfx_xcvr::get_locked, this, dboard_iface::UNIT_TX));
this->get_tx_subtree()->create<int>("gains"); //phony property so this dir exists
this->get_tx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&rfx_xcvr::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
+ .set_coercer(boost::bind(&rfx_xcvr::set_lo_freq, this, dboard_iface::UNIT_TX, _1))
.set((_freq_range.start() + _freq_range.stop())/2.0);
this->get_tx_subtree()->create<meta_range_t>("freq/range").set(_freq_range);
this->get_tx_subtree()->create<std::string>("antenna/value")
- .subscribe(boost::bind(&rfx_xcvr::set_tx_ant, this, _1)).set(rfx_tx_antennas.at(0));
+ .add_coerced_subscriber(boost::bind(&rfx_xcvr::set_tx_ant, this, _1)).set(rfx_tx_antennas.at(0));
this->get_tx_subtree()->create<std::vector<std::string> >("antenna/options")
.set(rfx_tx_antennas);
this->get_tx_subtree()->create<std::string>("connection").set("IQ");