ProcessManager Class Reference

Space-ng SDK: sol3::process_manager::ProcessManager Class Reference
Space-ng SDK
sol3::process_manager::ProcessManager Class Reference

Manages the lifecycle of multiple child processes with auto-restart and control capabilities. More...

#include <sol3/process_manager/process_manager.h>

Inheritance diagram for sol3::process_manager::ProcessManager:

Public Member Functions

void asyncStart ()
 Asynchronously starts all managed processes and begins control/telemetry loops. More...
 
void asyncStop ()
 Asynchronously stops all managed processes and cancels control/telemetry loops. More...
 
std::vector< msg::ProcessTelemetryT > testGetProcessTelemetry () const
 Retrieves telemetry for all managed processes. More...
 

Static Public Member Functions

static std::shared_ptr< ProcessManagercreate (asio::Strand strand, core::ShmemExchange &exchange, msg::ProcessManagerConfigT const &config)
 Factory method to create a ProcessManager instance. More...
 

Detailed Description

Manages the lifecycle of multiple child processes with auto-restart and control capabilities.

ProcessManager coordinates starting, stopping, and monitoring child processes based on configuration. It supports automatic restarts, manual control via messages, and publishes telemetry about process states.

Member Function Documentation

◆ asyncStart()

void sol3::process_manager::ProcessManager::asyncStart ( )

Asynchronously starts all managed processes and begins control/telemetry loops.

◆ asyncStop()

void sol3::process_manager::ProcessManager::asyncStop ( )

Asynchronously stops all managed processes and cancels control/telemetry loops.

◆ create()

static std::shared_ptr<ProcessManager> sol3::process_manager::ProcessManager::create ( asio::Strand  strand,
core::ShmemExchange exchange,
msg::ProcessManagerConfigT const &  config 
)
static

Factory method to create a ProcessManager instance.

Parameters
strandThe strand for executing all ProcessManager operations.
exchangeThe shared memory exchange for inter-process communication.
configConfiguration specifying processes to manage and control parameters.
Returns
A shared pointer to the created ProcessManager.

◆ testGetProcessTelemetry()

std::vector<msg::ProcessTelemetryT> sol3::process_manager::ProcessManager::testGetProcessTelemetry ( ) const

Retrieves telemetry for all managed processes.

Returns
A vector of process telemetry structures.
Note
Must be called from the strand context.

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