Esa_Current_Event_Time_Set()

Abstract

Sets the simulation time to the specified value.

Syntax

Esa_Current_Event_Time_Set (esa_state_ptr, time)
Argument Type Description
esa_state_ptr EsaT_State_Handle ESA state information generated by Esa_Init()
time double time value to use for the new simulation time. The value must be between the current time and the time of the next scheduled event.

Return Type

EsaT_Compcode

EsaC_Comp_Success if a time value could be set; EsaC_Comp_Failure otherwise.

esa.h

Details

This function provides a mechanism to advance the simulation’s view of time. Simulation time normally advances based on the scheduled events. Thus, after events at a given time T1 are all executed, the time jumps ahead to time T2 (when the next event is scheduled). In the context of a cosimulation, however, it is possible for other things to occur between times T1 and T2.

At times, it might be necessary to invoke some application code in the gap between times T1 and T2 (for example, as a result of setting an interface value with an execution option of ESAC_NOTIFY_IMMEDIATELY). At such times, use this function to set the current simulation time to an appropriate value between T1 and T2 such that a call to op_sim_time() will return a meaningful value.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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