OMNeT++ Parallel Simulation Support  6.0.3
cnmplookahead.h
1 //=========================================================================
2 // CNMPLOOKAHEAD.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_CNMPLOOKAHEAD_H
18 #define __OMNETPP_CNMPLOOKAHEAD_H
19 
20 #include "omnetpp/cobject.h"
21 #include "omnetpp/simtime_t.h"
22 
23 namespace omnetpp {
24 
25 class cMessage;
26 class cSimulation;
27 class cParsimCommunications;
28 class cParsimPartition;
29 
30 
37 class SIM_API cNMPLookahead : public cObject
38 {
39  protected:
40  cSimulation *sim;
41  cParsimCommunications *comm; // TBD this is just to access numPartitions -- optimize out?
42  cParsimPartition *partition;
43  // cNullMessageProtocol *nullmsgprot;
44 
45  public:
50 
54  virtual ~cNMPLookahead() {}
55 
60  {sim = simul; partition = seg; comm = co;}
61 
65  virtual void startRun() = 0;
66 
70  virtual void endRun() = 0;
71 
75  virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data) = 0;
76 
80  virtual simtime_t getCurrentLookahead(int procId) = 0;
81 
82 };
83 
84 } // namespace omnetpp
85 
86 
87 #endif
omnetpp::cObject
omnetpp::cSimulation
omnetpp::cNMPLookahead::~cNMPLookahead
virtual ~cNMPLookahead()
Definition: cnmplookahead.h:54
omnetpp::cNMPLookahead::setContext
void setContext(cSimulation *simul, cParsimPartition *seg, cParsimCommunications *co)
Definition: cnmplookahead.h:59
omnetpp::cParsimCommunications
omnetpp::cNMPLookahead
Base class of lookahead calculations for cNullMessageProtocol which implements the "null message algo...
Definition: cnmplookahead.h:37
omnetpp::cNMPLookahead::cNMPLookahead
cNMPLookahead()
Definition: cnmplookahead.h:49
omnetpp::cParsimPartition
Represents one partition in a parallel simulation. Knows about partitions and the links between this ...
Definition: cparsimpartition.h:58
simtime_t
SimTime simtime_t
omnetpp::cMessage