cparsimpartition.h

00001 //=========================================================================
00002 //  CPARSIMPARTITION.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 
00021 #ifndef __CPARSIMPARTITION_H__
00022 #define __CPARSIMPARTITION_H__
00023 
00024 #include "defs.h"
00025 #include "cpolymorphic.h"
00026 
00027 // forward declarations:
00028 class cSimulation;
00029 class cParsimSynchronizer;
00030 class cParsimCommunications;
00031 class cCommBuffer;
00032 
00033 
00057 class cParsimPartition : public cPolymorphic
00058 {
00059   protected:
00060     cSimulation *sim;
00061     cParsimCommunications *comm;
00062     cParsimSynchronizer *synch;
00063     bool debug;
00064 
00065   protected:
00066     // internal: fills in remote gate addresses of all cProxyGate's in the current partition
00067     void connectRemoteGates();
00068 
00069   public:
00073     cParsimPartition();
00074 
00078     virtual ~cParsimPartition();
00079 
00083     void setContext(cSimulation *sim, cParsimCommunications *comm, cParsimSynchronizer *synch);
00084 
00089     void startRun();
00090 
00094     void endRun();
00095 
00099     void shutdown();
00100 
00106     virtual void processOutgoingMessage(cMessage *msg, int procId, int moduleId, int gateId, void *data);
00107 
00114     virtual void processReceivedBuffer(cCommBuffer *buffer, int tag, int sourceProcId);
00115 
00123     virtual void processReceivedMessage(cMessage *msg, int destModuleId, int destGateId, int sourceProcId);
00124 
00133     virtual void broadcastTerminationException(cTerminationException *e);
00134 
00143     virtual void broadcastException(cException *e);
00144 };
00145 
00146 #endif
00147 

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