OMNeT++ Parallel Simulation Support  6.0.3
cadvlinkdelaylookahead.h
1 //=========================================================================
2 // CLINKDELAYLOOKAHEAD.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_CADVLINKDELAYLOOKAHEAD_H
18 #define __OMNETPP_CADVLINKDELAYLOOKAHEAD_H
19 
20 #include "cnmplookahead.h"
21 
22 namespace omnetpp {
23 
30 {
31  protected:
32  struct LinkOut
33  {
34  simtime_t lookahead; // lookahead on this link (currently the link delay)
35  simtime_t eot; // current EOT on this link (last msg sent + lookahead)
36  };
37  struct PartitionInfo
38  {
39  int numLinks; // size of links[] array
40  LinkOut **links; // information on outgoing links (needed for EOT calculation)
41  simtime_t lookahead; // lookahead to partition (minimum of all link lookaheads)
42  };
43 
44  // partition information
45  int numSeg; // number of partitions
46  PartitionInfo *segInfo; // partition info array, size numSeg
47 
48  public:
53 
57  virtual ~cAdvancedLinkDelayLookahead();
58 
62  virtual void startRun();
63 
67  virtual void endRun();
68 
73  virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data);
74 
78  virtual simtime_t getCurrentLookahead(int procId);
79 };
80 
81 } // namespace omnetpp
82 
83 
84 #endif
85 
86 
omnetpp::cNMPLookahead
Base class of lookahead calculations for cNullMessageProtocol which implements the "null message algo...
Definition: cnmplookahead.h:37
omnetpp::cAdvancedLinkDelayLookahead
Lookahead calculation based on inter-partition link delays only.
Definition: cadvlinkdelaylookahead.h:29
simtime_t
SimTime simtime_t
omnetpp::cMessage