Ovis_Entity_Create()

摘要

创建一个 Ovis 实体。

语法

Ovis_Entity_Create (hname, callback, state_ptr)
参数 类型 说明
hname const char * 与实体关联的站点层次名称
callback OvisT_Entity_State_Destroy_Proc 在实体被销毁时销毁该实体状态的回调函数
state_ptr void * 可选的用户提供的状态

返回类型

OvisT_Entity *

返回该实体;若函数未能返回实体则返回 OVISC_NIL。

头文件

ovis_entity.h

详情

该函数创建 Ovis 实体。

示例

OvisT_Entity       * ent_ptr;
OvisT_DIS_Type     dis [] { 1, 2, 225, 20, 2, 10, -1 };

ent_ptr = Ovis_Entity_Create ("top.subnet.chopper", OPC_NIL, OPC_NIL);
Ovis_Entity_Animation_Set (ent_ptr, OPC_NIL,
   OvisC_Aggregation_Entity, dis, OvisC_DIS_Force_Friendly,
   OvisC_DIS_DR_Static);
Ovis_Entity_Animation_Enable (ent_ptr);

错误

  • 提供的层次名称参数无效。

参考

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