OMNeT++ Parallel Simulation Support  5.4.1
cadvlinkdelaylookahead.h
1 //=========================================================================
2 // CLINKDELAYLOOKAHEAD.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_CADVLINKDELAYLOOKAHEAD_H
22 #define __OMNETPP_CADVLINKDELAYLOOKAHEAD_H
23 
24 #include "cnmplookahead.h"
25 
26 namespace omnetpp {
27 
34 {
35  protected:
36  struct LinkOut
37  {
38  simtime_t lookahead; // lookahead on this link (currently the link delay)
39  simtime_t eot; // current EOT on this link (last msg sent + lookahead)
40  };
41  struct PartitionInfo
42  {
43  int numLinks; // size of links[] array
44  LinkOut **links; // information on outgoing links (needed for EOT calculation)
45  simtime_t lookahead; // lookahead to partition (minimum of all link lookaheads)
46  };
47 
48  // partition information
49  int numSeg; // number of partitions
50  PartitionInfo *segInfo; // partition info array, size numSeg
51 
52  public:
57 
61  virtual ~cAdvancedLinkDelayLookahead();
62 
66  virtual void startRun();
67 
71  virtual void endRun();
72 
77  virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data);
78 
82  virtual simtime_t getCurrentLookahead(int procId);
83 };
84 
85 } // namespace omnetpp
86 
87 
88 #endif
89 
90 
SimTime simtime_t
Definition: cadvlinkdelaylookahead.h:26
Base class of lookahead calculations for cNullMessageProtocol which implements the "null message algo...
Definition: cnmplookahead.h:41
Lookahead calculation based on inter-partition link delays only.
Definition: cadvlinkdelaylookahead.h:33