|
Pakman
|
#include <SerialMaster.h>


Public Member Functions | |
| SerialMaster (const Command &simulator, bool *p_program_terminated) | |
| virtual | ~SerialMaster () override=default |
| virtual bool | isActive () const override |
| virtual bool | needMorePendingTasks () const override |
| virtual void | pushPendingTask (const std::string &input_string) override |
| virtual bool | finishedTasksEmpty () const override |
| virtual TaskHandler & | frontFinishedTask () override |
| virtual void | popFinishedTask () override |
| virtual void | flush () override |
| virtual void | terminate () override |
Public Member Functions inherited from AbstractMaster | |
| AbstractMaster (bool *p_program_terminated) | |
| virtual | ~AbstractMaster ()=default |
Static Public Member Functions | |
| static std::string | help () |
| static void | addLongOptions (LongOptions &lopts) |
| static void | run (controller_t controller, const Arguments &args) |
| static void | cleanup () |
Static Public Member Functions inherited from AbstractMaster | |
| static master_t | getMaster (const std::string &arg) |
| static std::string | help (master_t master) |
| static void | addLongOptions (master_t master, LongOptions &lopts) |
| static void | run (master_t master, controller_t controller, const Arguments &args) |
| static void | cleanup (master_t master) |
Protected Member Functions | |
| virtual void | iterate () override |
Protected Member Functions inherited from AbstractMaster | |
| void | assignController (std::shared_ptr< AbstractController > p_controller) |
| bool | programTerminated () const |
Additional Inherited Members | |
Protected Attributes inherited from AbstractMaster | |
| std::weak_ptr< AbstractController > | m_p_controller |
A Master class for performing simulation tasks serially.
The SerialMaster class performs simulation tasks serially by spawning child processes with fork()–exec() to run simulations.
For instructions on how to use Pakman with the serial master, execute the following command
Definition at line 26 of file SerialMaster.h.
| SerialMaster::SerialMaster | ( | const Command & | simulator, |
| bool * | p_program_terminated | ||
| ) |
Constructor saves simulator command and program termination flag.
| simulator | command to run simulation. |
| p_program_terminated | pointer to boolean flag that is set when the execution of Pakman is terminated by the user. |
Definition at line 13 of file SerialMaster.cc.
|
overridevirtualdefault |
Default destructor does nothing.
|
static |
Add long command-line options.
| lopts | long command-line options that the SerialMaster needs. |
Definition at line 29 of file SerialMasterStatic.cc.
|
static |
For SerialMaster, this function does nothing.
Definition at line 65 of file SerialMasterStatic.cc.
|
overridevirtual |
Implements AbstractMaster.
Definition at line 67 of file SerialMaster.cc.
|
overridevirtual |
Flush all finished, busy and pending tasks.
Implements AbstractMaster.
Definition at line 85 of file SerialMaster.cc.
|
overridevirtual |
Implements AbstractMaster.
Definition at line 73 of file SerialMaster.cc.
|
static |
Definition at line 17 of file SerialMasterStatic.cc.
|
overridevirtual |
Implements AbstractMaster.
Definition at line 20 of file SerialMaster.cc.
|
overrideprotectedvirtual |
Iterates the SerialMaster in an event loop.
Implements AbstractMaster.
Definition at line 26 of file SerialMaster.cc.
|
overridevirtual |
Implements AbstractMaster.
Definition at line 55 of file SerialMaster.cc.
|
overridevirtual |
|
overridevirtual |
Push a new pending task.
| input_string | input string to simulation job. |
Implements AbstractMaster.
Definition at line 61 of file SerialMaster.cc.
|
static |
Run SerialMaster in an event loop.
This function creates the SerialMaster and Controller objects, and runs them in an event loop.
| controller | controller type. |
| args | command-line arguments. |
Definition at line 35 of file SerialMasterStatic.cc.
|
overridevirtual |