Skip to content

Commit

Permalink
Implement getParam for simple subscriber plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
john-maidbot committed May 13, 2024
1 parent 97a23e6 commit e50780c
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ class SimpleSubscriberPlugin : public SubscriberPlugin
return {};
}

//! template function for getting parameter of a given type
template<typename T>
bool getParam(const std::string & name, T & value) const
{
if (impl_) {
return impl_->node_->get_parameter(name, value);
}
return false;
}

template<typename T>
bool declareParam(
const std::string parameter_name, const T value,
Expand Down

0 comments on commit e50780c

Please sign in to comment.