OMNeT++ Parallel Simulation Support
6.0.3
cparsimpartition.h
1
//=========================================================================
2
// CPARSIMPARTITION.H - part of
3
//
4
// OMNeT++/OMNEST
5
// Discrete System Simulation in C++
6
//
7
//=========================================================================
8
9
/*--------------------------------------------------------------*
10
Copyright (C) 1992-2017 Andras Varga
11
Copyright (C) 2006-2017 OpenSim Ltd.
12
13
This file is distributed WITHOUT ANY WARRANTY. See the file
14
`license' for details on this and other legal matters.
15
*--------------------------------------------------------------*/
16
17
#ifndef __OMNETPP_CPARSIMPARTITION_H
18
#define __OMNETPP_CPARSIMPARTITION_H
19
20
#include "omnetpp/simkerneldefs.h"
21
#include "omnetpp/cobject.h"
22
#include "omnetpp/simtime_t.h"
23
#include "omnetpp/clifecyclelistener.h"
24
25
namespace
omnetpp {
26
27
class
cSimulation;
28
class
cParsimSynchronizer;
29
class
cParsimCommunications;
30
class
cCommBuffer;
31
class
cException;
32
class
cTerminationException;
33
struct
SendOptions;
34
58
class
SIM_API
cParsimPartition
:
public
cObject
,
public
cISimulationLifecycleListener
59
{
60
protected
:
61
cSimulation
*sim =
nullptr
;
62
cParsimCommunications
*comm =
nullptr
;
63
cParsimSynchronizer
*synch =
nullptr
;
64
bool
debug;
65
66
protected
:
67
// internal: fills in remote gate addresses of all cProxyGate's in the current partition
68
void
connectRemoteGates();
69
74
virtual
void
lifecycleEvent(
SimulationLifecycleEventType
eventType,
cObject
*details)
override
;
75
76
public
:
80
cParsimPartition
();
81
85
virtual
~cParsimPartition
() {}
86
90
void
setContext(
cSimulation
*sim,
cParsimCommunications
*comm,
cParsimSynchronizer
*synch);
91
96
void
startRun();
97
101
void
endRun();
102
106
void
shutdown();
107
113
virtual
void
processOutgoingMessage(
cMessage
*msg,
const
SendOptions
& options,
int
procId,
int
moduleId,
int
gateId,
void
*data);
114
121
virtual
void
processReceivedBuffer(
cCommBuffer
*buffer,
int
tag,
int
sourceProcId);
122
130
virtual
void
processReceivedMessage(
cMessage
*msg,
const
SendOptions
& options,
int
destModuleId,
int
destGateId,
int
sourceProcId);
131
140
virtual
void
broadcastTerminationException(
cTerminationException
& e);
141
150
virtual
void
broadcastException(std::exception& e);
151
};
152
153
}
// namespace omnetpp
154
155
156
#endif
157
omnetpp::cObject
omnetpp::cSimulation
omnetpp::cParsimPartition::~cParsimPartition
virtual ~cParsimPartition()
Definition:
cparsimpartition.h:85
SimulationLifecycleEventType
SimulationLifecycleEventType
omnetpp::cParsimCommunications
omnetpp::cTerminationException
omnetpp::SendOptions
omnetpp::cParsimPartition
Represents one partition in a parallel simulation. Knows about partitions and the links between this ...
Definition:
cparsimpartition.h:58
omnetpp::cParsimSynchronizer
Abstract base class for parallel simulation algorithms. Subclasses implement the "null message algori...
Definition:
cparsimsynchr.h:50
omnetpp::cMessage
omnetpp::cISimulationLifecycleListener
omnetpp::cCommBuffer
src
sim
parsim
cparsimpartition.h
Generated on Tue Jan 30 2024 20:11:37 for OMNeT++ Parallel Simulation Support by
1.8.17