|
GSI Object Oriented Online Offline (Go4)
GO4-5.3.2
|
#include <TGo4ExampleServer.h>
Inheritance diagram for TGo4ExampleServer:Public Member Functions | |
| TGo4ExampleServer (const char *name, UInt_t negotiationport=0, Bool_t blockingmode=kFALSE) | |
| virtual | ~TGo4ExampleServer () |
| TGo4ExampleController * | GetController () |
| TGo4TaskHandlerCommandList * | CreateCommandList () |
| virtual Int_t | StartWorkThreads () |
| virtual Int_t | StopWorkThreads () |
Public Member Functions inherited from TGo4ServerTask | |
| TGo4ServerTask (const char *name, UInt_t negotiationport=0, Bool_t blockingmode=kFALSE, Bool_t standalone=kFALSE, Bool_t autostart=kTRUE, Bool_t autocreate=kTRUE, Bool_t ismaster=kTRUE) | |
| virtual | ~TGo4ServerTask () |
| virtual void | Quit () |
| void | Shutdown () |
| TGo4TaskManager * | GetTaskManager () |
| TGo4TaskHandler * | GetCurrentTaskHandler () |
| TGo4TaskHandler * | GetTaskHandler () |
| TGo4TaskHandler * | GetTaskHandler (const char *name) |
| TGo4BufferQueue * | GetCommandQueue (const char *task=0) |
| TGo4BufferQueue * | GetStatusQueue (const char *task=0) |
| TGo4BufferQueue * | GetDataQueue (const char *task=0) |
| virtual TGo4Command * | NextCommand () |
| virtual void | SendStatus (TGo4Status *stat, const char *receiver=0) |
| virtual void | SendStatusBuffer () |
| virtual Bool_t | StartConnectorThread () |
| virtual Bool_t | StopConnectorThread () |
| Bool_t | ConnectorThreadIsStopped () |
| void | SetCurrentTask (const char *name) |
| void | SetConnect (TGo4Socket *trans, const char *host, UInt_t port, Bool_t keepserv=kFALSE) |
| void | SetDisConnect (TGo4Socket *trans) |
| TGo4Socket * | GetConnectTransport () |
| const char * | GetConnectorName () const |
| const char * | GetConnectHost () const |
| virtual Int_t | TimerConnect () |
| virtual Int_t | RemoveAllClients (Bool_t force=false) |
| virtual Bool_t | RemoveClient (const char *name, Bool_t clientwait=kTRUE, Bool_t isterminating=kFALSE) |
| Bool_t | RemoveCurrentClient () |
| Int_t | WaitForOpen () |
| Int_t | WaitForClose () |
| Int_t | WaitForConnection () |
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 | Start () |
| virtual void | Stop () |
| virtual void | KillMain () |
| virtual void | RestartMain () |
| virtual void | Terminate (Bool_t termapp=kTRUE) |
| virtual void | TerminateFast () |
| virtual void | ExecuteString (const char *command) |
| Bool_t | IsMaster () |
| void | SetOwner (TGo4TaskOwner *owner) |
| void | AddUserCommand (TGo4Command *com) |
| void | AddUserCommandList (TGo4CommandProtoList *comlist) |
| TGo4Status * | NextStatus (Bool_t wait=kTRUE) |
| TObject * | NextObject (Bool_t wait=kTRUE) |
| void | SendObject (TObject *obj, const char *receiver=0) |
| TMutex * | GetStatusBufferMutex () |
| void | SendStatusMessage (Int_t level, Bool_t printout, const char *text,...) |
| void | UpdateStatusBuffer () |
| virtual Int_t | Initialization () |
| virtual TGo4TaskStatus * | CreateStatus () |
| Bool_t | SubmitCommand (const char *name) |
| Bool_t | SubmitEmergencyCommand (Go4EmergencyCommand_t val) |
| Bool_t | SubmitEmergencyData (Go4EmergencyCommand_t val, const char *receiver=0) |
| Bool_t | SubmitLocalCommand (TGo4Command *com) |
| Bool_t | SubmitCommand (TGo4Command *com) |
| TGo4Command * | MakeCommand (const char *name) |
| void | WakeCommandQueue (Int_t id=0) |
| Bool_t | IsWorkStopped () |
| virtual void | GetStatus () |
| const char * | GetCommanderName () const |
| TGo4Master * | GetMaster () |
| TGo4Slave * | GetSlave () |
| void | SendStopBuffers (const char *taskname=0) |
| 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) |
| TGo4ThreadHandler * | GetWorkHandler () 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 | |
| virtual | ~TGo4CommandReceiver () |
| TGo4CommandReceiver () | |
Static Public Attributes | |
| static const char * | fgcCONTROLTHREAD ="CONTROL-" |
| static const char * | fgcLOGGINGTHREAD ="LOGGER-" |
Static Public Attributes inherited from TGo4ThreadManager | |
| static const Long_t | fglTIMERPERIOD = 200 |
Private Member Functions | |
| TGo4ExampleServer () | |
Private Attributes | |
| TGo4ExampleController * | fxController |
| TString | fcControlName |
| TString | fcLoggingName |
Additional Inherited Members | |
Public Types inherited from TGo4ServerTask | |
| enum | ELaunchmodes { kSecureShell = BIT(0), kGuiEmbed = BIT(1) } |
Public Types inherited from TGo4ThreadManager | |
| enum | { fguTEXTLENGTH = 256 } |
Static Public Member Functions inherited from TGo4ServerTask | |
| static const char * | Get_fgcLAUNCHPREFSFILE () |
Static Public Member Functions inherited from TGo4Task | |
| static Int_t | Get_fgiTERMID () |
Protected Member Functions inherited from TGo4Task | |
| TGo4TaskHandlerCommandList * | GetPrototype () |
| virtual void | UpdateStatus (TGo4TaskStatus *state) |
| TGo4ObjectQueue * | GetLocalCommandQueue () |
| void | SetMaster (Bool_t on=kTRUE) |
| void | SetWorkIsStopped (Bool_t on) |
Protected Attributes inherited from TGo4Task | |
| TMutex * | fxStatusMutex |
| TBuffer * | fxStatusBuffer |
Protected Attributes inherited from TGo4ThreadManager | |
| Bool_t | fbInitDone |
| Bool_t | fbTerminating |
| Bool_t | fbTerminateApplication |
| Bool_t | fbAppBlocking |
| Bool_t | fbAutoCreate |
| Bool_t | fbAutoStart |
| Int_t | fbBeingQuit |
| TGo4AppControlTimer * | fxBlocker |
| TGo4ThreadHandler * | fxWorkHandler |
Static Protected Attributes inherited from TGo4ServerTask | |
| static const Int_t | fgiOPENWAITCYCLES =100 |
| static const UInt_t | fguOPENWAITCYCLETIME =100 |
| static const Int_t | fgiCLOSEWAITCYCLES =100 |
| static const UInt_t | fguCLOSEWAITCYCLETIME =100 |
| static const Int_t | fgiCONNECTWAITCYCLES =20 |
| static const UInt_t | fguCONNECTWAITCYCLETIME =200 |
| static const UInt_t | fguCONNECTTIMERPERIOD =100 |
| static const char * | fgcLAUNCHPREFSFILE = "etc/Go4LaunchPrefs.txt" |
example class for a server task that fits to the example application
Definition at line 25 of file TGo4ExampleServer.h.
| TGo4ExampleServer::TGo4ExampleServer | ( | const char * | name, |
| UInt_t | negotiationport = 0, |
||
| Bool_t | blockingmode = kFALSE |
||
| ) |
Definition at line 42 of file TGo4ExampleServer.cxx.
References TGo4Log::Debug(), fcControlName, fcLoggingName, fgcCONTROLTHREAD, fgcLOGGINGTHREAD, fxController, TGo4ThreadManager::fxWorkHandler, GO4TRACE, TGo4ThreadManager::Launch(), and TGo4ThreadHandler::NewThread().
|
virtual |
Definition at line 34 of file TGo4ExampleServer.cxx.
References TGo4ThreadHandler::CancelAll(), fxController, TGo4ThreadManager::fxWorkHandler, and GO4TRACE.
|
private |
|
virtual |
factory method for command list; overridden by implementation
Reimplemented from TGo4Task.
Definition at line 68 of file TGo4ExampleServer.cxx.
| TGo4ExampleController * TGo4ExampleServer::GetController | ( | ) |
Definition at line 28 of file TGo4ExampleServer.cxx.
References fxController, and GO4TRACE.
Referenced by TGo4ControllerRunnable::TGo4ControllerRunnable(), and TGo4LoggingRunnable::TGo4LoggingRunnable().
|
virtual |
start the working threads of the task implementation; this method is used after the current connection has changed, to continue reading/writing the queues. To be overridden by the derived task.
Reimplemented from TGo4Task.
Definition at line 107 of file TGo4ExampleServer.cxx.
References TGo4Log::Debug(), fcControlName, fcLoggingName, TGo4ThreadManager::GetWorkHandler(), TGo4ThreadHandler::Start(), and TGo4Task::StartWorkThreads().
|
virtual |
stop the working threads of the task implementation; this method is used before the current connection is changed to prevent reading/writing and waiting for the wrong queues. To be overridden by the derived task.
Reimplemented from TGo4Task.
Definition at line 73 of file TGo4ExampleServer.cxx.
References TGo4BufferQueue::AddBufferFromObject(), TGo4Log::Debug(), fcControlName, fcLoggingName, TGo4ServerTask::GetDataQueue(), TGo4ServerTask::GetStatusQueue(), TGo4ThreadManager::GetWorkHandler(), TGo4ThreadHandler::Stop(), and TGo4Task::StopWorkThreads().
|
private |
remember name of controller thread
Definition at line 59 of file TGo4ExampleServer.h.
Referenced by StartWorkThreads(), StopWorkThreads(), and TGo4ExampleServer().
|
private |
remember name of logging thread
Definition at line 62 of file TGo4ExampleServer.h.
Referenced by StartWorkThreads(), StopWorkThreads(), and TGo4ExampleServer().
|
static |
suffix for controller thread name
Definition at line 44 of file TGo4ExampleServer.h.
Referenced by TGo4ExampleServer().
|
static |
suffix for logging thread name
Definition at line 47 of file TGo4ExampleServer.h.
Referenced by TGo4ExampleServer().
|
private |
Definition at line 56 of file TGo4ExampleServer.h.
Referenced by GetController(), TGo4ExampleServer(), and ~TGo4ExampleServer().
1.8.8