Deprecate set_on_parameters_set_callback (#1123)
* add deprecate statement * replace tests to use add_on_param fn * deprecate set_on_pram fn in node_parameters * deprecate in lifecycle_node and add replacement fn * update documentation * add warning suppression to test_node.cpp * correct namespace in lifecycle_node.cpp * remove whitespace fix line length in lifecycle_node * move reset fn to below add_on * deprecate set_on in test_lifecycle_node * suppress deprecation warning in node.cpp * suppress warning in lifecycle_node.cpp Signed-off-by: claireyywang <22240514+claireyywang@users.noreply.github.com>
This commit is contained in:
parent
01ec06d601
commit
d13c098feb
8 changed files with 77 additions and 22 deletions
|
@ -268,12 +268,28 @@ LifecycleNode::remove_on_set_parameters_callback(
|
|||
node_parameters_->remove_on_set_parameters_callback(callback);
|
||||
}
|
||||
|
||||
// suppress deprecated function warning
|
||||
#if !defined(_WIN32)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#else // !defined(_WIN32)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4996)
|
||||
#endif
|
||||
|
||||
rclcpp::Node::OnParametersSetCallbackType
|
||||
LifecycleNode::set_on_parameters_set_callback(rclcpp::Node::OnParametersSetCallbackType callback)
|
||||
{
|
||||
return node_parameters_->set_on_parameters_set_callback(callback);
|
||||
}
|
||||
|
||||
// remove warning suppression
|
||||
#if !defined(_WIN32)
|
||||
# pragma GCC diagnostic pop
|
||||
#else // !defined(_WIN32)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
std::vector<std::string>
|
||||
LifecycleNode::get_node_names() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue