|
nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
|
#include <guard_condition.hpp>
Public Member Functions | |
| GuardCondition () | |
| GuardCondition (GuardCondition &&other) | |
| bool | is_valid () const |
| Check if the guard condition is initialized and valid. | |
| GuardCondition & | operator= (GuardCondition &&other) |
| Result | trigger () |
| ~GuardCondition () | |
| Destructor — releases guard condition resources. | |
Friends | |
| class | Node |
Guard condition for cross-thread signaling.
Guard conditions allow any thread to wake the executor and optionally invoke a callback during spin_once(). The trigger() method is thread-safe and lock-free.
Usage:
|
inline |
Destructor — releases guard condition resources.
|
inline |
|
inline |
Default constructor — creates an uninitialized guard condition. Use Node::create_guard_condition() to initialize.
|
inline |
Check if the guard condition is initialized and valid.
|
inline |
|
inline |
Trigger the guard condition (thread-safe, lock-free).
The callback will be invoked on the next spin_once().