#include <TGo4ClientTask.h>
Inheritance diagram for TGo4ClientTask:
Public Methods | |
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) | |
virtual | ~TGo4ClientTask () |
virtual Int_t | Initialization () |
override the ThreadManager Initialization used by AppControlTimer to let this thing initialize the client transport connection. More... | |
virtual void | Quit () |
Quit the client; method to be called from command object, may be overridden in user implementation. More... | |
virtual TGo4TaskStatus * | CreateStatus () |
create a status object with information on the current client state. More... | |
TGo4TaskHandler * | GetTaskHandler () |
void | AddLocalCommand (TGo4Command *com) |
Put command into the command queue for local execution in main thread. More... | |
TGo4BufferQueue * | GetCommandQueue (const char *task=0) |
TGo4BufferQueue * | GetStatusQueue (const char *task=0) |
TGo4BufferQueue * | GetDataQueue (const char *task=0) |
Bool_t | ConnectServer (const char *node, UInt_t negport, Go4CommandMode_t role=kGo4ComModeRefused, const char *passwd=0) |
Connect this client to a waiting server task on node with negotiation channel negport. More... | |
Bool_t | DisconnectServer (Bool_t isterminating=kFALSE) |
Disconnect the current server task, but do not terminate the client. More... | |
const char * | GetServerHostName () |
Bool_t | IsConnected () |
Protected Methods | |
virtual void | UpdateStatus (TGo4TaskStatus *state) |
method needed by method CreateStatus of any status subclasses to set the values of the clienttask specific part of the status object. More... | |
Private Attributes | |
TGo4BufferQueue * | fxStatusQ |
TGo4BufferQueue * | fxDataQ |
TGo4BufferQueue * | fxCommandQ |
TGo4TaskHandler * | fxTaskHandler |
More... | |
TString | fxServerHostname |
hostname of server machine. More... | |
Bool_t | fbAutoConnect |
!True if client task shall try to connect automatically at Initialization. More... | |
Bool_t | fbServerConnected |
true if connection to server is established, otherwise false. More... |
Apart from the transport threads, the application class which inherits from client task may provide working threads to serve the data queues and do the actual work
Definition at line 42 of file TGo4ClientTask.h.
|
Definition at line 34 of file TGo4ClientTask.cxx. References TGo4ThreadManager::fguTEXTLENGTH, fxCommandQ, fxDataQ, fxServerHostname, fxStatusQ, fxTaskHandler, TGo4TaskHandler::GetCommandQueue(), TGo4TaskHandler::GetDataQueue(), TGo4TaskHandler::GetStatusQueue(), GetTaskHandler(), TGo4Task::IsMaster(), and TGo4ThreadManager::Launch(). |
|
Definition at line 63 of file TGo4ClientTask.cxx. References DisconnectServer(), and fxTaskHandler. |
|
override the ThreadManager Initialization used by AppControlTimer to let this thing initialize the client transport connection.
Reimplemented from TGo4Task. Definition at line 75 of file TGo4ClientTask.cxx. References ConnectServer(), GetServerHostName(), TGo4Task::Initialization(), and TGo4Task::Terminate(). |
|
Quit the client; method to be called from command object, may be overridden in user implementation.
Reimplemented from TGo4Task. Definition at line 181 of file TGo4ClientTask.cxx. References TGo4Log::Debug(), DisconnectServer(), TGo4Task::SendStatusMessage(), and TGo4Task::Terminate(). |
|
create a status object with information on the current client state. this object may be sent to the server or may be used to restore current status by memento mechanism Reimplemented from TGo4Task. Reimplemented in TGo4ExampleClient. Definition at line 189 of file TGo4ClientTask.cxx. References UpdateStatus(). |
|
Reimplemented from TGo4Task. Definition at line 70 of file TGo4ClientTask.cxx. References fxTaskHandler. Referenced by TGo4ClientTask(), and TGo4ExampleClient::TGo4ExampleClient(). |
|
Put command into the command queue for local execution in main thread.
Definition at line 205 of file TGo4ClientTask.cxx. References TGo4BufferQueue::AddBufferFromObject(), TGo4Log::Debug(), and fxCommandQ. |
|
Reimplemented from TGo4Task. Definition at line 218 of file TGo4ClientTask.cxx. References fxCommandQ. Referenced by DisconnectServer(). |
|
Reimplemented from TGo4Task. Definition at line 223 of file TGo4ClientTask.cxx. References fxStatusQ. |
|
Reimplemented from TGo4Task. Definition at line 227 of file TGo4ClientTask.cxx. References fxDataQ. Referenced by TGo4ExampleClient::TGo4ExampleClient(). |
|
Connect this client to a waiting server task on node with negotiation channel negport. Returns connection state, true if connection is established, otherwise false. Definition at line 104 of file TGo4ClientTask.cxx. References TGo4TaskHandler::ClearQueues(), TGo4TaskHandler::Connect(), TGo4Log::Error(), fbServerConnected, fxTaskHandler, TGo4ThreadManager::fxWorkHandler, Go4CommandMode_t, TGo4Task::IsMaster(), kGo4ComModeAdministrator, kGo4ComModeController, kGo4ComModeObserver, TGo4Task::SendStatusMessage(), TGo4TaskHandler::SetAdminAccount(), TGo4TaskHandler::SetCtrlAccount(), TGo4TaskHandler::SetNegotiationPort(), TGo4TaskHandler::SetObservAccount(), TGo4TaskHandler::SetRole(), TGo4ThreadHandler::StartAll(), and TGo4Log::Warn(). Referenced by TGo4Master::ConnectSlave(), and Initialization(). |
|
Disconnect the current server task, but do not terminate the client. Return value indicates success state: true if disconnected, false if connection is still existing. If isterminating=true, work threads are not restarted again. Definition at line 159 of file TGo4ClientTask.cxx. References TGo4Queue::Clear(), TGo4TaskHandler::DisConnect(), fbServerConnected, TGo4Task::fgiTERMID, fxTaskHandler, GetCommandQueue(), TGo4Task::IsMaster(), TGo4Task::SendStopBuffers(), TGo4Task::StartWorkThreads(), TGo4Task::StopWorkThreads(), and TGo4Task::WakeCommandQueue(). Referenced by TGo4Master::DisconnectSlave(), Quit(), and ~TGo4ClientTask(). |
|
Definition at line 111 of file TGo4ClientTask.h. References fxServerHostname. Referenced by Initialization(), and UpdateStatus(). |
|
Definition at line 114 of file TGo4ClientTask.h. References fbServerConnected. Referenced by TGo4TaskOwner::IsConnected(). |
|
method needed by method CreateStatus of any status subclasses to set the values of the clienttask specific part of the status object.
Reimplemented from TGo4Task. Definition at line 197 of file TGo4ClientTask.cxx. References GetServerHostName(), TGo4ClientStatus::SetNames(), and TGo4Task::UpdateStatus(). Referenced by CreateStatus(), and TGo4ExampleClient::UpdateStatus(). |
|
Definition at line 128 of file TGo4ClientTask.h. Referenced by GetStatusQueue(), and TGo4ClientTask(). |
|
Definition at line 129 of file TGo4ClientTask.h. Referenced by GetDataQueue(), and TGo4ClientTask(). |
|
Definition at line 130 of file TGo4ClientTask.h. Referenced by AddLocalCommand(), GetCommandQueue(), and TGo4ClientTask(). |
|
Definition at line 136 of file TGo4ClientTask.h. Referenced by ConnectServer(), DisconnectServer(), GetTaskHandler(), TGo4ClientTask(), and ~TGo4ClientTask(). |
|
hostname of server machine.
Definition at line 139 of file TGo4ClientTask.h. Referenced by GetServerHostName(), and TGo4ClientTask(). |
|
!True if client task shall try to connect automatically at Initialization. This is the previous behaviour with standalone client. If false, connection will be done on ConnectServer method. Definition at line 145 of file TGo4ClientTask.h. |
|
true if connection to server is established, otherwise false.
Definition at line 150 of file TGo4ClientTask.h. Referenced by ConnectServer(), DisconnectServer(), and IsConnected(). |