- Main Page
- Modules
- Classes
- Files
- Directories

# cparsimprotocolbase.h

    00001 //=========================================================================
    00002 //  CPARSIMPROTOCOLBASE.H - part of
    00003 //
    00004 //                  OMNeT++/OMNEST
    00005 //           Discrete System Simulation in C++
    00006 //
    00007 //   Written by:  Andras Varga, 2003
    00008 //
    00009 //=========================================================================
    00010
    00011 /*--------------------------------------------------------------*
    00012   Copyright (C) 2003-2005 Andras Varga
    00013   Monash University, Dept. of Electrical and Computer Systems Eng.
    00014   Melbourne, Australia
    00015
    00016   This file is distributed WITHOUT ANY WARRANTY. See the file
    00017   `license' for details on this and other legal matters.
    00018 *--------------------------------------------------------------*/
    00019
    00020 #ifndef __CPARSIMPROTOCOLBASE_H__
    00021 #define __CPARSIMPROTOCOLBASE_H__
    00022
    00023 #include "cparsimsynchr.h"
    00024
    00025 // forward declarations
    00026 class cCommBuffer;
    00027
    00034 class cParsimProtocolBase : public cParsimSynchronizer
    00035 {
    00036   protected:
    00037     // process whatever comes from other partitions -- nonblocking
    00038     virtual void receiveNonblocking();
    00039
    00040     // process whatever comes from other partitions -- blocking
    00041     // (normally returns true; false is returned if blocking was interrupted by the user)
    00042     virtual bool receiveBlocking();
    00043
    00044     // process buffers coming from other partitions
    00045     virtual void processReceivedBuffer(cCommBuffer *buffer, int tag, int sourceProcId);
    00046
    00047     // process cMessages received from other partitions
    00048     virtual void processReceivedMessage(cMessage *msg, int destModuleId, int destGateId, int sourceProcId);
    00049
    00050   public:
    00054     cParsimProtocolBase();
    00055
    00059     virtual ~cParsimProtocolBase();
    00060
    00064     virtual void processOutgoingMessage(cMessage *msg, int procId, int moduleId, int gateId, void *data);
    00065 };
    00066
    00067 #endif
    00068