From 27a08ccddc94c4945d48445b14c23fe6d186f9ef Mon Sep 17 00:00:00 2001
From: Ashish Chaudhari <ashish@ettus.com>
Date: Tue, 25 Aug 2015 21:09:06 -0700
Subject: 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
---
 host/lib/usrp_clock/octoclock/octoclock_impl.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'host/lib/usrp_clock')

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{
-- 
cgit v1.2.3