ROS 2 rclcpp + rcl - kilted  kilted
ROS 2 C++ Client Library with ROS Client Library
List of all members
rclcpp::contexts::DefaultContext Class Reference
Inheritance diagram for rclcpp::contexts::DefaultContext:
Inheritance graph
[legend]
Collaboration diagram for rclcpp::contexts::DefaultContext:
Collaboration graph
[legend]

Additional Inherited Members

- Public Types inherited from rclcpp::Context
using OnShutdownCallback = OnShutdownCallbackHandle::ShutdownCallbackType
 
using PreShutdownCallback = PreShutdownCallbackHandle::ShutdownCallbackType
 
- Public Member Functions inherited from rclcpp::Context
RCLCPP_PUBLIC Context ()
 Default constructor, after which the Context is still not "initialized". More...
 
virtual RCLCPP_PUBLIC void init (int argc, char const *const *argv, const rclcpp::InitOptions &init_options=rclcpp::InitOptions())
 Initialize the context, and the underlying elements like the rcl context. More...
 
RCLCPP_PUBLIC bool is_valid () const
 Return true if the context is valid, otherwise false. More...
 
RCLCPP_PUBLIC const rclcpp::InitOptionsget_init_options () const
 Return the init options used during init.
 
RCLCPP_PUBLIC rclcpp::InitOptions get_init_options ()
 Return a copy of the init options used during init.
 
RCLCPP_PUBLIC size_t get_domain_id () const
 Return actual domain id.
 
RCLCPP_PUBLIC std::string shutdown_reason () const
 Return the shutdown reason, or empty string if not shutdown. More...
 
virtual RCLCPP_PUBLIC bool shutdown (const std::string &reason)
 Shutdown the context, making it uninitialized and therefore invalid for derived entities. More...
 
virtual RCLCPP_PUBLIC OnShutdownCallback on_shutdown (OnShutdownCallback callback)
 Add a on_shutdown callback to be called when shutdown is called for this context. More...
 
virtual RCLCPP_PUBLIC OnShutdownCallbackHandle add_on_shutdown_callback (OnShutdownCallback callback)
 Add a on_shutdown callback to be called when shutdown is called for this context. More...
 
virtual RCLCPP_PUBLIC bool remove_on_shutdown_callback (const OnShutdownCallbackHandle &callback_handle)
 Remove an registered on_shutdown callbacks. More...
 
virtual RCLCPP_PUBLIC PreShutdownCallbackHandle add_pre_shutdown_callback (PreShutdownCallback callback)
 Add a pre_shutdown callback to be called before shutdown is called for this context. More...
 
virtual RCLCPP_PUBLIC bool remove_pre_shutdown_callback (const PreShutdownCallbackHandle &callback_handle)
 Remove an registered pre_shutdown callback. More...
 
RCLCPP_PUBLIC std::vector< OnShutdownCallback > get_on_shutdown_callbacks () const
 Return the shutdown callbacks. More...
 
RCLCPP_PUBLIC std::vector< PreShutdownCallback > get_pre_shutdown_callbacks () const
 Return the pre-shutdown callbacks. More...
 
RCLCPP_PUBLIC std::shared_ptr< rcl_context_tget_rcl_context ()
 Return the internal rcl context.
 
RCLCPP_PUBLIC bool sleep_for (const std::chrono::nanoseconds &nanoseconds)
 Sleep for a given period of time or until shutdown() is called. More...
 
RCLCPP_PUBLIC void interrupt_all_sleep_for ()
 Interrupt any blocking sleep_for calls, causing them to return immediately and return true.
 
template<typename SubContext , typename ... Args>
std::shared_ptr< SubContext > get_sub_context (Args &&... args)
 Return a singleton instance for the SubContext type, constructing one if necessary.
 
template<Context::ShutdownType shutdown_type>
rclcpp::ShutdownCallbackHandle add_shutdown_callback (ShutdownCallback callback)
 
template<Context::ShutdownType shutdown_type>
bool remove_shutdown_callback (const ShutdownCallbackHandle &callback_handle)
 
template<Context::ShutdownType shutdown_type>
std::vector< rclcpp::Context::ShutdownCallback > get_shutdown_callback () const
 
- Protected Member Functions inherited from rclcpp::Context
RCLCPP_PUBLIC void clean_up ()
 

Detailed Description

Definition at line 26 of file default_context.hpp.


The documentation for this class was generated from the following files: