GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
TGo4ExampleClient Class Reference

#include <TGo4ExampleClient.h>

+ Inheritance diagram for TGo4ExampleClient:

Public Member Functions

 TGo4ExampleClient (const char *name, const char *host="localhost", UInt_t negport=0, Bool_t blockingmode=kTRUE)
 
virtual ~TGo4ExampleClient ()
 
TGo4ExampleApplicationGetApplication ()
 
void Start () override
 
void Stop () override
 
TGo4TaskStatusCreateStatus () override
 
- Public Member Functions inherited from TGo4ClientTask
 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 ()
 
Int_t Initialization () override
 
void Quit () override
 
TGo4TaskHandlerGetTaskHandler () override
 
void AddLocalCommand (TGo4Command *com)
 
TGo4BufferQueueGetCommandQueue (const char *task=nullptr) override
 
TGo4BufferQueueGetStatusQueue (const char *task=nullptr) override
 
TGo4BufferQueueGetDataQueue (const char *task=nullptr) override
 
Bool_t ConnectServer (const char *node, UInt_t negport, Go4CommandMode_t role=kGo4ComModeRefused, const char *passwd=nullptr)
 
Bool_t DisconnectServer (Bool_t isterminating=kFALSE)
 
const char * GetServerHostName () const
 
Bool_t IsConnected () const
 
- Public Member Functions inherited from TGo4Task
 TGo4Task (const char *name, Bool_t blockingmode, Bool_t autostart=kFALSE, Bool_t autocreate=kTRUE, Bool_t ismaster=kFALSE)
 
virtual ~TGo4Task ()
 
virtual void KillMain ()
 
virtual void RestartMain ()
 
void Terminate (Bool_t termapp=kTRUE) override
 
void TerminateFast () override
 
virtual void ExecuteString (const char *command)
 
Bool_t IsMaster () const
 
void SetOwner (TGo4TaskOwner *owner)
 
void AddUserCommand (TGo4Command *com)
 
void AddUserCommandList (TGo4CommandProtoList *comlist)
 
TGo4StatusNextStatus (Bool_t wait=kTRUE)
 
TObject * NextObject (Bool_t wait=kTRUE)
 
virtual TGo4CommandNextCommand ()
 
void SendObject (TObject *obj, const char *receiver=nullptr)
 
virtual void SendStatus (TGo4Status *stat, const char *receiver=nullptr)
 
virtual void SendStatusBuffer ()
 
TMutex * GetStatusBufferMutex ()
 
void SendStatusMessage (Int_t level, Bool_t printout, const char *text,...)
 
void UpdateStatusBuffer ()
 
Int_t Initialization () override
 
Bool_t SubmitCommand (const char *name)
 
Bool_t SubmitEmergencyCommand (Go4EmergencyCommand_t val)
 
Bool_t SubmitEmergencyData (Go4EmergencyCommand_t val, const char *receiver=nullptr)
 
Bool_t SubmitLocalCommand (TGo4Command *com)
 
Bool_t SubmitCommand (TGo4Command *com)
 
TGo4CommandMakeCommand (const char *name)
 
void WakeCommandQueue (Int_t id=0)
 
virtual Int_t StartWorkThreads ()
 
virtual Int_t StopWorkThreads ()
 
Bool_t IsWorkStopped () const
 
virtual void GetStatus ()
 
const char * GetCommanderName () const
 
TGo4MasterGetMaster () const
 
TGo4SlaveGetSlave () const
 
void SendStopBuffers (const char *taskname=nullptr)
 
TBuffer * GetAbortBuffer ()
 
- Public Member Functions inherited from TGo4ThreadManager
 TGo4ThreadManager (const TGo4ThreadManager &right)
 
 TGo4ThreadManager (const char *name, Bool_t blockingmode=kTRUE, Bool_t autostart=kTRUE, Bool_t autocreate=kTRUE)
 
virtual ~TGo4ThreadManager ()
 
void SetTimer (TGo4AppControlTimer *ctrltimer)
 
TGo4ThreadHandlerGetWorkHandler () const
 
Bool_t BlockApp ()
 
Bool_t UnBlockApp (Int_t mode=0)
 
Bool_t IsInitDone () const
 
Bool_t IsTerminating () const
 
Bool_t IsTerminateApp () const
 
Bool_t IsAppBlocking () const
 
Bool_t IsBeingQuit () const
 
void SetBeingQuit (Bool_t on)
 
void Launch ()
 
- Public Member Functions inherited from TGo4CommandReceiver
 TGo4CommandReceiver ()
 
virtual ~TGo4CommandReceiver ()
 

Static Public Attributes

static const char * fgcMAINTHREAD ="MAIN-"
 
static const char * fgcWATCHTHREAD ="WATCH-"
 
- Static Public Attributes inherited from TGo4ThreadManager
static const Long_t fglTIMERPERIOD = 200
 

Protected Member Functions

void UpdateStatus (TGo4TaskStatus *state) override
 
- Protected Member Functions inherited from TGo4Task
virtual TGo4TaskHandlerCommandListCreateCommandList ()
 
TGo4TaskHandlerCommandListGetPrototype ()
 
TGo4ObjectQueueGetLocalCommandQueue ()
 
void SetMaster (Bool_t on=kTRUE)
 
void SetWorkIsStopped (Bool_t on)
 

Private Member Functions

 TGo4ExampleClient ()
 

Private Attributes

TGo4ExampleApplicationfxApplication {nullptr}
 
TString fcMainName
 
TString fcWatchName
 

Additional Inherited Members

- Public Types inherited from TGo4ThreadManager
enum  { fguTEXTLENGTH = 256 }
 
- Static Public Member Functions inherited from TGo4Task
static Int_t Get_fgiTERMID ()
 
- Protected Attributes inherited from TGo4Task
TMutex * fxStatusMutex {nullptr}
 
TBuffer * fxStatusBuffer {nullptr}
 
- Protected Attributes inherited from TGo4ThreadManager
Bool_t fbInitDone {kFALSE}
 
Bool_t fbTerminating {kFALSE}
 
Bool_t fbTerminateApplication {kFALSE}
 
Bool_t fbAppBlocking {kFALSE}
 
Bool_t fbAutoCreate {kFALSE}
 
Bool_t fbAutoStart {kFALSE}
 
Int_t fbBeingQuit {0}
 
TGo4AppControlTimerfxBlocker {nullptr}
 
TGo4ThreadHandlerfxWorkHandler {nullptr}
 

Detailed Description

Example class for a client application; this may be the analysis client later on which keeps the analysis class itself as aggregate and provides threads to work on analysis

Definition at line 29 of file TGo4ExampleClient.h.

Constructor & Destructor Documentation

◆ TGo4ExampleClient() [1/2]

TGo4ExampleClient::TGo4ExampleClient ( const char *  name,
const char *  host = "localhost",
UInt_t  negport = 0,
Bool_t  blockingmode = kTRUE 
)

◆ ~TGo4ExampleClient()

TGo4ExampleClient::~TGo4ExampleClient ( )
virtual

◆ TGo4ExampleClient() [2/2]

TGo4ExampleClient::TGo4ExampleClient ( )
private

Member Function Documentation

◆ CreateStatus()

TGo4TaskStatus * TGo4ExampleClient::CreateStatus ( )
overridevirtual

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. Overridden from superclass

Reimplemented from TGo4ClientTask.

Definition at line 57 of file TGo4ExampleClient.cxx.

References GO4TRACE, and UpdateStatus().

◆ GetApplication()

TGo4ExampleApplication * TGo4ExampleClient::GetApplication ( )

◆ Start()

void TGo4ExampleClient::Start ( )
overridevirtual

General start method of client application to be called from remote command; should be re-implemented by application

Reimplemented from TGo4Task.

Definition at line 85 of file TGo4ExampleClient.cxx.

References TGo4Log::Debug(), fcMainName, TGo4ThreadManager::fxWorkHandler, GO4TRACE, and TGo4ThreadHandler::Start().

◆ Stop()

void TGo4ExampleClient::Stop ( )
overridevirtual

General stop method of client application to be called from remote command; should be re-implemented by application

Reimplemented from TGo4Task.

Definition at line 76 of file TGo4ExampleClient.cxx.

References TGo4Log::Debug(), fcMainName, TGo4ThreadManager::fxWorkHandler, GO4TRACE, and TGo4ThreadHandler::Stop().

◆ UpdateStatus()

void TGo4ExampleClient::UpdateStatus ( TGo4TaskStatus state)
overrideprotectedvirtual

method needed by method CreateStatus of any status subclasses to set the values of the clienttask specific part of the status object.

Reimplemented from TGo4ClientTask.

Definition at line 65 of file TGo4ExampleClient.cxx.

References fcMainName, fcWatchName, GetApplication(), GetHistogram(), GO4TRACE, TGo4ExampleClientStatus::SetHistoStatus(), TGo4ExampleClientStatus::SetNames(), and TGo4ClientTask::UpdateStatus().

Referenced by CreateStatus().

Member Data Documentation

◆ fcMainName

TString TGo4ExampleClient::fcMainName
private

Remember name of main thread

Definition at line 80 of file TGo4ExampleClient.h.

Referenced by Start(), Stop(), TGo4ExampleClient(), and UpdateStatus().

◆ fcWatchName

TString TGo4ExampleClient::fcWatchName
private

Remember name of watch thread

Definition at line 83 of file TGo4ExampleClient.h.

Referenced by TGo4ExampleClient(), and UpdateStatus().

◆ fgcMAINTHREAD

const char * TGo4ExampleClient::fgcMAINTHREAD ="MAIN-"
static

Suffix for main thread name

Definition at line 46 of file TGo4ExampleClient.h.

Referenced by TGo4ExampleClient().

◆ fgcWATCHTHREAD

const char * TGo4ExampleClient::fgcWATCHTHREAD ="WATCH-"
static

Suffix for watch thread name

Definition at line 49 of file TGo4ExampleClient.h.

Referenced by TGo4ExampleClient().

◆ fxApplication

TGo4ExampleApplication* TGo4ExampleClient::fxApplication {nullptr}
private

The documentation for this class was generated from the following files: