Ets_Obj_Attr_Set_From_Obj_Attr()

Abstract

Sets the specified attribute of an object to the current value of another object's attribute (or possibly another attribute of the same object).

Syntax

Ets_Obj_Attr_Set_From_Obj_Attr (obj_hndl, attr_name, src_obj_hndl, src_attr_name)
Argument Type Description
obj_hndl EtsT_Obj_Handle Handle for the destination object whose attribute will be set.
attr_name const char * The attribute name for the destination object.
src_obj_hndl EtsT_Obj_Handle Handle for the source object that provides a value of its attribute to the destination object.
src_attr_name const char * The attribute name of the source object.

Return Type

EtsT_Compcode

EtsC_Compcode_Success if the operation was successful; EtsC_Compcode_Failure otherwise.

ets_api_obj.h

Details

This function sets the specified attribute of an object to the current value of another object's attribute (or possibly another attribute of the same object).

The object need not be installed in a model. The attribute to be set is symbolic (otherwise, EtsC_Compcode_Failure will be returned). If the source attribute is symbolic, then this function will attempt to apply that symbol to the new attribute, but if that fails it will consider the true value of the source attribute. If the source attribute is compound, this function will recursively try to apply all of the attributes of the subobjects; however, this attempt will be done loosely and will be tolerant of any failures at the lower levels. Other conversions currently supported are:

  • presentable value (int, double, bool, symbol) –> string
  • int –> double
  • double –> int

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