nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
nros::ShutdownCallbackHandle Class Reference

#include <executor.hpp>

Inheritance diagram for nros::ShutdownCallbackHandle:
Inheritance graph
[legend]

Public Member Functions

 ShutdownCallbackHandle ()
 
 ShutdownCallbackHandle (nros_cpp_shutdown_callback_handle_t value)
 
bool valid () const
 True when this handle came from a successful registration.
 
nros_cpp_shutdown_callback_handle_t value () const
 The raw FFI value, for passing to the C entry points directly.
 

Detailed Description

Handle to a registered shutdown callback — rclcpp's rclcpp::ShutdownCallbackHandle. Issue 0790.

rclcpp's handle owns a std::shared_ptr to the callback. There is no allocator here and the callbacks live in a fixed-capacity static table, so this wraps the SLOT INDEX instead: the smallest thing that names a row of a static array, and one uint32_t across the C ABI.

Constructor & Destructor Documentation

◆ ShutdownCallbackHandle() [1/2]

nros::ShutdownCallbackHandle::ShutdownCallbackHandle ( )
inline

An empty handle. valid() is false; passing it to a remove does nothing and reports false.

◆ ShutdownCallbackHandle() [2/2]

nros::ShutdownCallbackHandle::ShutdownCallbackHandle ( nros_cpp_shutdown_callback_handle_t  value)
inlineexplicit

Wrap a raw handle from the C FFI. Rarely needed directly — the add_*_shutdown_callback methods hand back a typed handle.

Member Function Documentation

◆ valid()

bool nros::ShutdownCallbackHandle::valid ( ) const
inline

True when this handle came from a successful registration.

◆ value()

nros_cpp_shutdown_callback_handle_t nros::ShutdownCallbackHandle::value ( ) const
inline

The raw FFI value, for passing to the C entry points directly.


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