Class used to control multiple RtcObjects.
It can perform sequential and parallel operations on a list of RtcObjects
Note, the class is not the owner of said RtcObjects.
| std::map< std::string, std::string > rtctk::rtcSupervisor::RtcObjectController::RunParallel |
( |
RtcCommand | cmd, |
|
|
std::optional< unsigned > | timeout = std::nullopt ) |
Runs specified command on each object in parallel and waits for completion or error.
Run a command on the list of object in parallel. We wait for all commands and gather the names of any component which causes an error. At the end we throw an exception if any component caused an error.
Note, this method keeps going on failure by default.
- Parameters
-
| cmd | The command to send to each object. |
| timeout | Command timeout in seconds. |
- Returns
- map of returned strings for each object
- Exceptions
-
launch the commands on all objects in parallel
wait for completion
At the end if any error occurred then CII_THROW
| std::map< std::string, std::string > rtctk::rtcSupervisor::RtcObjectController::RunSequential |
( |
RtcCommand | cmd, |
|
|
bool | keep_going, |
|
|
std::optional< unsigned > | timeout = std::nullopt ) |
Runs specified command on each object in sequence and waits for completion or error.
Run a command on the list of object sequentially. Throw an exception if any of the calls fail unless the keep_going flag is set.
If keep_going is set, then continue to the end and throw at the end with the list of components which caused errors
- Parameters
-
| cmd | The command to send to each object. |
| keep_going | Keep going on failure, otherwise abort on first failure. |
| timeout | Command timeout in seconds. |
- Returns
- map of returned strings for each object
- Exceptions
-
At the end if any error occurred then CII_THROW