Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4ClientTask.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "TGo4Task.h"
00020 
00021 #include "TGo4Command.h"
00022 #include "TString.h"
00023 
00024 class TMutex;
00025 
00026 class TGo4Command;
00027 class TGo4BufferQueue;
00028 class TGo4TaskHandler;
00029 
00036 class TGo4ClientTask : public TGo4Task {
00037 
00038    public:
00039 
00040       TGo4ClientTask(const char* name,
00041                      const char* serverhost="localhost",
00042                      UInt_t negotiationport=0,
00043                      Bool_t blockingmode=kTRUE,
00044                      Bool_t standalone=kFALSE,
00045                      Bool_t autostart=kFALSE,
00046                      Bool_t autocreate=kTRUE,
00047                      Bool_t ismaster=kFALSE,
00048                      Bool_t autoconnect=kTRUE);
00049 
00050       virtual ~TGo4ClientTask();
00051 
00056       virtual Int_t Initialization();
00057 
00063       virtual void Quit();
00064 
00071       virtual TGo4TaskStatus* CreateStatus();
00072 
00073       TGo4TaskHandler* GetTaskHandler();
00074 
00078       void AddLocalCommand(TGo4Command * com);
00079 
00080       TGo4BufferQueue* GetCommandQueue(const char* task=0);
00081 
00082       TGo4BufferQueue* GetStatusQueue(const char* task=0);
00083 
00084       TGo4BufferQueue* GetDataQueue(const char* task=0);
00085 
00091       Bool_t ConnectServer(const char* node, UInt_t negport,
00092                             Go4CommandMode_t role=kGo4ComModeRefused,
00093                             const char* passwd=0);
00094 
00101       Bool_t DisconnectServer(Bool_t isterminating=kFALSE);
00102 
00103       const char* GetServerHostName(){return fxServerHostname.Data();}
00104 
00105 
00106       Bool_t IsConnected(){return fbServerConnected;}
00108 
00109    protected:
00110 
00117       virtual void UpdateStatus(TGo4TaskStatus* state);
00118 
00119    private:
00120       TGo4BufferQueue* fxStatusQ; 
00121       TGo4BufferQueue* fxDataQ; 
00122       TGo4BufferQueue* fxCommandQ; 
00123 
00128       TGo4TaskHandler* fxTaskHandler; 
00129 
00131       TString fxServerHostname;
00137       Bool_t fbAutoConnect;
00138 
00142       Bool_t fbServerConnected;
00143    ClassDef(TGo4ClientTask,1)
00144 };
00145 
00146 #endif //TGO4CLIENTTASK_H
00147 
00148 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:29 2008 for Go4-v3.04-1 by  doxygen 1.4.2