The issue I'm reporting is quite common looking at similar questions:
Shutdown a node from another node in ROS CPP
Start or stop the ROS node in another node
Could a node can be stoped by another node?
launch a node within another node
None of these answer to my case: ros2, cpp, no system calls allowed, component nodes. The first link suggests that a possible solution would be implementing a service but the old code snippets are no longer available...
My use case is this node to capture sound from microphones
https://github.com/ros-drivers/audio_common/blob/ros2/audio_capture/src/audio_capture_node.cpp
I'd like to record only when some conditions become true...
Thank you!