SimGrid  3.13
Versatile Simulation of Distributed Systems
smx_deployment.cpp File Reference
#include "smx_private.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "xbt/dict.h"
#include "src/surf/xml/platf_private.hpp"

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (simix_deployment, simix,"Logging specific to SIMIX (deployment)")
 
void SIMIX_init_application (void)
 
void SIMIX_launch_application (const char *file)
 An application deployer. More...
 
void SIMIX_function_register (const char *name, xbt_main_func_t code)
 Registers a #smx_process_code_t code in a global table. More...
 
void SIMIX_function_register_default (xbt_main_func_t code)
 Registers a #smx_process_code_t code as default value. More...
 
xbt_main_func_t SIMIX_get_registered_function (const char *name)
 Gets a smx_process_t code from the global table. More...
 
void SIMIX_process_set_function (const char *process_host, const char *process_function, xbt_dynar_t arguments, double process_start_time, double process_kill_time)
 Bypass the parser, get arguments, and set function to each process. More...
 

Variables

int surf_parse_lineno
 
static xbt_main_func_t default_function = NULL
 

Function Documentation

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( simix_deployment  ,
simix  ,
"Logging specific to SIMIX (deployment)"   
)
void SIMIX_init_application ( void  )
void SIMIX_launch_application ( const char *  file)

An application deployer.

Creates the process described in file.

Parameters
filea filename of a xml description of the application. This file follows this DTD :
\include surfxml.dtd

Here is a small example of such a platform

\include small_deployment.xml
void SIMIX_function_register ( const char *  name,
xbt_main_func_t  code 
)

Registers a #smx_process_code_t code in a global table.

Registers a code function in a global table. This table is then used by SIMIX_launch_application.

Parameters
namethe reference name of the function.
codethe function
void SIMIX_function_register_default ( xbt_main_func_t  code)

Registers a #smx_process_code_t code as default value.

Registers a code function as being the default value. This function will get used by SIMIX_launch_application() when there is no registered function of the requested name in.

Parameters
codethe function
xbt_main_func_t SIMIX_get_registered_function ( const char *  name)

Gets a smx_process_t code from the global table.

Gets a code function from the global table. Returns NULL if there are no function registered with the name. This table is then used by SIMIX_launch_application.

Parameters
namethe reference name of the function.
Returns
The smx_process_t or NULL.
void SIMIX_process_set_function ( const char *  process_host,
const char *  process_function,
xbt_dynar_t  arguments,
double  process_start_time,
double  process_kill_time 
)

Bypass the parser, get arguments, and set function to each process.

Variable Documentation

int surf_parse_lineno
xbt_main_func_t default_function = NULL
static