Ema_Object_Attr_Nth()

Abstract

Obtains the attribute name of the "nth" attribute of the specified object.

Syntax

Ema_Object_Attr_Nth (model_id, object_id, index, attr_name)
Argument Type Description
model_id EmaT_Model_Id numeric model ID of the model containing the object of interest
object_id EmaT_Object_Id numeric object ID of the object of interest
index int numeric index of the attribute of interest
attr_name char* character buffer that receives the name of the specified attribute; this buffer may then be used in a call to Ema_Object_Attr_Get()

Return Type

VosT_Fun_Status

The status of the operation (VOSC_SUCCESS or VOSC_FAILURE)

ema.h

Details

This function is useful as the method of obtaining the name of each attribute within loops that process all attributes of a specified object.

The model ID is a numeric identifier that references a model. It can be obtained from the functions Ema_Model_Create(), Ema_Model_Copy(), or Ema_Model_Read().

The object ID is a numeric identifier that references an object. It can be obtained from the functions Ema_Object_Create(), Ema_Object_Copy(), Ema_Object_Move(), Ema_Object_Move_Recursively(), or Ema_Object_Nth().

You should ensure that the buffer referenced by attr_name* is large enough to hold the attribute name; otherwise the resulting application may abort with a segmentation violation.

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