OMNeT++ Parallel Simulation Support  6.0.3
cParsimSynchronizer Class Referenceabstract

#include <cparsimsynchr.h>

Description

Abstract base class for parallel simulation algorithms. Subclasses implement the "null message algorithm" and others.

Task of this layer is to implement conservative synchronization, that is, block the execution at time points where it is not safe to proceed since events from other partitions will (may) arrive before the next local event.

Synchronizer integrates into the simulation kernel via the takeNextEvent() and processOutgoingMessage() functions:

Inheritance diagram for cParsimSynchronizer:
cScheduler cObject cISimulationLifecycleListener cParsimProtocolBase cIdealSimulationProtocol cNoSynchronization cNullMessageProtocol cISPEventLogger

Public Member Functions

 cParsimSynchronizer ()
 
virtual ~cParsimSynchronizer ()
 
virtual std::string str () const override
 
virtual void setContext (cSimulation *sim, cParsimPartition *seg, cParsimCommunications *co)
 
virtual void startRun () override=0
 
virtual void endRun () override=0
 
virtual cEventguessNextEvent () override
 
virtual cEventtakeNextEvent () override=0
 
virtual void processOutgoingMessage (cMessage *msg, const SendOptions &options, int procId, int moduleId, int gateId, void *data)=0
 

Constructor & Destructor Documentation

◆ cParsimSynchronizer()

cParsimSynchronizer ( )
inline

Constructor.

◆ ~cParsimSynchronizer()

virtual ~cParsimSynchronizer ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ str()

virtual std::string str ( ) const
overridevirtual

Return "parsim scheduler" as description.

Reimplemented from cScheduler.

◆ setContext()

virtual void setContext ( cSimulation sim,
cParsimPartition seg,
cParsimCommunications co 
)
inlinevirtual

Pass cParsimSynchronizer the objects it has to cooperate with.

Reimplemented in cNullMessageProtocol.

◆ startRun()

virtual void startRun ( )
overridepure virtual

Called at the beginning of a simulation run.

Reimplemented from cScheduler.

Implemented in cNullMessageProtocol, cIdealSimulationProtocol, cISPEventLogger, and cNoSynchronization.

◆ endRun()

virtual void endRun ( )
overridepure virtual

Called at the end of a simulation run.

Reimplemented from cScheduler.

Implemented in cNullMessageProtocol, cIdealSimulationProtocol, cISPEventLogger, and cNoSynchronization.

◆ guessNextEvent()

virtual cEvent* guessNextEvent ( )
overridevirtual

Returns the first event in the Future Event Set.

Implements cScheduler.

◆ takeNextEvent()

virtual cEvent* takeNextEvent ( )
overridepure virtual

Scheduler function – it comes from cScheduler interface.

Implements cScheduler.

Implemented in cNullMessageProtocol, cIdealSimulationProtocol, cISPEventLogger, and cNoSynchronization.

◆ processOutgoingMessage()

virtual void processOutgoingMessage ( cMessage msg,
const SendOptions options,
int  procId,
int  moduleId,
int  gateId,
void *  data 
)
pure virtual

Hook, called when a cMessage is sent out of the partition. It is provided here so that the synchronizer can potentially perform optimizations, such as piggybacking null messages (see null message algorithm) on outgoing messages.

Implemented in cNullMessageProtocol, cISPEventLogger, and cParsimProtocolBase.


The documentation for this class was generated from the following file: