op_hla_attr_update_list_get()
Note: Requires High-Level Architecture functionality
Abstract
Provides a list of the attributes last modified by external simulations.
Syntax
op_hla_attr_update_list_get (objid)
| Argument | Type | Description |
|---|---|---|
objid |
Objid |
object ID of object for which RTI attribute updates have been notified to a process model |
Return Type
List*
A list of names of updated attributes.
Example
List * attr_list;
int i;
/* Obtain list of attributes names from HLA-PM */
attr_list = op_hla_attr_update_list_get (node_id);
printf (" Node ID %d : list of updated attributes\n", node_id);
for (i = 0; i < op_prg_list_size (attr_list); i++)
{
const char * name =
(const char *)op_prg_list_access (attr_list, i);
printf (" [%d] \"%s\"\n", i, name);
}
Details
When RTI attribute updates are received by the HLA-PM, a remote interrupt is delivered to every process model that registered using op_hla_obj_notification_enable(). When handling that remote interrupt, use op_hla_attr_update_list_get() to find out what attributes were modified as a result of this RTI update.
Note: The returned list is owned by the HLA-PM and neither the list nor its elements should be deleted by the caller of op_hla_attr_update_list_get(). Furthermore, the function should be called only while processing the remote interrupt triggered by the attribute update. The list might not be valid after that interrupt has been processed. The result of calling it in other situations is unspecified.
Purpose
Provides a mechanism for discovering which attributes were modified in the latest update.
Errors
- Recoverable Error: Objid (
<objid>): No HLA mapping found.
Reference
- Use the KP op_hla_obj_notification_enable() to request notification whenever the attribute of an object is modified by other federates
- Use the KP op_hla_obj_notification_disable() to stop notification