Template Function fuse_core::getPositiveParam(node_interfaces::NodeInterfaces<node_interfaces::Logging, node_interfaces::Parameters>, const std::string&, T&, const bool)
Defined in File parameter.hpp
Function Documentation
-
template<typename T, typename = std::enable_if_t<std::is_integral<T>::value || std::is_floating_point<T>::value>>
void fuse_core::getPositiveParam(node_interfaces::NodeInterfaces<node_interfaces::Logging, node_interfaces::Parameters> interfaces, const std::string ¶meter_name, T &default_value, const bool strict = true) Helper function that loads positive integral or floating point values from the parameter server.
- Parameters:
interfaces – [in] - The node interfaces used to load the parameter
parameter_name – [in] - The parameter name to load
default_value – [inout] - A default value to use if the provided parameter name does not exist. As output it has the loaded (or default) value
strict – [in] - Whether to check the loaded value is strictly positive or not, i.e. whether 0 is accepted or not