cnmplookahead.h

00001 //=========================================================================
00002 //  CNMPLOOKAHEAD.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 __CNMPLOOKAHEAD_H__
00022 #define __CNMPLOOKAHEAD_H__
00023 
00024 #include "cobject.h"
00025 #include "simtime_t.h"
00026 
00027 NAMESPACE_BEGIN
00028 
00029 // forward declarations
00030 class cMessage;
00031 class cSimulation;
00032 class cParsimCommunications;
00033 class cParsimPartition;
00034 
00035 
00042 class SIM_API cNMPLookahead : public cObject
00043 {
00044   protected:
00045     cSimulation *sim;
00046     cParsimCommunications *comm; // TBD this is just to access numPartitions -- optimize out?
00047     cParsimPartition *partition;
00048     // cNullMessageProtocol *nullmsgprot;
00049 
00050   public:
00054     cNMPLookahead() {};
00055 
00059     virtual ~cNMPLookahead() {}
00060 
00064     void setContext(cSimulation *simul, cParsimPartition *seg, cParsimCommunications *co)
00065        {sim = simul; partition = seg; comm = co;}
00066 
00070     virtual void startRun() = 0;
00071 
00075     virtual void endRun() = 0;
00076 
00080     virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data) = 0;
00081 
00085     virtual simtime_t getCurrentLookahead(int procId) = 0;
00086 
00087 };
00088 
00089 NAMESPACE_END
00090 
00091 
00092 #endif
Generated on Tue Dec 2 11:16:32 2014 for OMNeT++ Parallel Simulation Support by  doxygen 1.6.3