00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef TGO4MASTER_H
00019 #define TGO4MASTER_H
00020 #include "Go4CommandsBase/TGo4CommandReceiver.h"
00021 #include "Go4CommandsTaskHandler/TGo4TaskHandlerCommandList.h"
00022 #include "TGo4Task.h"
00023 #include "Go4CommandsBase/TGo4Command.h"
00024 #include <Rtypes.h>
00025 #include "Go4CommandsTaskHandler/Go4CommandsTaskHandler.h"
00026 #include "Go4Queue/TGo4ObjectQueue.h"
00027 #include <TString.h>
00028 #include "TGo4TaskOwner.h"
00029 class TGo4TaskHandlerCommandList;
00030
00031 class TGo4Master : public TGo4TaskOwner{
00032 public:
00033 TGo4Master() ;
00034
00035 TGo4Master(const char* name, Bool_t isserver=kTRUE, const char* serverhost="localhost", UInt_t negotport=5000) ;
00036
00037 virtual ~TGo4Master() ;
00038
00042 Bool_t SubmitCommand(const char* name);
00043
00047 Bool_t SubmitEmergencyCommand(Go4EmergencyCommand_t val);
00048
00053 Bool_t SubmitCommand(TGo4Command* com);
00054
00058 virtual void SetSlave(const char*node, const char* shell, const char* command);
00059
00060 const char * GetSlaveNode();
00061
00062 const char * GetSlaveShell();
00063
00064 const char * GetSlaveExec();
00065
00070 virtual void StartSlaveWindow(const char* command);
00071
00075 virtual TGo4TaskHandlerCommandList* CreateCommandList();
00076
00092 virtual Bool_t ConnectSlave(const char* name,
00093 const char* remotehost=0,
00094 UInt_t negport=0,
00095 const char* remotedir=0,
00096 const char* remotecommand=0,
00097 Int_t mode=0,
00098 Bool_t startserver=kFALSE,
00099 Go4CommandMode_t role=kGo4ComModeController,
00100 const char* passwd=0
00101 );
00102
00111 virtual Bool_t DisconnectSlave(const char* name=0,
00112 Bool_t waitforslave=kTRUE );
00113
00128 virtual Int_t LaunchSlaveServer(const char* name,
00129 const char* remotehost=0,
00130 const char* remotedir=0,
00131 const char* remotecommand=0,
00132 Int_t mode=0);
00133
00134 private:
00135
00139 TString fxSlaveNode;
00140
00144 TString fxSlaveShell;
00145
00150 TString fxSlaveExec;
00151 };
00152 #endif //TGO4MASTER_H
00153
00154