aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/cores
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/cores
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/cores')
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.cpp8
-rw-r--r--host/lib/usrp/cores/rx_frontend_core_200.cpp6
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_3000.cpp8
-rw-r--r--host/lib/usrp/cores/tx_frontend_core_200.cpp4
4 files changed, 13 insertions, 13 deletions
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
index 27e55ac51..0c11c5a12 100644
--- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
@@ -253,18 +253,18 @@ public:
void populate_subtree(property_tree::sptr subtree)
{
subtree->create<meta_range_t>("rate/range")
- .publish(boost::bind(&rx_dsp_core_3000::get_host_rates, this))
+ .set_publisher(boost::bind(&rx_dsp_core_3000::get_host_rates, this))
;
subtree->create<double>("rate/value")
.set(DEFAULT_RATE)
- .coerce(boost::bind(&rx_dsp_core_3000::set_host_rate, this, _1))
+ .set_coercer(boost::bind(&rx_dsp_core_3000::set_host_rate, this, _1))
;
subtree->create<double>("freq/value")
.set(DEFAULT_CORDIC_FREQ)
- .coerce(boost::bind(&rx_dsp_core_3000::set_freq, this, _1))
+ .set_coercer(boost::bind(&rx_dsp_core_3000::set_freq, this, _1))
;
subtree->create<meta_range_t>("freq/range")
- .publish(boost::bind(&rx_dsp_core_3000::get_freq_range, this))
+ .set_publisher(boost::bind(&rx_dsp_core_3000::get_freq_range, this))
;
}
diff --git a/host/lib/usrp/cores/rx_frontend_core_200.cpp b/host/lib/usrp/cores/rx_frontend_core_200.cpp
index 7ac920553..0a60bf87c 100644
--- a/host/lib/usrp/cores/rx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/rx_frontend_core_200.cpp
@@ -83,15 +83,15 @@ public:
{
subtree->create<std::complex<double> >("dc_offset/value")
.set(DEFAULT_DC_OFFSET_VALUE)
- .coerce(boost::bind(&rx_frontend_core_200::set_dc_offset, this, _1))
+ .set_coercer(boost::bind(&rx_frontend_core_200::set_dc_offset, this, _1))
;
subtree->create<bool>("dc_offset/enable")
.set(DEFAULT_DC_OFFSET_ENABLE)
- .subscribe(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, this, _1))
+ .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, this, _1))
;
subtree->create<std::complex<double> >("iq_balance/value")
.set(DEFAULT_IQ_BALANCE_VALUE)
- .subscribe(boost::bind(&rx_frontend_core_200::set_iq_balance, this, _1))
+ .add_coerced_subscriber(boost::bind(&rx_frontend_core_200::set_iq_balance, this, _1))
;
}
diff --git a/host/lib/usrp/cores/tx_dsp_core_3000.cpp b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
index 66bcfb6ea..3889bbdc4 100644
--- a/host/lib/usrp/cores/tx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
@@ -180,18 +180,18 @@ public:
void populate_subtree(property_tree::sptr subtree)
{
subtree->create<meta_range_t>("rate/range")
- .publish(boost::bind(&tx_dsp_core_3000::get_host_rates, this))
+ .set_publisher(boost::bind(&tx_dsp_core_3000::get_host_rates, this))
;
subtree->create<double>("rate/value")
.set(DEFAULT_RATE)
- .coerce(boost::bind(&tx_dsp_core_3000::set_host_rate, this, _1))
+ .set_coercer(boost::bind(&tx_dsp_core_3000::set_host_rate, this, _1))
;
subtree->create<double>("freq/value")
.set(DEFAULT_CORDIC_FREQ)
- .coerce(boost::bind(&tx_dsp_core_3000::set_freq, this, _1))
+ .set_coercer(boost::bind(&tx_dsp_core_3000::set_freq, this, _1))
;
subtree->create<meta_range_t>("freq/range")
- .publish(boost::bind(&tx_dsp_core_3000::get_freq_range, this))
+ .set_publisher(boost::bind(&tx_dsp_core_3000::get_freq_range, this))
;
}
diff --git a/host/lib/usrp/cores/tx_frontend_core_200.cpp b/host/lib/usrp/cores/tx_frontend_core_200.cpp
index 0fa028571..be4f77f39 100644
--- a/host/lib/usrp/cores/tx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/tx_frontend_core_200.cpp
@@ -79,11 +79,11 @@ public:
{
subtree->create< std::complex<double> >("dc_offset/value")
.set(DEFAULT_DC_OFFSET_VALUE)
- .coerce(boost::bind(&tx_frontend_core_200::set_dc_offset, this, _1))
+ .set_coercer(boost::bind(&tx_frontend_core_200::set_dc_offset, this, _1))
;
subtree->create< std::complex<double> >("iq_balance/value")
.set(DEFAULT_IQ_BALANCE_VALUE)
- .subscribe(boost::bind(&tx_frontend_core_200::set_iq_balance, this, _1))
+ .add_coerced_subscriber(boost::bind(&tx_frontend_core_200::set_iq_balance, this, _1))
;
}