Esa_Execute_Until()

Abstract

Enables a simulation to process some events.

Syntax

Esa_Execute_Until (esa_state_ptr, status_ptr, until, execute_flags, time_reached_ptr, num_events_ptr)
Argument Type Description
esa_state_ptr EsaT_State_Handle ESA state information generated by Esa_Init()
status_ptr int * area to be filled with an appropriate status value (see Details)
until double simulation time limit for the invocation, or ESAC_TIME_MAX to run to completion
execute_flags int a combination of
- ESAC_UNTIL_EXCLUSIVE—execute until simulation time reaches the until value, but return before executing events at that time.
- ESAC_UNTIL_INCLUSIVE—execute until simulation time reaches the until value, including events scheduled for that time.
- ESAC_UNTIL_ONE_EVENT—execute at most one event.
time_reached_ptr double * simulation time after this function returns
num_events_ptr int * number of events executed

Return Type

EsaT_Compcode

EsaC_Comp_Success if the simulation executed as specified; EsaC_Comp_Failure otherwise.

esa.h

Details

This function enables the cosimulation to let the Riverbed Modeler simulation process a set of scheduled events before control is returned to the cosimulation code.

In a cosimulation, the Riverbed Modeler simulation is executed in pieces (a few events at a time). This function enables the cosimulation to control the size of these pieces.

When this function is invoked, the Riverbed Modeler simulation executes until one of the following conditions occurs (with a corresponding value set to *status_ptr):

  • execute_flags is ESAC_UNTIL_EXCLUSIVE and the simulation time is greater than or equal to until [*status_ptr set to ESAC_STATUS_DURATION]
  • execute_flags is ESAC_UNTIL_INCLUSIVE and either the simulation time is greater than until or the time is equal to until and no more events are scheduled for that time [*status_ptr set to ESAC_STATUS_DURATION]
  • execute_flags is ESAC_UNTIL_EXCLUSIVE | ESAC_UNTIL_ONE_EVENT and either one event was executed or the simulation time is greater than or equal to until [*status_ptr set to ESAC_STATUS_DURATION]
  • execute_flags is ESAC_UNTIL_INCLUSIVE | ESAC_UNTIL_ONE_EVENT and either one event was executed or the simulation time is greater than until [*status_ptr set to ESAC_STATUS_DURATION]
  • No more events are scheduled [*status_ptr set to ESAC_STATUS_DURATION]
  • The simulation terminated (by exceeding the simulation duration, executing op_sim_end(), or encountering an abortive error) [*status_ptr set to ESAC_STATUS_TERMINATION]
  • Esa_Interrupt() was invoked by an interface callback (in which case the function will return after completion of the event during which Esa_Interrupt() was called) [*status_ptr set to ESAC_STATUS_EXTERNAL]
  • Esa_Interrupt() was invoked during the execution of Riverbed analysis software events [*status_ptr set to ESAC_STATUS_INTERRUPTED]
  • The ESA package was not loaded via Esa_Load() [*status_ptr set to ESAC_STATUS_PACKAGE_CLOSED]

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