op_ima_sim_attr_get_dbl()

Abstract

Obtains the value of a double simulation attribute.

Syntax

op_ima_sim_attr_get_dbl (attr_name, value_ptr)
Argument Type Description
attr_name const char * name of the attribute-of-interest
[This value must specify an attribute defined in the simulation environment, or a prompt will be issued for the attribute’s value.]
value_ptr double * pointer to a variable to be filled with the specified attribute’s value

Return Type

Compcode

OPC_COMPCODE_SUCCESS if the attribute value was successfully obtained; OPC_COMPCODE_FAILURE otherwise.

Example

/* 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;

Details

None.

Purpose

Provides a mechanism to obtain simulation attributes that have been assigned values at simulation runtime. This KP works identically to op_ima_sim_attr_get(), but applies only to simulation attributes of data type double. Refer to op_ima_sim_attr_get() for full purpose and details.

Errors

Reference

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