op_hla_interaction_pk_register()

Note: Requires High-Level Architecture functionality

Abstract

Requests delivery of packets representing an interaction type to a specified object using a stream interrupt.

Syntax

op_hla_interaction_pk_register (objid, pk_format_name, stream_index)
Argument Type Description
objid Objid object ID of module where packets representing an interaction type should be delivered
pk_format_name const char * Packet format specifying which interaction type should be delivered
stream_index int Stream index where the packet is delivered (via a stream interrupt)

Return Type

Compcode

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

Example

#define REQUEST_STRM 0
#define LEAVE_STRM 1

my_id = op_id_self ();

/* Register with the HLA-PM our desire to receive */
/* two interaction packets, using two distinct streams   */	op_hla_interaction_pk_register (my_id,"Send_Info", REQUEST_STRM);
op_hla_interaction_pk_register (my_id,"Stop_Listening", LEAVE_STRM);

Details

When the HLA-PM receives an interaction, it converts the interaction to an appropriate packet format and delivers a copy of that packet to each module that was registered for the packet format. Each packet is delivered using a stream interrupt via the stream index specified in the KP.

Purpose

Provides a mechanism to have the HLA-PM deliver a packet representing an interaction type to a module, using a stream interrupt.

Errors

  • Recoverable Error: Objid (<objid>): Unable to queue registration for interaction (<packet_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