break Node into several separate interfaces (#277)
* add the NodeBaseInterface and impl NodeBase * refactor rclcpp to use NodeBaseInterface * triggering a guard condition is not const * remove unnecessary pure virtual destructor * remove unused private member, style * create NodeTopics interface, refactor pub/sub * add convenience functions to fix API breaks * fix compilation errors from NodeTopics refactor * move "Event" based exceptions to exceptions.hpp * add the NodeGraphInterface and related API's * update node and graph_listener to use NodeGraph API * initialize node_topics_ and node_graph_ in Node * remove methods from Node and reorganize the order the removed methods are really low level and still available via their respective Node*Interface class * add the NodeServices API and implementation * add the NodeParameters API and refactor Node * mixups * fixup NodeParameters constructor * added NodeTimers API and refactor Node * make new create_publisher and create_subscription free template functions * fixup * fixup * fixup * fixup share pointer to node in any_executable * free env value before throwing on Windows * uncrustify and cpplint * address constness issues * do not store the topic name as a std::string in subscription * fixes to support const char * topic name * fix incomplete type specification, which fails on Windows * refactor after rebase from type support changes * fixup Windows build * fix template issues on Windows * uncrustify * remove the unnecessary callback group argument from the add_publisher func * remove unnecessary using = directive * do not store node name in C++ * fix client and service creation in Node constructor * fix include orders
This commit is contained in:
parent
2309e5e250
commit
734ac278db
53 changed files with 3106 additions and 1033 deletions
|
@ -37,8 +37,8 @@ TEST_F(TestFindWeakNodes, allocator_strategy_with_weak_nodes) {
|
|||
auto existing_node = rclcpp::node::Node::make_shared("existing_node");
|
||||
auto dead_node = rclcpp::node::Node::make_shared("dead_node");
|
||||
rclcpp::memory_strategy::MemoryStrategy::WeakNodeVector weak_nodes;
|
||||
weak_nodes.push_back(existing_node);
|
||||
weak_nodes.push_back(dead_node);
|
||||
weak_nodes.push_back(existing_node->get_node_base_interface());
|
||||
weak_nodes.push_back(dead_node->get_node_base_interface());
|
||||
|
||||
// AND
|
||||
// Delete dead_node, creating a dangling pointer in weak_nodes
|
||||
|
@ -62,8 +62,8 @@ TEST_F(TestFindWeakNodes, allocator_strategy_no_weak_nodes) {
|
|||
auto existing_node1 = rclcpp::node::Node::make_shared("existing_node1");
|
||||
auto existing_node2 = rclcpp::node::Node::make_shared("existing_node2");
|
||||
rclcpp::memory_strategy::MemoryStrategy::WeakNodeVector weak_nodes;
|
||||
weak_nodes.push_back(existing_node1);
|
||||
weak_nodes.push_back(existing_node2);
|
||||
weak_nodes.push_back(existing_node1->get_node_base_interface());
|
||||
weak_nodes.push_back(existing_node2->get_node_base_interface());
|
||||
ASSERT_FALSE(weak_nodes[0].expired());
|
||||
ASSERT_FALSE(weak_nodes[1].expired());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue