Microsimulation API
|
cProcess class for OMNET++ API compatibility. More...
#include <microsimulation.h>
Public Member Functions | |
cProcess (Time startTime=Time(0.0)) | |
virtual void | handleMessage (const cMessage *msg)=0 |
Abstract method to handle each message. More... | |
virtual void | init ()=0 |
Abstract method to initialise a given process. More... | |
virtual void | scheduleAt (Time t, cMessage *msg) |
schedules at time t a message msg to the current process. Adds the sendingTime, process_id and sender_process_id to the message. More... | |
virtual void | scheduleAt (Time t, string name) |
schedules at time t a message msg with a specific name to the current process. More... | |
virtual void | scheduleAt (Time t, short k) |
schedules at time t a message msg with a specific kind to the current process. More... | |
virtual void | send (ProcessId process_id, Time t, cMessage *msg) |
send to a given process at time t a message msg. Adds the sendingTime, process_id and sender_process_id to the message. More... | |
virtual void | send (ProcessId process_id, Time t, string name) |
sends to a given process at time t a message msg with a specific name. More... | |
virtual void | send (ProcessId process_id, Time t, short kind) |
sends to a given process at time t a message msg with a specific kind. More... | |
void | cancel (std::function< bool(const cMessage *msg)> pred) |
Given a predicate, remove the messages for this process. More... | |
void | cancel_kind (short kind) |
Given a kind, remove the messages for this process. More... | |
void | cancel_name (string name) |
Given a name, remove the messages for this process. More... | |
void | cancel_events () |
Remove all of the messages for this process. More... | |
double | previous () |
Returns the value of the previous event time for this process. More... | |
void | initialize () |
Implements the method required by ssim::ProcessWithPId. Calls init() and sets the previousEventTime to the startTime. More... | |
virtual void | process_event (const ssim::Event *e) |
Implements the method required by ssim::ProcessWithPId This requires that the event* can be cast to a cMessage*. This calls the handleMessage(const cMessage*) method and updates previousEventTime. More... | |
![]() | |
ProcessId | activate () throw () |
activates this process within the simulator. More... | |
ProcessId | pid () const throw () |
process id of this process. More... | |
ProcessWithPId () throw () | |
![]() | |
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 implementations for the ProcessWithPId including:
The user can also implement a stop() method which is called at the end of a process. The scheduleAt() and send() methods insert cMessages into the current and other process event queues, respectively. Messages for this process can be cancelled using cancel(), cancel_kind(), cancel_name() and cancel_events(). The previous event time for this process can be found using previous().
Definition at line 314 of file microsimulation.h.
Definition at line 317 of file microsimulation.h.
Given a predicate, remove the messages for this process.
Definition at line 375 of file microsimulation.h.
|
inline |
Remove all of the messages for this process.
Definition at line 402 of file microsimulation.h.
|
inline |
Given a kind, remove the messages for this process.
Definition at line 384 of file microsimulation.h.
|
inline |
Given a name, remove the messages for this process.
Definition at line 393 of file microsimulation.h.
Abstract method to handle each message.
Implemented in illnessDeath::SimplePerson.
|
pure virtual |
Abstract method to initialise a given process.
Implemented in illnessDeath::SimplePerson.
|
inlinevirtual |
Implements the method required by ssim::ProcessWithPId. Calls init() and sets the previousEventTime to the startTime.
Reimplemented from ssim::Process.
Definition at line 417 of file microsimulation.h.
|
inline |
Returns the value of the previous event time for this process.
Definition at line 410 of file microsimulation.h.
|
inlinevirtual |
Implements the method required by ssim::ProcessWithPId This requires that the event* can be cast to a cMessage*. This calls the handleMessage(const cMessage*) method and updates previousEventTime.
Reimplemented from ssim::Process.
Definition at line 424 of file microsimulation.h.
schedules at time t a message msg to the current process. Adds the sendingTime, process_id and sender_process_id to the message.
Definition at line 331 of file microsimulation.h.
schedules at time t a message msg with a specific kind to the current process.
Definition at line 346 of file microsimulation.h.
schedules at time t a message msg with a specific name to the current process.
Definition at line 340 of file microsimulation.h.
send to a given process at time t a message msg. Adds the sendingTime, process_id and sender_process_id to the message.
Definition at line 353 of file microsimulation.h.
sends to a given process at time t a message msg with a specific kind.
Definition at line 369 of file microsimulation.h.
sends to a given process at time t a message msg with a specific name.
Definition at line 363 of file microsimulation.h.
Time ssim::cProcess::previousEventTime |
Definition at line 316 of file microsimulation.h.
Time ssim::cProcess::startTime |
Definition at line 316 of file microsimulation.h.