op_ima_sim_attr_get_dbl()

摘要

获取 double 类型仿真属性的值。

语法

op_ima_sim_attr_get_dbl (attr_name, value_ptr)
参数 类型 说明
attr_name const char * 目标属性的名称
[该值必须指定仿真环境中已定义的属性,否则会弹出针对该属性值的输入提示。]
value_ptr double * 指向某个变量的指针,该变量将被填入指定属性的值

返回类型

Compcode

若成功获取属性值,返回 OPC_COMPCODE_SUCCESS;否则返回 OPC_COMPCODE_FAILURE。

示例

/* Obtain the station latency for tokens and frames. */
op_ima_sim_attr_get_dbl ("station_latency", &Fddi_St_Latency);
/* Obtain the propagation delay separating stations. */
/* This value is given in seconds. */
op_ima_sim_attr_get_dbl ("prop_delay", &Fddi_Prop_Delay);
/* Derive the Delay for a ’hop’ of a freely circulating packet. */
Fddi_Tk_Hop_Delay = Fddi_Prop_Delay + Fddi_St_Latency;

详情

无。

用途

提供一种机制,用于获取在仿真运行时已被赋值的仿真属性。该内核过程与 op_ima_sim_attr_get() 的工作方式完全相同,但仅适用于数据类型为 double 的仿真属性。完整用途与详情参见 op_ima_sim_attr_get()。

错误

参考

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