#include <ssim.h>
Inheritance diagram for ssim::Process:
Public Methods | |
virtual void | init (void) |
action when the process is created. | |
virtual void | process_event (const Event *msg) |
virtual void | process_timeout () |
virtual void | stop (void) |
executed when the process is explicitly stopped. |
A simulated process must implement this basic interface.
|
action when the process is created. This execution step is scheduled when the process is created through Sim::create_process. This action is executed before any event or timeout. |
|
action executed in response to an event signaled to this process. Notice that the signaled event should not be used outside this method, other than by signaling it to a process through Sim::signal_event. Specifically, the Event pointer passed to this method should be considered invalid outside this method. in fact, the simulator proceeds to de-allocate every event object that is not signaled to any other process.
The implementation of this method may specify the duration of the actions associated with this response using the advance_delay method. By default, the duration of an action is 0.
|
|
action executed in response to a timeout. This method defines the actions explicitly scheduled for this process by the process itself. These actions are scheduled by calling Sim::set_timeout(Time).
The implementation of this method may specify the duration of the actions associated with this response using the advance_delay method. By default, the duration of an action is 0. |
|
executed when the process is explicitly stopped. A process is stopped by a call to Sim::stop_process(ProcessId). This method is executed immediately after the process has processed all the events or timeouts scheduled before the call to Sim::stop_process. |