clinkdelaylookahead.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 __CLINKDELAYLOOKAHEAD_H__
00022 #define __CLINKDELAYLOOKAHEAD_H__
00023 
00024 #include "cnmplookahead.h"
00025 
00026 NAMESPACE_BEGIN
00027 
00028 class cGate;
00029 
00035 class SIM_API cLinkDelayLookahead : public cNMPLookahead
00036 {
00037   protected:
00038     struct PartitionInfo
00039     {
00040         simtime_t minDelay;  // minimum of all link delays to given partition
00041     };
00042 
00043     // partition information
00044     int numSeg;              // number of partitions
00045     PartitionInfo *segInfo;  // partition info array, size numSeg
00046 
00047     // calculate the total delay along the path ending the given gate
00048     simtime_t collectPathDelay(cGate *pathEndGate);
00049 
00050   public:
00054     cLinkDelayLookahead();
00055 
00059     virtual ~cLinkDelayLookahead();
00060 
00064     virtual void startRun();
00065 
00069     virtual void endRun();
00070 
00075     virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data);
00076 
00080     virtual simtime_t getCurrentLookahead(int procId);
00081 };
00082 
00083 NAMESPACE_END
00084 
00085 
00086 #endif
00087 
00088 
Generated on Tue Dec 2 11:16:32 2014 for OMNeT++ Parallel Simulation Support by  doxygen 1.6.3