cadvlinkdelaylookahead.h

00001 //=========================================================================
00002 //  CLINKDELAYLOOKAHEAD.H - part of
00003 //
00004 //                  OMNeT++/OMNEST
00005 //           Discrete System Simulation in C++
00006 //
00007 //  Author: Andras Varga, 2003
00008 //          Dept. of Electrical and Computer Systems Engineering,
00009 //          Monash University, Melbourne, Australia
00010 //
00011 //=========================================================================
00012 
00013 /*--------------------------------------------------------------*
00014   Copyright (C) 2003-2008 Andras Varga
00015   Copyright (C) 2006-2008 OpenSim Ltd.
00016 
00017   This file is distributed WITHOUT ANY WARRANTY. See the file
00018   `license' for details on this and other legal matters.
00019 *--------------------------------------------------------------*/
00020 
00021 #ifndef __CADVLINKDELAYLOOKAHEAD_H__
00022 #define __CADVLINKDELAYLOOKAHEAD_H__
00023 
00024 #include "cnmplookahead.h"
00025 
00026 NAMESPACE_BEGIN
00027 
00033 class SIM_API cAdvancedLinkDelayLookahead : public cNMPLookahead
00034 {
00035   protected:
00036     struct LinkOut
00037     {
00038         simtime_t lookahead; // lookahead on this link (currently the link delay)
00039         simtime_t eot;       // current EOT on this link (last msg sent + lookahead)
00040     };
00041     struct PartitionInfo
00042     {
00043         int numLinks;        // size of links[] array
00044         LinkOut **links;     // information on outgoing links (needed for EOT calculation)
00045         simtime_t lookahead; // lookahead to partition (minimum of all link lookaheads)
00046     };
00047 
00048     // partition information
00049     int numSeg;              // number of partitions
00050     PartitionInfo *segInfo;  // partition info array, size numSeg
00051 
00052   public:
00056     cAdvancedLinkDelayLookahead();
00057 
00061     virtual ~cAdvancedLinkDelayLookahead();
00062 
00066     virtual void startRun();
00067 
00071     virtual void endRun();
00072 
00077     virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data);
00078 
00082     virtual simtime_t getCurrentLookahead(int procId);
00083 };
00084 
00085 NAMESPACE_END
00086 
00087 
00088 #endif
00089 
00090 
Generated on Tue Dec 2 11:16:32 2014 for OMNeT++ Parallel Simulation Support by  doxygen 1.6.3