op_sim_info_get()
Abstract
Obtains specified kernel data information during a simulation.
Syntax
op_sim_info_get (info_type, info_index, data_ptr)
| Argument | Type | Description |
|---|---|---|
info_type |
int |
type of data_ptr (OPC_INTEGER, OPC_DOUBLE, OPC_TOGGLE, or OPC_STRING) |
info_index |
int |
information requested (see Details section) |
data_ptr |
void* |
address in which to place the requested information (the actual data type is given by info_type) |
Return Type
Compcode
OPC_COMPCODE_FAILURE if info_index is invalid; OPC_COMPCODE_SUCCESS otherwise.
Example
double tval;
op_sim_info_get (OPC_DOUBLE, OPC_SIM_INFO_ELAPSED, &tval);
printf ("The simulation has been running for %gs\n", tval);
Details
The constants that can be used for info_index are:
OPC_SIM_INFO_ELAPSED_TIME—real-world time elapsed (in seconds) since the simulation executed the first event.OPC_SIM_INFO_EXECUTED_EVENTS—number of events executed so far.OPC_SIM_INFO_OPNET_RELEASE—release string (e.g., “18.6”)OPC_SIM_INFO_OPNET_PATCH_LEVEL—patch level number (e.g., “3”)OPC_SIM_INFO_OPNET_BUILD_NUMBER—build number (e.g., “1554”)OPC_SIM_INFO_NETWORK_NAME—name of the network modelOPC_SIM_INFO_NETWORK_DIR—directory in which the network model residesOPC_SIM_INFO_OUTPUT_FILE_NAME—name of simulation output file (in the format <network name>-DES-<run#>).
Purpose
Obtains specified kernel data information during a simulation.
Errors
- None
Reference
- None