cparsimpartition.h

00001 //=========================================================================
00002 //  CPARSIMPARTITION.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 __CPARSIMPARTITION_H__
00022 #define __CPARSIMPARTITION_H__
00023 
00024 #include "simkerneldefs.h"
00025 #include "cobject.h"
00026 #include "simtime_t.h"
00027 
00028 NAMESPACE_BEGIN
00029 
00030 // forward declarations:
00031 class cSimulation;
00032 class cParsimSynchronizer;
00033 class cParsimCommunications;
00034 class cCommBuffer;
00035 class cException;
00036 class cTerminationException;
00037 
00038 
00062 class SIM_API cParsimPartition : public cObject
00063 {
00064   protected:
00065     cSimulation *sim;
00066     cParsimCommunications *comm;
00067     cParsimSynchronizer *synch;
00068     bool debug;
00069 
00070   protected:
00071     // internal: fills in remote gate addresses of all cProxyGate's in the current partition
00072     void connectRemoteGates();
00073 
00074   public:
00078     cParsimPartition();
00079 
00083     virtual ~cParsimPartition();
00084 
00088     void setContext(cSimulation *sim, cParsimCommunications *comm, cParsimSynchronizer *synch);
00089 
00094     void startRun();
00095 
00099     void endRun();
00100 
00104     void shutdown();
00105 
00111     virtual void processOutgoingMessage(cMessage *msg, int procId, int moduleId, int gateId, void *data);
00112 
00119     virtual void processReceivedBuffer(cCommBuffer *buffer, int tag, int sourceProcId);
00120 
00128     virtual void processReceivedMessage(cMessage *msg, int destModuleId, int destGateId, int sourceProcId);
00129 
00138     virtual void broadcastTerminationException(cTerminationException& e);
00139 
00148     virtual void broadcastException(std::exception& e);
00149 };
00150 
00151 NAMESPACE_END
00152 
00153 
00154 #endif
00155 
Generated on Tue Dec 2 11:16:32 2014 for OMNeT++ Parallel Simulation Support by  doxygen 1.6.3