cparsimpartition.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
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
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