00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __worker_h
00025 #define __worker_h
00026
00027 #include "../../core/communicable.h"
00028 #include "../../core/reac_thread.h"
00029 #include "../../core/service.h"
00030
00031 typedef unsigned WORKER_ID;
00032
00033 class Worker : public Communicable, public ReactiveThread {
00034
00035 public :
00036
00037 Worker ();
00038
00039 void start ();
00040
00041 void packResult ();
00042
00043 void unpackData ();
00044
00045 void packTaskDone ();
00046
00047 void notifySendingResult ();
00048
00049 void notifySendingTaskDone ();
00050
00051 void setSource (int __rank);
00052
00053 private :
00054
00055 WORKER_ID id;
00056 SERVICE_ID serv_id;
00057 Service * serv;
00058 int src;
00059
00060 bool toto;
00061 };
00062
00063 extern Worker * getWorker (WORKER_ID __key);
00064
00065 #endif