cparsimsynchr.h

00001 //=========================================================================
00002 //  CPARSIMSYNCHR.H - part of
00003 //
00004 //                  OMNeT++/OMNEST
00005 //           Discrete System Simulation in C++
00006 //
00007 //  Author: Andras Varga, 2003
00008 //          Dept. of Electrical and Computer Systems Engineering,
00009 //          Monash University, Melbourne, Australia
00010 //
00011 //=========================================================================
00012 
00013 /*--------------------------------------------------------------*
00014   Copyright (C) 2003-2008 Andras Varga
00015   Copyright (C) 2006-2008 OpenSim Ltd.
00016 
00017   This file is distributed WITHOUT ANY WARRANTY. See the file
00018   `license' for details on this and other legal matters.
00019 *--------------------------------------------------------------*/
00020 
00021 #ifndef __CPARSIMSYNCHR_H__
00022 #define __CPARSIMSYNCHR_H__
00023 
00024 #include "cscheduler.h"
00025 #include "simtime_t.h"
00026 
00027 NAMESPACE_BEGIN
00028 
00029 // forward declarations
00030 class cSimulation;
00031 class cMessage;
00032 class cParsimPartition;
00033 class cParsimCommunications;
00034 
00055 class SIM_API cParsimSynchronizer : public cScheduler
00056 {
00057   protected:
00058     cParsimPartition *partition;
00059     cParsimCommunications *comm;
00060 
00061   public:
00065     cParsimSynchronizer() : cScheduler()  {partition = NULL; comm = NULL;}
00066 
00070     virtual ~cParsimSynchronizer() {}
00071 
00075     virtual void setContext(cSimulation *sim, cParsimPartition *seg, cParsimCommunications *co)
00076        {setSimulation(sim); partition = seg; comm = co;}
00077 
00081     virtual void startRun() = 0;
00082 
00086     virtual void endRun() = 0;
00087 
00091     virtual cMessage *getNextEvent() =0;
00092 
00099     virtual void processOutgoingMessage(cMessage *msg, int procId, int moduleId, int gateId, void *data) = 0;
00100 };
00101 
00102 NAMESPACE_END
00103 
00104 
00105 #endif
00106 
Generated on Tue Dec 2 11:16:32 2014 for OMNeT++ Parallel Simulation Support by  doxygen 1.6.3