OMNeT++ Parallel Simulation Support  5.4.1
cnmplookahead.h
1 //=========================================================================
2 // CNMPLOOKAHEAD.H - part of
3 //
4 // OMNeT++/OMNEST
5 // Discrete System Simulation in C++
6 //
7 // Author: Andras Varga, 2003
8 // Dept. of Electrical and Computer Systems Engineering,
9 // Monash University, Melbourne, Australia
10 //
11 //=========================================================================
12 
13 /*--------------------------------------------------------------*
14  Copyright (C) 2003-2017 Andras Varga
15  Copyright (C) 2006-2017 OpenSim Ltd.
16 
17  This file is distributed WITHOUT ANY WARRANTY. See the file
18  `license' for details on this and other legal matters.
19 *--------------------------------------------------------------*/
20 
21 #ifndef __OMNETPP_CNMPLOOKAHEAD_H
22 #define __OMNETPP_CNMPLOOKAHEAD_H
23 
24 #include "omnetpp/cobject.h"
25 #include "omnetpp/simtime_t.h"
26 
27 namespace omnetpp {
28 
29 class cMessage;
30 class cSimulation;
31 class cParsimCommunications;
32 class cParsimPartition;
33 
34 
41 class SIM_API cNMPLookahead : public cObject
42 {
43  protected:
44  cSimulation *sim;
45  cParsimCommunications *comm; // TBD this is just to access numPartitions -- optimize out?
46  cParsimPartition *partition;
47  // cNullMessageProtocol *nullmsgprot;
48 
49  public:
54 
58  virtual ~cNMPLookahead() {}
59 
64  {sim = simul; partition = seg; comm = co;}
65 
69  virtual void startRun() = 0;
70 
74  virtual void endRun() = 0;
75 
79  virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data) = 0;
80 
84  virtual simtime_t getCurrentLookahead(int procId) = 0;
85 
86 };
87 
88 } // namespace omnetpp
89 
90 
91 #endif
SimTime simtime_t
virtual ~cNMPLookahead()
Definition: cnmplookahead.h:58
void setContext(cSimulation *simul, cParsimPartition *seg, cParsimCommunications *co)
Definition: cnmplookahead.h:63
Definition: cadvlinkdelaylookahead.h:26
cNMPLookahead()
Definition: cnmplookahead.h:53
Base class of lookahead calculations for cNullMessageProtocol which implements the "null message algo...
Definition: cnmplookahead.h:41
Represents one partition in a parallel simulation. Knows about partitions and the links between this ...
Definition: cparsimpartition.h:62