24 const char *serverhost,
25 UInt_t negotiationport,
32 TGo4Task(name,blockingmode,autostart,autocreate,ismaster),
38 TString nomen(
"TaskHandler of ");
84 TGo4Log::Warn(
" ClientTask::ConnectServer ''%s'': ServerTask already connected", GetName());
94 TGo4Log::Info(
"TGo4ClientTask::ConnectServer with role %d and passwd %s", role, passwd);
110 SendStatusMessage(1, kTRUE,
"Client %s connected successfully to Server task at node %s", GetName(),
114 TGo4Log::Error(
" ClientTask ''%s'': FAILED connection to ServerTask at node %s", GetName(), node);
176 TGo4Log::Debug(
" !!! ClientTask - ERROR adding local command - no command queue !!! ");
virtual void UpdateStatus(TGo4TaskStatus *state)
Bool_t DisConnect(Bool_t waitforclient=kTRUE)
void UpdateStatus(TGo4TaskStatus *state) override
virtual Int_t StartWorkThreads()
Int_t Initialization() override
TGo4BufferQueue * GetCommandQueue(const char *task=nullptr) override
Bool_t Connect(const char *host="localhost", TGo4Socket *negotiator=nullptr)
TGo4BufferQueue * fxStatusQ
void WakeCommandQueue(Int_t id=0)
TGo4BufferQueue * GetDataQueue(const char *task=nullptr) override
Bool_t DisconnectServer(Bool_t isterminating=kFALSE)
TGo4ThreadHandler * fxWorkHandler
static void SetObservAccount(const char *name, const char *passwd)
static void Info(const char *text,...) GO4_PRINTF_ARGS
TGo4ClientTask(const char *name, const char *serverhost="localhost", UInt_t negotiationport=0, Bool_t blockingmode=kTRUE, Bool_t standalone=kFALSE, Bool_t autostart=kFALSE, Bool_t autocreate=kTRUE, Bool_t ismaster=kFALSE, Bool_t autoconnect=kTRUE)
const char * GetServerHostName() const
void SendStopBuffers(const char *taskname=nullptr)
virtual ~TGo4ClientTask()
TGo4TaskHandler * GetTaskHandler() override
void Terminate(Bool_t termapp=kTRUE) override
static void SetCtrlAccount(const char *name, const char *passwd)
TGo4BufferQueue * fxCommandQ
TGo4TaskHandler * fxTaskHandler
Bool_t ConnectServer(const char *node, UInt_t negport, Go4CommandMode_t role=kGo4ComModeRefused, const char *passwd=nullptr)
Int_t Initialization() override
virtual Int_t StopWorkThreads()
static void Debug(const char *text,...) GO4_PRINTF_ARGS
TGo4BufferQueue * fxDataQ
void Clear(Option_t *opt="") override
void SetNames(const char *serverhost)
TGo4Queue * GetStatusQueue() const
void SetNegotiationPort(UInt_t port)
void SendStatusMessage(Int_t level, Bool_t printout, const char *text,...)
static void Error(const char *text,...) GO4_PRINTF_ARGS
TGo4Queue * GetCommandQueue() const
void SetRole(Go4CommandMode_t role)
static void SetAdminAccount(const char *name, const char *passwd)
void AddLocalCommand(TGo4Command *com)
static Int_t Get_fgiTERMID()
TGo4Queue * GetDataQueue() const
TGo4BufferQueue * GetStatusQueue(const char *task=nullptr) override
TGo4TaskStatus * CreateStatus() override
static void Warn(const char *text,...) GO4_PRINTF_ARGS
void AddBufferFromObject(TObject *object)