Ema_Model_Code_Gen()
Abstract
Generates an EMA application source code file derived from the specified model.
Syntax
Ema_Model_Code_Gen (model_id, model_name)
| Argument | Type | Description |
|---|---|---|
model_id |
EmaT_Model_Id |
numeric model ID of the model to be used as the basis for a new EMA application [This value is a numeric identifier that references a model. Use the functions Ema_Model_Create(), Ema_Model_Copy(), or Ema_Model_Read() to obtain a model ID.] |
model_name |
char* |
base name of generated EMA file [This name is used to create the name of the generated EMA file; the path to the file and file type suffix should not be included in this argument, since they will be automatically appended to generate the full file path. The generated file’s type suffix is .em.c.] |
Return Type
void
No return value.
Header
ema.h
Details
The logic of any algorithm used to define the specified model does not make it into the generated EMA application code. The generated code only creates an exact duplicate of the current state of the specified model, including all the objects and attribute values.
The EMA application source code file is generated in the primary model directory.
The value of the environment attribute ema_verbose affects the code generated by this function. If this environment attribute is set to TRUE, the generated EMA code will include assignments for all model and object attributes, even those with default values. The only way to set the ema_verbose environment attribute for detection by EMA applications is by a statement in the preferences file (command-line arguments, shell variables, or environment files are not usable for EMA application environment attributes).