NRP Core  1.4.1
LaunchCommand< LAUNCH_COMMAND > Class Template Reference

Class for launch commands. Must be specialized further. More...

#include <launch_command.h>

Inheritance diagram for LaunchCommand< LAUNCH_COMMAND >:
LaunchCommandInterface PtrTemplates< LaunchCommandInterface > BasicFork

Public Member Functions

std::string_view launchType () const override final
 Get launch command type. More...
 
- Public Member Functions inherited from LaunchCommandInterface
 LaunchCommandInterface ()=default
 
virtual ~LaunchCommandInterface ()=default
 
virtual pid_t launchProcess (const nlohmann::json &launcherConfig, const std::string &procCmd, const std::vector< std::string > &envParams, const std::vector< std::string > &startParams, bool appendParentEnv=true, int logFD=-1)=0
 Fork a new process for the given engine. Will read environment variables and start params from engineConfig The function should take the environment parameters and start parameters defined in engineConfig, and append any additional strings defined in envParams and startParams before starting the Engine specified in engineConfig. If appendParentEnv is set to true, use the parent environment in the forked child. If set to false, scrub the environment before continuing. More...
 
virtual pid_t stopProcess (unsigned int killWait)=0
 Stop a running engine process. More...
 
virtual ENGINE_RUNNING_STATUS getProcessStatus ()
 Get the current engine process status. If status cannot be retrieved, return ENGINE_RUNNING_STATUS::UNKNOWN. More...
 

Static Public Attributes

static constexpr auto LaunchType = LAUNCH_COMMAND
 

Additional Inherited Members

- Public Types inherited from LaunchCommandInterface
enum  ENGINE_RUNNING_STATUS { UNKNOWN = -1, RUNNING, STOPPED }
 Engine Process status. More...
 
- Public Types inherited from PtrTemplates< LaunchCommandInterface >
using shared_ptr = std::shared_ptr< LaunchCommandInterface >
 
using const_shared_ptr = std::shared_ptr< const LaunchCommandInterface >
 
using unique_ptr = std::unique_ptr< LaunchCommandInterface >
 
using const_unique_ptr = std::unique_ptr< const LaunchCommandInterface >
 

Detailed Description

template<const char * LAUNCH_COMMAND>
class LaunchCommand< LAUNCH_COMMAND >

Class for launch commands. Must be specialized further.

Template Parameters
LAUNCH_COMMANDName of launch command

Member Function Documentation

◆ launchType()

template<const char * LAUNCH_COMMAND>
std::string_view LaunchCommand< LAUNCH_COMMAND >::launchType ( ) const
inlinefinaloverridevirtual

Get launch command type.

Implements LaunchCommandInterface.

Member Data Documentation

◆ LaunchType

template<const char * LAUNCH_COMMAND>
constexpr auto LaunchCommand< LAUNCH_COMMAND >::LaunchType = LAUNCH_COMMAND
staticconstexpr

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