EtsT_Pj_Simulation_Update_Callback
**注意:**需要 OPNET Development Kit
摘要
回调:每当生成仿真状态更新消息时被调用。
语法
<simulation_update_callback_name> (client_state_ptr, message_type, message_tlptr, elapsed_time, remaining_time)
| 参数 | 类型 | 说明 |
|---|---|---|
client_state_ptr |
void * |
注册回调时客户端指定的状态信息。 |
message_type |
EtsT_Pj_Simulation_Message_Type |
更新消息的原因;为表 36 Project Package Symbolic Constants 中给出的仿真消息类型之一。 |
message_tlptr |
PrgT_List * |
包含 op_runsim 生成的更新消息的文本列表;当 message_type 为 EtsC_Pj_Simulation_Message_Update 时为 PRGC_NIL。 |
elapsed_time |
double |
已经过的仿真时间(当 message_type 为 EtsC_Pj_Simulation_Message_Update 时;其他所有消息类型均为 0.0)。 |
remaining_time |
double |
仿真完成前的剩余时间(当 message_type 为 EtsC_Pj_Simulation_Message_Update 时;其他所有消息类型均为 0.0)。 |
返回类型
void
无返回值。
头文件
ets_api_pj.h
详情
此回调可访问 op_runsim 生成的仿真更新消息。当特定仿真事件发生时(例如仿真暂停或完成时),可用它执行所需的处理。