rclcpp
master
C++ ROS Client Library API
|
Go to the documentation of this file.
15 #ifndef RCLCPP__UTILITIES_HPP_
16 #define RCLCPP__UTILITIES_HPP_
56 init(
int argc,
char const *
const argv[],
const InitOptions & init_options = InitOptions());
110 char const *
const argv[],
111 const InitOptions & init_options = InitOptions());
144 ok(rclcpp::Context::SharedPtr context =
nullptr);
163 rclcpp::Context::SharedPtr context =
nullptr,
164 const std::string & reason =
"user called rclcpp::shutdown()");
202 rclcpp::Context::SharedPtr context =
nullptr);
294 #endif // RCLCPP__UTILITIES_HPP_
bool sub_will_overflow(const T x, const T y)
Safely check if subtraction will overflow.
Definition: utilities.hpp:250
bool ok(rclcpp::Context::SharedPtr context=nullptr)
Check rclcpp's status.
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
bool sleep_for(const std::chrono::nanoseconds &nanoseconds, rclcpp::Context::SharedPtr context=nullptr)
Use the global condition variable to block for the specified amount of time.
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
std::vector< std::string > init_and_remove_ros_arguments(int argc, char const *const argv[], const InitOptions &init_options=InitOptions())
Initialize communications via the rmw implementation and set up a global signal handler.
void init(int argc, char const *const argv[], const InitOptions &init_options=InitOptions())
Initialize communications via the rmw implementation and set up a global signal handler.
bool add_will_overflow(const T x, const T y)
Safely check if addition will overflow.
Definition: utilities.hpp:216
bool sub_will_underflow(const T x, const T y)
Safely check if subtraction will underflow.
Definition: utilities.hpp:267
const char * get_c_string(const char *string_in)
Return the given string.
std::vector< std::string > remove_ros_arguments(int argc, char const *const argv[])
Remove ROS-specific arguments from argument vector.
bool install_signal_handlers()
Install the global signal handler for rclcpp.
bool signal_handlers_installed()
Return true if the signal handlers are installed, otherwise false.
bool uninstall_signal_handlers()
Uninstall the global signal handler for rclcpp.
void on_shutdown(std::function< void()> callback, rclcpp::Context::SharedPtr context=nullptr)
Register a function to be called when shutdown is called on the context.
bool add_will_underflow(const T x, const T y)
Safely check if addition will underflow.
Definition: utilities.hpp:233
bool shutdown(rclcpp::Context::SharedPtr context=nullptr, const std::string &reason="user called rclcpp::shutdown()")
Shutdown rclcpp context, invalidating it for derived entities.