cparsimsynchr.h

00001 //=========================================================================
00002 //  CPARSIMSYNCHR.H - part of
00003 //
00004 //                  OMNeT++/OMNEST
00005 //           Discrete System Simulation in C++
00006 //
00007 //   Written by:  Andras Varga, 2003
00008 //
00009 //=========================================================================
00010 
00011 /*--------------------------------------------------------------*
00012   Copyright (C) 2003-2005 Andras Varga
00013   Monash University, Dept. of Electrical and Computer Systems Eng.
00014   Melbourne, Australia
00015 
00016   This file is distributed WITHOUT ANY WARRANTY. See the file
00017   `license' for details on this and other legal matters.
00018 *--------------------------------------------------------------*/
00019 
00020 #ifndef __CPARSIMSYNCHR_H__
00021 #define __CPARSIMSYNCHR_H__
00022 
00023 #include "cscheduler.h"
00024 
00025 // forward declarations
00026 class cSimulation;
00027 class cMessage;
00028 class cParsimPartition;
00029 class cParsimCommunications;
00030 
00051 class cParsimSynchronizer : public cScheduler
00052 {
00053   protected:
00054     cParsimPartition *partition;
00055     cParsimCommunications *comm;
00056 
00057   public:
00061     cParsimSynchronizer() : cScheduler()  {partition = NULL; comm = NULL;}
00062 
00066     virtual ~cParsimSynchronizer() {}
00067 
00071     virtual void setContext(cSimulation *sim, cParsimPartition *seg, cParsimCommunications *co)
00072        {setSimulation(sim); partition = seg; comm = co;}
00073 
00077     virtual void startRun() = 0;
00078 
00082     virtual void endRun() = 0;
00083 
00087     virtual cMessage *getNextEvent() =0;
00088 
00095     virtual void processOutgoingMessage(cMessage *msg, int procId, int moduleId, int gateId, void *data) = 0;
00096 };
00097 
00098 #endif
00099 

Generated on Sat Oct 21 17:48:01 2006 for OMNeT++ Parallel Simulation Support by  doxygen 1.4.6