cparsimprotocolbase.h

00001 //=========================================================================
00002 //  CPARSIMPROTOCOLBASE.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 __CPARSIMPROTOCOLBASE_H__
00022 #define __CPARSIMPROTOCOLBASE_H__
00023 
00024 #include "cparsimsynchr.h"
00025 
00026 NAMESPACE_BEGIN
00027 
00028 // forward declarations
00029 class cCommBuffer;
00030 
00037 class SIM_API cParsimProtocolBase : public cParsimSynchronizer
00038 {
00039   protected:
00040     // process whatever comes from other partitions -- nonblocking
00041     virtual void receiveNonblocking();
00042 
00043     // process whatever comes from other partitions -- blocking
00044     // (normally returns true; false is returned if blocking was interrupted by the user)
00045     virtual bool receiveBlocking();
00046 
00047     // process buffers coming from other partitions
00048     virtual void processReceivedBuffer(cCommBuffer *buffer, int tag, int sourceProcId);
00049 
00050     // process cMessages received from other partitions
00051     virtual void processReceivedMessage(cMessage *msg, int destModuleId, int destGateId, int sourceProcId);
00052 
00053   public:
00057     cParsimProtocolBase();
00058 
00062     virtual ~cParsimProtocolBase();
00063 
00067     virtual void processOutgoingMessage(cMessage *msg, int procId, int moduleId, int gateId, void *data);
00068 };
00069 
00070 NAMESPACE_END
00071 
00072 
00073 #endif
00074 
Generated on Tue Dec 2 11:16:32 2014 for OMNeT++ Parallel Simulation Support by  doxygen 1.6.3