How can I directly invoke the child process of another process?

Categories:
Solution Number:
S20800
Last Modified:
2013-08-20
Issue

How can I directly invoke the child process of another process?

Solution

A process can invoke (wake up) any other process in the same module (parent, child, sibling, etc.) using the function op_pro_invoke (). If you need process 'proc_a' in module 'mod_a' to invoke a process 'proc_b' in module 'mod_b', then here are two options:1) Call the Kernel Procedure (KP) op_intrpt_schedule_process () with the process handle of proc_b.2) Call the KP op_intrpt_schedule_remote () or op_intrpt_force_remote ()for module mod_b, with an interrupt code. This will invoke the root process of mod_b. The root process can then invoke the correct child based on the interrupt code.Alternatively, the root process can arrange for a certain kind of interrupt to be steered automatically to a child process using op_intrpt_type_register (), or op_intrpt_port_register ()---this is usually done at the beginning of the simulation, at simulation time zero.The KP op_pro_invoke () is similar to a function call. The control is transferred to the invoked process immediately, and comes back to the calling process when the called process hits an unforced (red) state. The KP op_intrpt_force_remote is similar to op_pro_invoke ().The KPs op_intrpt_schedule_process () and op_intrpt_schedule_remote () will create events in the event queue for the specified time. Even if the time specified is the current time, an event is scheduled. This event will occur only after all other events in the queue for the specified time and priority (including the current event) are completed.For more information on using and invoking dynamic processes, see the following resources:- OPNETWORK2003 session #1501: Process Modeling Methodology. In previous OPNETWORK conferences, this material was covered in session #1504: Dynamic Processes.- Product Documentation, vol. Modeling Concepts Reference Manual, ch. Process Domain

Environment

DES Kernel->Process Modeling/Coding

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case