op_hla_obj_info_get()
Note: Requires High-Level Architecture functionality
Abstract
Obtains some HLA information associated with a Riverbed Modeler object.
Syntax
op_hla_obj_info_get (objid, obj_info_ptr)
| Argument | Type | Description |
|---|---|---|
objid |
Objid |
object ID of Riverbed Modeler object-of-interest |
obj_info_ptr |
Hla_Obj_Info * |
pointer to a variable to be filled with the appropriate RTI information |
Return Type
Compcode
Completion code indicating success or failure in retrieving the HLA information. The procedure returns OPC_COMPCODE_SUCCESS if the information was successfully retrieved. It returns OPC_COMPCODE_FAILURE otherwise.
Example
Hla_Obj_Info obj_info;
result = op_hla_obj_info_get (node_id, &obj_info);
if (result == OPC_COMPCODE_SUCCESS)
{
printf (" Node ID %d has just been mapped to HLA object %d\n",
node_id, obj_info.rti_id);
Details
This KP fills in the various fields of obj_info_ptr based on whether the object can be mapped to an HLA object and is actually mapped.
Hla_Obj_Info is a structure composed of three fields:
- can_be_mapped—set to OPC_TRUE if the Riverbed Modeler object can be mapped to an RTI object based on the mapping file provided to the HLA-PM, OPC_FALSE otherwise.
- is_mapped—set to OPC_TRUE if the Riverbed Modeler object is currently mapped to an RTI object, OPC_FALSE otherwise. If set to OPC_TRUE, the field rti_id has a valid value.
- rti_id—if is_mapped is set to OPC_TRUE, this field contains the ID used by the RTI to identify the RTI object mapped to the Riverbed Modeler object.
Purpose
Provides a mechanism to obtain HLA information for a Riverbed Modeler object.
Errors
- Recoverable Error: No HLA ID mapped to OPNET ID (
<objid>).
Reference
- Use the KP op_hla_id_hla_to_opnet_map() to obtain the Riverbed Modeler ID of an HLA object