EtsT_Pj_DES_Presim_Callback
Note: Requires OPNET Development Kit
Abstract
Callback: Called before each simulation run.
Syntax
<des_presim_callback_name> (pj_hndl, client_state_ptr, sim_attrs_lptr, sim_run_index, sim_run_count)
| Argument | Type | Description |
|---|---|---|
pj_hndl |
EtsT_Model_Handle |
The project being simulated. |
client_state_ptr |
void * |
State information specified by the client when the callback was registered. |
sim_attrs_lptr |
PrgT_List * |
List of simulation attributes for the upcoming simulation run (see Details). |
sim_run_index |
int |
Sequence number of the previous simulation in a set, if any. Set to ETSC_PJ_DES_PRESIM_INITIALIZE_RUN_INDEX when called in the early initialization stage, before starting any simulation run. |
sim_run_count |
int |
Number of simulation runs in current set. |
Return Type
EtsT_Pj_DES_Presim_Result
Code indicating whether the simulation should continue; one of the values in Table 36 Project Package Symbolic Constants.
Header
ets_api_pj.h
Details
This callback can perform any processing that is needed before a simulation is run. It is registered by Ets_Pj_DES_Presim_Callback_Register().
The callback can make changes, add, or remove entries in the attribute list pointed to by sim_attrs_lptr. Each entry of the list is a structure defined as follows:
typedef struct EtsT_Pj_DES_Sim_Config_Attr
{
char * name;
int value_is_a_list;
union
{
char * string;
PrgT_List * textlist;
} value;
} EtsT_Pj_DES_Sim_Config_Attr;
If value_is_a_list is TRUE in this structure, the following value is a list; otherwise it is a string.