Manual Terminology
This manual incorporates special terminology for discussing the relationships of KPs and the environment in which they operate. The terminology is not completely unique to this manual, but it is a slight variation on the general set of terminology used in the complete documentation set. Several terms are defined below.
Contexts
There are four contexts in which users can define procedural logic that is integrated into a simulation. These contexts are fundamentally different in terms of the resources available to the C/C++ statements that form the procedural logic. The interface between user-specified C/C++ statements and simulation resources is provided primarily by Simulation Kernel procedures (KPs), and the four different contexts each present a different set of limitations on which KPs can be invoked. Many KPs are usable in all four contexts; exceptions are noted in the KP documentation within this manual. The four contexts are listed below:
- A process running on a processor module. In this context, a process has access to input streams, output streams, input statistics, output statistics, state variables, temporary variables, header block definitions, incoming interrupts, ICIs, and packets. In addition to C/C++ statements that are embedded within the associated process model, this context includes C/C++ functions that are directly or indirectly invoked by a statement in the process model.
- A process running on a queue module. In this context, a process has access to all of the resources listed above for the processor context, in addition to the resources unique to a queue. These resources include an internal bank of subqueues and access to the Q and Subq package KPs.
- A Transceiver Pipeline model (that is, a C/C++ function that serves as a stage in a link model pipeline). Many KPs cannot be used within this context, because they rely on the resources available to a process. The majority of KPs used by pipeline models are from the Td package, which provides access to transmission data attributes stored within packets.
- A C/C++ function that was scheduled for execution via the KP
op_intrpt_schedule_call(). For the most part, this context provides the same resources as the context from which it was scheduled. That is, if a process schedules a call to a procedure, the procedure will essentially be able to perform the same set of tasks as the process itself. Depending upon where the code for this procedure is defined, however, it might not have access to the state variables of the process.
Invoking Process
As mentioned above, a KP can be invoked from one of four different execution contexts. However, the vast majority of invocations of KPs are from the first two contexts (i.e., from processes running on processors or queues). In the documentation pages for KPs, the process that invoked the KP under discussion is called the invoking process. The invoking process is also sometimes called the current process.
Surrounding Module / Node / Subnet
In the documentation pages for KPs, the module on which the invoking process is running is called the surrounding module (i.e., the processor or queue conceptually surrounds the process model and the local resources it manipulates). Similarly, an object that is the parent of another object conceptually surrounds the child it contains. Thus the surrounding node and surrounding subnet are the parent (and “grandparent”) objects of the invoking process’ surrounding module. The term current module is also sometimes used to mean surrounding module.