Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PsReactController.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 PsReactControllerHEADER
00019 #define PsReactControllerHEADER
00020 
00021 #include <PsController.h>
00022 #include <PsnBarrier.h>
00023 #include <sys/frs.h>
00024 #include <stdio.h> //pour perror
00025 class PsObjectDescriptor;
00026 
00033 class PsReactController : public PsController
00034 {
00035 public:
00037   friend class PsReactGlobalController; //pour l'acces ŕ frs : qu'on veut garder secret sinon
00044   PsReactController(PsObjectDescriptor* arbreSimul, int minorTime, int nbMinor, PsController * control, int cpuAutiliser,PsKernelObjectAbstractFactory * aKernelObjectFactory);
00048   ~PsReactController();
00049 
00053   virtual PsCalculus * createCalculus();
00057   virtual void init();
00061   virtual void reactToControlledObjectsSystemEvents() ;
00066    virtual PsSimulatedObject * getPointerToSimulatedObjectNamed (const PsName & nom);       
00071   PsnBarrier * barStart;
00074   frs_t* Frs();
00075 protected:
00078   int cpu;
00081   int nbModules;
00088   static void capture_signal(void);
00090   static void capture_underrun(int i);
00092   static void capture_overrun(int i);
00094   static void capture_end(int i);
00098   void annulerSignalSIGRTMIN();
00100 
00103 
00104   pthread_attr_t attributs_pthread;
00106   pthread_t id_pthread_controleur; //L'identifiant du thread controleur  
00108   pthread_t id_pthread_time;
00111   void threadTime();
00114   static void *Thread_Time(void *controleurv);
00117   void threadControleur();
00119   static void *Thread_controleur(void *controleurv);
00121 
00123   PsnBarrier barInit;
00126   frs_t *frs;
00127 public:
00134   virtual PsnSemaphore * newSemaphore(int i);
00136 };
00137 #endif

logo OpenMask

Documentation generated on Mon Nov 25 15:25:02 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001