op_hla_interaction_pk_deregister()
Note: Requires High-Level Architecture functionality
Abstract
Cancels the delivery of appropriate packets to an object whenever an appropriate RTI interaction is received.
Syntax
op_hla_interaction_pk_deregister (objid, pk_format_name)
| Argument | Type | Description |
|---|---|---|
objid |
Objid |
object ID of module where interactions should no longer be delivered |
pk_format_name |
const char * |
name of packet format used to deliver interaction |
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
static void deregister (void)
{
/* After receiving an interaction packet requesting the process to stop */
/* listening for incoming interaction packets, deregister with the */
/* HLA interface. */
op_sim_message (“Received order to stop listening”, “Deregistering for
interaction packets”);
op_hla_interaction_pk_deregister (my_id, “Send_Info”);
op_hla_interaction_pk_deregister (my_id, “Stop_Listening”);
}
Details
When an RTI interaction is received, it is converted to a matching packet format, and a copy of that packet is delivered to each process model that was registered with op_hla_interaction_pk_register(). Using this KP stops the delivery of a given packet type to a specific object.
Purpose
Provides a mechanism to cancel delivery of RTI interactions to a module.
Errors
- Recoverable Error: Objid (
<objid>): Unable to queue deregistration for interaction (<packet_name>). (due to memory allocation failure)
Reference
- Use the KP op_hla_interaction_pk_register() to be notified of incoming interactions
- Use the KP op_hla_interaction_pk_struct_get() to extract blocks of data from an incoming interactions