Esa_Interface_Callback_Register()

Abstract

Registers a callback to be invoked when model code assigns a value to the specified interface.

Syntax

Esa_Interface_Callback_Register (esa_state_ptr, status_ptr, interface, proc, array_proc, state_ptr)
Argument Type Description
esa_state_ptr EsaT_State_Handle ESA state information generated by Esa_Init().
status_ptr int * status value indicating cause of error (when return value is EsaC_Comp_Failure); one of the values in Table 2 External Simulation Access Package Symbolic Constants.
interface EsaT_Interface interface of interest
proc EsaT_Interface_Callback_Proc function invoked when the specified interface is assigned to using the non-array form.
array_proc EsaT_Interface_Array_Callback_Proc function invoked when the specified interface is assigned to as part of an array.
state_ptr void * client data passed to the proc and array_proc functions when they are invoked.

Return Type

EsaT_Compcode

EsaC_Comp_Success if registration successful; EsaC_Comp_Failure otherwise.

esa.h

Details

Model code sets interface values using op_esys_interface_value_set(), op_esys_interface_array_set(), or op_esys_interface_vector_set(). If callbacks have been registered with the interface in question, one will be invoked as soon as the value is set using one of these KPs, enabling external code to immediately process the information. If no callbacks are registered, the interface value must be polled by the cosimulation code after Esa_Execute_Until() returns.

There are two possible callbacks:

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