Microsimulation API
|
cProcess class for OMNET++ API compatibility. This provides a default for Process::process_event() that calls cProcess::handleMessage(). This class also provides scheduleAt() methods for insert cMessages into the process event queue. More...
#include <microsimulation.h>
Public Member Functions | |
cProcess (Time startTime=Time(0.0)) | |
virtual void | handleMessage (const cMessage *msg)=0 |
virtual void | process_event (const ssim::Event *e) |
action executed in response to an event signaled to this process. More... | |
virtual void | scheduleAt (Time t, cMessage *msg) |
virtual void | scheduleAt (Time t, string s) |
virtual void | scheduleAt (Time t, short k) |
virtual void | init ()=0 |
void | initialize () |
action executed when the process is initialized. More... | |
![]() | |
virtual | ~Process () |
virtual void | stop (void) |
executed when the process is explicitly stopped. More... | |
Public Attributes | |
Time | startTime |
Time | previousEventTime |
cProcess class for OMNET++ API compatibility. This provides a default for Process::process_event() that calls cProcess::handleMessage(). This class also provides scheduleAt() methods for insert cMessages into the process event queue.
Definition at line 236 of file microsimulation.h.
Definition at line 238 of file microsimulation.h.
Implemented in illnessDeath::SimplePerson.
|
pure virtual |
Implemented in illnessDeath::SimplePerson.
|
inlinevirtual |
action executed when the process is initialized.
This method is not a constructor. It is rather an initialization step that is executed during the simulation when the process is created within the simulation through Sim::create_process. This initialization is guaranteed to be executed before any event is signaled to the process. BREAKING CHANGE: this method was called init().
Reimplemented from ssim::Process.
Definition at line 262 of file microsimulation.h.
|
inlinevirtual |
action executed in response to an event signaled to this process.
The Event object signaled through this method should not be used outside this method, other than by signaling it to other processes through Sim::signal_event(). In fact, the Event pointer passed to this method should be considered invalid outside this method, as 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.
The implementation of this method may use the C++ dynamic_cast feature to select an action on the basis of the actual type of the Event object. Here's an example that illustrates this feature:
Reimplemented from ssim::Process.
Definition at line 240 of file microsimulation.h.
Definition at line 250 of file microsimulation.h.
Definition at line 258 of file microsimulation.h.
Definition at line 255 of file microsimulation.h.
Time ssim::cProcess::previousEventTime |
Definition at line 263 of file microsimulation.h.
Time ssim::cProcess::startTime |
Definition at line 263 of file microsimulation.h.