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

/Go4TaskHandler/TGo4ClientTask.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #ifndef TGO4CLIENTTASK_H
00017 #define TGO4CLIENTTASK_H
00018 
00019 #include "Go4ThreadManager/TGo4ThreadManager.h"
00020 #include "Go4CommandsBase/TGo4CommandReceiver.h"
00021 #include "Go4CommandsBase/TGo4Command.h"
00022 #include "TGo4Task.h"
00023 #include "Go4Queue/TGo4BufferQueue.h"
00024 #include "Go4Queue/TGo4ObjectQueue.h"
00025 #include "TGo4TaskStatus.h"
00026 #include "TString.h"
00027 
00028 class TMutex;
00029 class TBuffer;
00030 class TNamed;
00031 class TGo4Command;
00032 class TGo4ClientStatus;
00033 class TGo4Status;
00034 class TGo4TaskHandler;
00035 
00042 class TGo4ClientTask : public TGo4Task {
00043     
00044    public:
00045 
00046       TGo4ClientTask(const char* name,
00047                      const char* serverhost="localhost",
00048                      UInt_t negotiationport=0,
00049                      Bool_t blockingmode=kTRUE,
00050                      Bool_t standalone=kFALSE,
00051                      Bool_t autostart=kFALSE,
00052                      Bool_t autocreate=kTRUE,
00053                      Bool_t ismaster=kFALSE,
00054                      Bool_t autoconnect=kTRUE);
00055 
00056       virtual ~TGo4ClientTask();
00057 
00062       virtual Int_t Initialization();
00063 
00069       virtual void Quit();
00070    
00077       virtual TGo4TaskStatus* CreateStatus();
00078 
00079       TGo4TaskHandler* GetTaskHandler();
00080 
00084       void AddLocalCommand(TGo4Command * com);
00085 
00086       
00087 
00088       TGo4BufferQueue* GetCommandQueue(const char* task=0);
00089 
00090       TGo4BufferQueue* GetStatusQueue(const char* task=0);
00091 
00092       TGo4BufferQueue* GetDataQueue(const char* task=0);
00093 
00099       Bool_t ConnectServer(const char* node, UInt_t negport, 
00100                             Go4CommandMode_t role=kGo4ComModeRefused, 
00101                             const char* passwd=0);
00102 
00109       Bool_t DisconnectServer(Bool_t isterminating=kFALSE);
00110 
00111       const char* GetServerHostName(){return fxServerHostname.Data();}
00112 
00113 
00114       Bool_t IsConnected(){return fbServerConnected;}
00116 
00117    protected:
00118 
00125       virtual void UpdateStatus(TGo4TaskStatus* state);
00126 
00127    private:
00128       TGo4BufferQueue* fxStatusQ; 
00129       TGo4BufferQueue* fxDataQ; 
00130       TGo4BufferQueue* fxCommandQ; 
00131 
00136       TGo4TaskHandler* fxTaskHandler; 
00137 
00139       TString fxServerHostname;  
00145       Bool_t fbAutoConnect;
00146 
00150       Bool_t fbServerConnected;
00151    ClassDef(TGo4ClientTask,1)
00152 };
00153 
00154 #endif //TGO4CLIENTTASK_H
00155 
00156 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:06 2005 for Go4-v2.10-5 by doxygen1.2.15