#include <Spawner.hpp>
◆ allReady()
| bool Spawner::allReady |
( |
| ) |
|
This method checks if all spawned tasks registered at the nameservice.
◆ checkAllProcesses()
| bool Spawner::checkAllProcesses |
( |
| ) |
|
This method checks if all spawened processes are still alive
- Returns
- false if any process died
◆ getInstace()
Singleton pattern, returns the ONE instance of the spawner.
◆ getRunningDeployments()
| std::vector< const Deployment *> Spawner::getRunningDeployments |
( |
| ) |
|
Returns a vector of all deployments, that are currently running.
◆ isRunning()
| bool Spawner::isRunning |
( |
const Deployment * |
instance | ) |
|
Returns, if the given instance of a deployment is running.
◆ killAll()
| void Spawner::killAll |
( |
| ) |
|
This method first sends a sigterm to all processes and waits for the processes to terminate. If this did not happen, it will send a sigkill and return.
◆ sendSigTerm()
| void Spawner::sendSigTerm |
( |
| ) |
|
This method sends a sigterm to all child processes.
◆ setLogDirectory()
| void Spawner::setLogDirectory |
( |
const std::string & |
log_folder | ) |
|
Sets the default log directory. If no log directory is set it will be determined using bundles.
◆ spawnDeployment() [1/2]
This method spawns a process that executes the deployment with the given name. This method will throw if any error occures.
- dplName Name of the deployment executable that should be started
- Returns
- A Process handle, which may be used to request the process status
◆ spawnDeployment() [2/2]
This method spawns a process that executes the given deployment. This method will throw if any error occures.
- dplName The deployment that should be started. The ownership of the deployment will be taken over by the spawner.
- Returns
- A Process handle, which may be used to request the process status
◆ spawnTask()
| Spawner::ProcessHandle & Spawner::spawnTask |
( |
const std::string & |
cmp1, |
|
|
const std::string & |
as = std::string(), |
|
|
bool |
redirectOutput = true |
|
) |
| |
This method spawns a default deployment matching the given componente description. If a second argument is given, the task will be renamed to the given name. The method will throw if any error occures.
- cmp1 The task model name e.g Hokuyo::Task
- as The name unter wich the taskmodel should be registered a the nameservice
- Returns
- A Process handle, which may be used to request the process status
◆ waitUntilAllReady()
| void Spawner::waitUntilAllReady |
( |
const base::Time & |
timeout | ) |
|
Waits up to the given timeout for all tasks, to be connectable via the nameservice. Will throw an runtime error if not all tasks could be reached.
The documentation for this class was generated from the following files:
- /build/rock-master-18.09-tools-orocos-cpp-0.20180417/src/Spawner.hpp
- /build/rock-master-18.09-tools-orocos-cpp-0.20180417/src/Spawner.cpp