EMOCManager

EMOCManager Class #

File position: /EMOC/src/core/emoc_manager.h and /EMOC/src/core/emoc_manager.cpp

class EMOCManager()

EMOCManager is the manager class of EMOC which controls the command mode and GUI mode.

Parameter:
void
Member variables:
(private) is_plot_: bool
    Whether to activate plot function.

(private) is_gui_: bool
    Whether to enable gui mode.

(private) is_experiment_: bool
    Whether in experiment module of gui mode.

(private) is_test_pause_: bool
    Whether current run is paused in test module of gui mode.

(private) is_test_finish_: bool
    Whether current run is finished in test module of gui mode.

(private) is_experiment_pause_: bool
    Whether current run is finished in experiment module of gui mode.

(private) is_experiment_finish_: bool
    Whether current run is finished in experiment module of gui mode.

(private) g_GlobalSettingsArray: std::vector<Global*>
    An array of pointer to Global, it is reserved for different threads. The size of the vector is MAX_THREAD_NUM which is a macro definition in EMOC. By default the value is 128.

Note: Most of the private member variables can be set or got by the corresponding Get and Set functions. For more details, please check the source code.


Public Methods:

static EMOCManager* Instance()

Get the pointer to current EMOCManager object.

In EMOC, the EMOCManager class utilize the singleton design mode. So the object can be retrieved anywhere by EMOCManager::Instance() directly.

Parameter:
void
Returns:
s_Instance: EMOCManager*
    Pointer to the current EMOCManager object iteself.
void Run()

The run function for command line mode in EMOC.

Parameter:
void
Returns:
void
void ExperimentModuleRun(std::vector<EMOCParameters> experiment_tasks, int thread_num)

The run function for experiment module of gui mode in EMOC.

Parameter:
experiment_tasks: std::vector<EMOCParameters>, default=None
    All EMOC tasks need to be completed which are configured in experiment module of gui mode.

thread_num: int, default=None
    The number of enabled thread.
Returns:
void