worker.h

00001 // "worker.h"
00002 
00003 // (c) OPAC Team, LIFL, August 2005
00004 
00005 /* 
00006    Contact: paradiseo-help@lists.gforge.inria.fr
00007 */
00008 
00009 #ifndef __worker_h
00010 #define __worker_h
00011 
00012 #include "../../core/communicable.h"
00013 #include "../../core/reac_thread.h"
00014 #include "../../core/service.h"
00015 
00016 typedef unsigned WORKER_ID; 
00017 
00018 class Worker : public Communicable, public ReactiveThread {
00019 
00020 public : 
00021 
00022   Worker ();
00023 
00024   void start ();
00025 
00026   void packResult ();
00027 
00028   void unpackData ();
00029 
00030   void packTaskDone (); 
00031 
00032   void notifySendingResult ();
00033 
00034   void notifySendingTaskDone ();
00035   
00036   void setSource (int __rank);
00037   
00038 private :
00039 
00040   WORKER_ID id;
00041   SERVICE_ID serv_id;
00042   Service * serv;
00043   int src;
00044 
00045   bool toto;
00046 };
00047 
00048 extern Worker * getWorker (WORKER_ID __key);
00049 
00050 #endif

Generated on Tue Jan 9 15:47:38 2007 for ParadisEO-PEO by  doxygen 1.4.7