cParsimPartition Class Reference
[Parallel simulation support]

Represents one partition in a parallel simulation. More...

#include <cparsimpartition.h>

Inheritance diagram for cParsimPartition:
cObject

List of all members.

Public Member Functions

 cParsimPartition ()
virtual ~cParsimPartition ()
void setContext (cSimulation *sim, cParsimCommunications *comm, cParsimSynchronizer *synch)
void startRun ()
void endRun ()
void shutdown ()
virtual void processOutgoingMessage (cMessage *msg, int procId, int moduleId, int gateId, void *data)
virtual void processReceivedBuffer (cCommBuffer *buffer, int tag, int sourceProcId)
virtual void processReceivedMessage (cMessage *msg, int destModuleId, int destGateId, int sourceProcId)
virtual void broadcastTerminationException (cTerminationException &e)
virtual void broadcastException (std::exception &e)

Detailed Description

Represents one partition in a parallel simulation.

Knows about partitions and the links between this partition and its neighbours.

Interconnections are stored not directly inside this object, but in cProxyGate's of cPlaceholderModule's. The remote address fields of cProxyGate's are filled out here in the connectRemoteGates() method.

This layer also handles generic (synchronization-independent part of) communication with other partitions:

This layer is communication library independent (i.e it contains no MPI, PVM, etc. calls) -- it builds on the abstraction layer provided by cParsimCommunications.


Member Function Documentation

virtual void cParsimPartition::broadcastException ( std::exception &  e  )  [virtual]

Called when an exception occurs (i.e.

the simulation is about to be stopped with an error), this methods notifies other partitions about the exception.

This methods "eats" exceptions that occur during broadcast. (We're not interested in cascading exceptions.)

virtual void cParsimPartition::broadcastTerminationException ( cTerminationException e  )  [virtual]

Called when a cTerminationException occurs (i.e.

the simulation is about to be finished normally), this methods notifies other partitions about the exception.

This methods "eats" exceptions that occur during broadcast. (We're not interested in cascading exceptions.)

virtual void cParsimPartition::processOutgoingMessage ( cMessage msg,
int  procId,
int  moduleId,
int  gateId,
void *  data 
) [virtual]

A hook called from cProxyGate::deliver() when an outgoing cMessage arrives at partition boundary.

We just pass it up to the synchronization layer (see similar method in cParsimSynchronizer).

virtual void cParsimPartition::processReceivedBuffer ( cCommBuffer buffer,
int  tag,
int  sourceProcId 
) [virtual]

Process messages coming from other partitions.

This method is called from the synchronization layer (see cParsimSynchronizer), after it has processed all tags that it understands (namely, cMessages (tag=TAG_CMESSAGE) and all tags used by the synchronization protocol).

virtual void cParsimPartition::processReceivedMessage ( cMessage msg,
int  destModuleId,
int  destGateId,
int  sourceProcId 
) [virtual]

Process cMessages received from other partitions.

This method is called from the synchronization layer (see cParsimSynchronizer) when it received a message from other partitions. This method checks that the destination module/gate still exists, sets the source module/gate to the appropriate placeholder module, and inserts the message into the FES.

void cParsimPartition::startRun (  ) 

Called at the beginning of a simulation run.

Fills in remote gate addresses of all cProxyGate's in the current partition.


The documentation for this class was generated from the following file:
Generated on Mon Jul 14 12:57:28 2014 for OMNeT++ Parallel Simulation Support by  doxygen 1.6.3