op_hla_obj_attr_enqueue()

Note: Requires High-Level Architecture functionality

Abstract

Informs the HLA-PM of a change in an attribute in a specified object.

Syntax

op_hla_obj_attr_enqueue (objid, attr_name)
Argument Type Description
objid Objid object ID of the object-of-interest
attr_name const char * name of the attribute-of-interest

Return Type

Compcode

Completion code indicating success or failure in queuing the request. The procedure returns OPC_COMPCODE_SUCCESS if the request was queued for later processing by the HLA-PM. It returns OPC_COMPCODE_FAILURE otherwise.

Example

op_ima_obj_attr_get (my_id, "Update Request", &value);
if (value != request_value)
	{
	int num_units;
. . .
	op_ima_obj_attr_get (row_id, "Number Units", &num_units);
	op_ima_obj_attr_set (row_id, "Number Units", ++num_units);
	op_hla_obj_attr_enqueue (node_id, "Number Units");

Details

This KP informs the HLA-PM of a change to attr_name so that, if the attribute is mapped to a published HLA attribute, an appropriate RTI attribute update event is generated after all the events at the current simulation time have been processed. All changes for a given object are sent using a single RTI attribute update.

Purpose

Provides a mechanism to have the HLA-PM immediately register an attribute change for eventual generation of appropriate RTI attribute updates.

Errors

  • Recoverable Error: Objid (<objid>): Unable to queue request of outgoing update for attribute (<attr_name>). (due to memory allocation failure)

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