aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp_clock/octoclock
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_clock/octoclock
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_clock/octoclock')
-rw-r--r--host/lib/usrp_clock/octoclock/octoclock_impl.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
index 22c26b42c..cd851976f 100644
--- a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
+++ b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
@@ -236,21 +236,21 @@ octoclock_impl::octoclock_impl(const device_addr_t &_device_addr){
_oc_dict[oc].eeprom = octoclock_eeprom_t(_oc_dict[oc].ctrl_xport);
_tree->create<octoclock_eeprom_t>(oc_path / "eeprom")
.set(_oc_dict[oc].eeprom)
- .subscribe(boost::bind(&octoclock_impl::_set_eeprom, this, oc, _1));
+ .add_coerced_subscriber(boost::bind(&octoclock_impl::_set_eeprom, this, oc, _1));
////////////////////////////////////////////////////////////////////
// Initialize non-GPSDO sensors
////////////////////////////////////////////////////////////////////
_tree->create<boost::uint32_t>(oc_path / "time")
- .publish(boost::bind(&octoclock_impl::_get_time, this, oc));
+ .set_publisher(boost::bind(&octoclock_impl::_get_time, this, oc));
_tree->create<sensor_value_t>(oc_path / "sensors/ext_ref_detected")
- .publish(boost::bind(&octoclock_impl::_ext_ref_detected, this, oc));
+ .set_publisher(boost::bind(&octoclock_impl::_ext_ref_detected, this, oc));
_tree->create<sensor_value_t>(oc_path / "sensors/gps_detected")
- .publish(boost::bind(&octoclock_impl::_gps_detected, this, oc));
+ .set_publisher(boost::bind(&octoclock_impl::_gps_detected, this, oc));
_tree->create<sensor_value_t>(oc_path / "sensors/using_ref")
- .publish(boost::bind(&octoclock_impl::_which_ref, this, oc));
+ .set_publisher(boost::bind(&octoclock_impl::_which_ref, this, oc));
_tree->create<sensor_value_t>(oc_path / "sensors/switch_pos")
- .publish(boost::bind(&octoclock_impl::_switch_pos, this, oc));
+ .set_publisher(boost::bind(&octoclock_impl::_switch_pos, this, oc));
////////////////////////////////////////////////////////////////////
// Check reference and GPSDO
@@ -270,7 +270,7 @@ octoclock_impl::octoclock_impl(const device_addr_t &_device_addr){
if(_oc_dict[oc].gps and _oc_dict[oc].gps->gps_detected()){
BOOST_FOREACH(const std::string &name, _oc_dict[oc].gps->get_sensors()){
_tree->create<sensor_value_t>(oc_path / "sensors" / name)
- .publish(boost::bind(&gps_ctrl::get_sensor, _oc_dict[oc].gps, name));
+ .set_publisher(boost::bind(&gps_ctrl::get_sensor, _oc_dict[oc].gps, name));
}
}
else{