diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2016-02-24 17:11:27 -0800 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2016-02-26 14:23:55 -0800 |
commit | 586944ec2bc991d1b96c8698e5da8b39b3d36f9a (patch) | |
tree | 068f26481fb3ec669de53b0b383e215978d8f6c8 /host/lib/experts/expert_container.cpp | |
parent | 6db9ac785ca5f62e58cf792f0525b37b16a87bdf (diff) | |
download | uhd-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_container.cpp')
-rw-r--r-- | host/lib/experts/expert_container.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/host/lib/experts/expert_container.cpp b/host/lib/experts/expert_container.cpp index 3c4687d66..dc98ee4ed 100644 --- a/host/lib/experts/expert_container.cpp +++ b/host/lib/experts/expert_container.cpp @@ -145,7 +145,7 @@ public: ) { const dag_vertex_t& vertex = _get_vertex(*vi.first); if (vertex.get_class() != CLASS_WORKER) { - dot_str += str(boost::format(" %d [label=\"%s\",shape=%s,xlabel=%s];\n") % + dot_str += str(boost::format(" %d [label=\"%s\",shape=%s,xlabel=\"%s\"];\n") % boost::uint32_t(*vi.first) % vertex.get_name() % DATA_SHAPE % vertex.get_dtype()); } else { @@ -288,12 +288,12 @@ protected: //Sanity check the data node and ensure that it is not already in this graph EX_LOG(0, str(boost::format("add_data_node(%s)") % data_node->get_name())); if (data_node->get_class() == CLASS_WORKER) { - delete data_node; throw uhd::runtime_error("Supplied node " + data_node->get_name() + " is not a data/property node."); + delete data_node; } if (_datanode_map.find(data_node->get_name()) != _datanode_map.end()) { - delete data_node; throw uhd::runtime_error("Data node with name " + data_node->get_name() + " already exists"); + delete data_node; } try { @@ -329,12 +329,12 @@ protected: //Sanity check the data node and ensure that it is not already in this graph EX_LOG(0, str(boost::format("add_worker(%s)") % worker->get_name())); if (worker->get_class() != CLASS_WORKER) { - delete worker; throw uhd::runtime_error("Supplied node " + worker->get_name() + " is not a worker node."); + delete worker; } if (_worker_map.find(worker->get_name()) != _worker_map.end()) { - delete worker; throw uhd::runtime_error("Resolver with name " + worker->get_name() + " already exists."); + delete worker; } try { |