OMKPvmController.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of openMask © INRIA, CNRS, Universite de Rennes 1 1993-2002, thereinafter the Software
00003  * 
00004  * The Software has been developped within the Siames Project. 
00005  * INRIA, the University of Rennes 1 and CNRS jointly hold intellectual property rights
00006  * 
00007  * The Software has been registered with the Agence pour la Protection des
00008  * Programmes (APP) under registration number IDDN.FR.001.510008.00.S.P.2001.000.41200
00009  *
00010  * This file may be distributed under the terms of the Q Public License
00011  * version 1.0 as defined by Trolltech AS of Norway and appearing in the file
00012  * LICENSE.QPL included in the packaging of this file.
00013  *
00014  * Licensees holding valid specific licenses issued by INRIA, CNRS or Université de Rennes 1 
00015  * for the software may use this file in accordance with that specific license 
00016  *
00017  */
00018 #ifndef OMKPvmControllerHEADER
00019 #define OMKPvmControllerHEADER
00020 
00021 //---------------------------------------------------------------------
00022 
00023 #include <OMKDistributedController.h>
00024 #include <OMKSvmLink.h>
00025 
00026 //---------------------------------------------------------------------
00027 namespace OMK
00028 {
00029 class Svm ;
00030 class MirrorObjectHandle ;
00031 
00032 //---------------------------------------------------------------------
00045 //---------------------------------------------------------------------
00046 
00047 class OMKPVM_API PvmController : public DistributedController 
00048 {
00049 public :
00050    
00056    PvmController (ObjectDescriptor & arbre,
00057                     const Date & initialSimulationDate,
00058                     int argc,
00059                     char * argv []) ;
00060 
00062    virtual ~PvmController () ;
00063 
00064 
00067    virtual void run () ;
00068 
00069 
00073    virtual void advanceSimulatedDate ();
00074 
00075 
00078    virtual void computeNextSimulationStep();
00079    
00080    
00082    virtual void finish() ;
00083 
00084 
00086    virtual const Name & getProcessName () const ;
00087    
00088 
00090    virtual Svm * getDistributedVirtualMachine () ;
00091    
00092 
00094    virtual void makeSynchronisationMessage (NameToPointerMap<ReferenceObjectHandle> & referenceObjects) ;
00095 
00096    
00101    virtual void parseSynchronisationMessage (PvmIncomingMessage * message) ;
00102    
00103 
00107    virtual void waitForAnswerToBlockingRequest (PvmMessage::MessageTag tag) ;
00108 
00109 
00111    virtual void sendInitialValuesToMirror (PvmIncomingMessage & message) ;
00112 
00114    virtual void init () ;
00115 
00116 
00117    /******************chadi ajout***********************/
00118    //   virtual void parseUpdateProcessTableMessage (PvmIncomingMessage * message) ;
00119    
00120    std::vector<Name> _publicIsolatedMirrorObjectsVector ;
00121    virtual std::vector<Name> getIsolatedMirrorList();
00122    std::vector<Name> _publicNonIsolatedMirrorObjectsVector ;
00123    virtual std::vector<Name> getNonIsolatedMirrorList();
00124    virtual bool testIfTroubleOccured() ;
00125    virtual void createNewSite ( const Date & ) ;
00126   // TDTD pour gérer les noms des déconnectés...
00127   virtual std::list<Name> getDisconnectedProcessusList () ;
00128   virtual std::map<Name, int> getDisconnectedProcessusMap () ;
00129    //*********************fin ************************
00130 
00131    
00132 protected :
00133 
00135    virtual Date getPurgeDate () ;
00136 
00137 
00140    virtual MirrorObjectHandle * createMirrorObject (ObjectDescriptor * objectDescription ) ;
00141    
00142 
00147    virtual DuplicatedObjectHandle * newOMKDuplicatedObjectHandle (SimulatedObject & object);
00148 
00149 
00150 //------------------chadi ajout 1/1 ------------------
00151 
00152  virtual LocalObjectHandle * newOMKLocalObjectHandle (SimulatedObject & object);
00153 
00154 //-------------------fin 1/1 -------------------------   
00155 
00156 
00157 
00158 
00159 
00160 
00165    virtual MirrorObjectHandle * newOMKMirrorObjectHandle (SimulatedObject & obj);
00166 
00167 
00172    virtual ReferenceObjectHandle * newOMKReferenceObjectHandle(SimulatedObject & object, 
00173                                                                   Controller & controller,
00174                                                                   SignalDispatcher * signalDispatcher);
00175 
00176 
00180    virtual int getOutputHistorySize(void) ;
00181    
00182 
00184    Svm * _distributedVirtualMachine ;
00185 
00186 
00189    virtual ObjectHandle * removeObjectFromDataStructures(const Name & nom);
00190 
00191 
00193    bool _finishing ;
00194 
00197    void (PvmController::* receiveAndProcessMessages) (void) ;
00198    void synchronizedReceiveAndProcessMessages (void) ;
00199    void relaxedReceiveAndProcessMessages (void) ;
00200 
00201 } ; // PvmController
00202 
00203 //---------------------------------------------------------------------
00204 } // namespace OMK
00205 #endif

logo OpenMask

Documentation generated on Mon Jun 9 11:45:57 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007