Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "TGo4WatchRunnable.h"
00015
00016 #include "TGo4Log.h"
00017 #include "TGo4Thread.h"
00018 #include "TGo4ClientStatus.h"
00019
00020 const UInt_t TGo4WatchRunnable::fguWATCHINTERVAL=5000;
00021
00022 TGo4WatchRunnable::TGo4WatchRunnable(const char* name, TGo4ExampleClient* cli)
00023 : TGo4Runnable(name,cli)
00024 {
00025 GO4TRACE((15,"TGo4WatchRunnable::TGo4WatchRunnable(const char*,TGo4ExampleClient*) constructor",__LINE__, __FILE__));
00026 fxApplication=cli->GetApplication();
00027 }
00028
00029 TGo4WatchRunnable::~TGo4WatchRunnable()
00030 {
00031 GO4TRACE((15,"TGo4WatchRunnable::~TGo4WatchRunnable() destructor",__LINE__, __FILE__));
00032
00033 }
00034
00035 Int_t TGo4WatchRunnable::Run(void*)
00036 {
00037 GO4TRACE((12,"TGo4WatchRunnable::Run()",__LINE__, __FILE__));
00038 TGo4ClientTask* cli= dynamic_cast<TGo4ClientTask*> (fxManager);
00039 if(cli)
00040 {
00041 cli->UpdateStatusBuffer();
00042 cli->SendStatusBuffer();
00043
00044
00045
00046 if(fxApplication)
00047 {
00048 cli->SendStatusMessage(1,kTRUE,TString::Format(
00049 "Application %s of client %s has been watched",
00050 fxApplication->GetName(), cli->GetName()));
00051
00052
00053 }
00054 }
00055 TGo4Thread::Sleep(fguWATCHINTERVAL);
00056 return 0;
00057 }