op_hla_attr_info_get()

Note: Requires High-Level Architecture functionality

Abstract

Obtains RTI-related information associated with the attribute of an object.

Syntax

op_hla_attr_info_get (objid, attr_name, attr_info_ptr)
Argument Type Description
objid Objid object ID of object-of-interest
attr_name const char * name of the attribute of the object-of-interest
attr_info_ptr Hla_Attr_Info * pointer to a structure that will be filled if the execution if successful

Return Type

Compcode

Completion code indicating success or failure in retrieving the data. The procedure returns OPC_COMPCODE_SUCCESS if the attribute information could be gathered. It returns OPC_COMPCODE_FAILURE otherwise.

Example

static void check_attr_info (Objid obj_id, const char * attr_name)
	{
	Hla_Attr_Info    attr_info;
	Compcode         result;

	result = op_hla_attr_info_get (obj_id, attr_name, &attr_info)
	}

Details

When a Riverbed Modeler object is mapped to a discovered RTI object, a subset of the Riverbed Modeler attributes is mapped to corresponding RTI attributes, based on the mapping file provided to the HLA-PM. Each attribute can be published (in which case changes in the Riverbed Modeler federate will be sent out to other federates) or subscribed to (in which case changes made by other federates will be received by the HLA-PM and applied to the Riverbed Modeler attributes).

Use this KP to determine if an attribute of a Riverbed Modeler object is currently mapped to some RTI attribute.

Hla_Attr_Info is a structure composed of three fields:

  • is_published—set to OPC_TRUE if the attribute is published, OPC_FALSE otherwise.
  • is_subscribed—set to OPC_TRUE if the attribute is subscribed to, OPC_FALSE otherwise
  • rti_id—if the attribute is either published or subscribed to, then this field contains the ID used by the RTI to identify the attribute-of-interest. If the attribute is neither published not subscribed, this field is left undefined.

Purpose

Provides a way to get the RTI-related information associated with the attribute of an object.

Errors

  • Recoverable Error: Objid (<objid>): Unable to obtain information for attribute (“<attr_name>”).
  • Recoverable Error: Objid (<objid>): Error parsing attribute name (“<attr_name>”).

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