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 model
  • OPC_SIM_INFO_NETWORK_DIR—directory in which the network model resides
  • OPC_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

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com