00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TGo4LoggingRunnable.h"
00017
00018 #include "TGo4Log.h"
00019 #include "TGo4Thread.h"
00020 #include "TGo4ExampleServer.h"
00021 #include "TGo4ExampleController.h"
00022
00023 TGo4LoggingRunnable::TGo4LoggingRunnable(const char* name, TGo4ExampleServer* serv)
00024 : TGo4Runnable(name,serv)
00025 {
00026 TRACE((15,"TGo4LoggingRunnable::TGo4LoggingRunnable(Text_t*,TGo4ExampleServer*) constructor",__LINE__, __FILE__));
00027 fxController=serv->GetController();
00028 fxServer=serv;
00029 }
00030
00031 TGo4LoggingRunnable::~TGo4LoggingRunnable()
00032 {
00033 TRACE((15,"TGo4LoggingRunnable::TGo4LoggingRunnable(Text_t*,TGo4ExampleServer*) constructor",__LINE__, __FILE__));
00034 }
00035
00036 Int_t TGo4LoggingRunnable::Run(void*)
00037 {
00038 TRACE((12,"TGo4LoggingRunnable::Run()",__LINE__, __FILE__));
00039 TGo4TaskHandler* currenttask=fxServer->GetCurrentTaskHandler();
00040 if(currenttask==0)
00041 {
00042 TRACE((11,"TGo4LoggingRunnable::Run()-- no current client existing",__LINE__, __FILE__));
00043 TGo4Thread::Sleep(5000);
00044
00045 }
00046 else
00047 {
00048 TRACE((11,"TGo4LoggingRunnable::Run()-- working on client's taskhandler queues",__LINE__, __FILE__));
00049 TGo4Status* status= fxServer->NextStatus();
00050 fxController->DisplayLog(status);
00051 }
00052 return 0;
00053 }
00054
00055