aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/experts/expert_factory.hpp
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2016-02-24 17:11:27 -0800
committerAshish Chaudhari <ashish@ettus.com>2016-02-26 14:23:55 -0800
commit586944ec2bc991d1b96c8698e5da8b39b3d36f9a (patch)
tree068f26481fb3ec669de53b0b383e215978d8f6c8 /host/lib/experts/expert_factory.hpp
parent6db9ac785ca5f62e58cf792f0525b37b16a87bdf (diff)
downloaduhd-586944ec2bc991d1b96c8698e5da8b39b3d36f9a.tar.gz
uhd-586944ec2bc991d1b96c8698e5da8b39b3d36f9a.tar.bz2
uhd-586944ec2bc991d1b96c8698e5da8b39b3d36f9a.zip
experts: Multiple minor fixes/enhancements
- Fixed segfault issue for graph modification errors - Demangled node type names and added quotes to "dot" labels to allow fully qualified C++ names - add_prop_node functions initialize the property objects in the tree in addition to data nodes - Passed in resolve mutex to desired data node correctly - Added == and != operators to data accessors
Diffstat (limited to 'host/lib/experts/expert_factory.hpp')
-rw-r--r--host/lib/experts/expert_factory.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/host/lib/experts/expert_factory.hpp b/host/lib/experts/expert_factory.hpp
index 2d378535c..83369117d 100644
--- a/host/lib/experts/expert_factory.hpp
+++ b/host/lib/experts/expert_factory.hpp
@@ -103,6 +103,7 @@ namespace uhd { namespace experts {
property<data_t>& prop = subtree->create<data_t>(path, property_tree::MANUAL_COERCE);
data_node_t<data_t>* node_ptr =
new data_node_t<data_t>(name, init_val, &container->resolve_mutex());
+ prop.set(init_val);
prop.add_desired_subscriber(boost::bind(&data_node_t<data_t>::commit, node_ptr, _1));
prop.set_publisher(boost::bind(&data_node_t<data_t>::retrieve, node_ptr));
container->add_data_node(node_ptr, mode);
@@ -165,10 +166,11 @@ namespace uhd { namespace experts {
property<data_t>& prop = subtree->create<data_t>(path, property_tree::MANUAL_COERCE);
data_node_t<data_t>* desired_node_ptr =
- new data_node_t<data_t>(
- desired_name, init_val, auto_resolve_desired ? &container->resolve_mutex() : NULL);
+ new data_node_t<data_t>(desired_name, init_val, &container->resolve_mutex());
data_node_t<data_t>* coerced_node_ptr =
new data_node_t<data_t>(coerced_name, init_val, &container->resolve_mutex());
+ prop.set(init_val);
+ prop.set_coerced(init_val);
prop.add_desired_subscriber(boost::bind(&data_node_t<data_t>::commit, desired_node_ptr, _1));
prop.set_publisher(boost::bind(&data_node_t<data_t>::retrieve, coerced_node_ptr));