Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4ExampleServer Class Reference

example class for a server task that fits to the example application More...

#include <TGo4ExampleServer.h>

Inheritance diagram for TGo4ExampleServer:

TGo4ServerTask TGo4Task TGo4ThreadManager TGo4CommandReceiver List of all members.

Public Member Functions

 TGo4ExampleServer (const char *name, UInt_t negotiationport=0, Bool_t blockingmode=kFALSE)
virtual ~TGo4ExampleServer ()
TGo4ExampleControllerGetController ()
TGo4TaskHandlerCommandListCreateCommandList ()
 factory method for command list; overridden by implementation
virtual Int_t StartWorkThreads ()
 start the working threads of the task implementation; this method is used after the current connection has changed, to continue reading/writing the queues.
virtual Int_t StopWorkThreads ()
 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.

Static Public Attributes

static const Text_t fgcCONTROLTHREAD [] = "CONTROL-"
 suffix for controller thread name
static const Text_t fgcLOGGINGTHREAD [] = "LOGGER-"
 suffix for logging thread name

Private Member Functions

 TGo4ExampleServer ()

Private Attributes

TGo4ExampleControllerfxController
 1 0.
Text_t * fcControlName
 remember name of controller thread
Text_t * fcLoggingName
 remember name of logging thread

Detailed Description

example class for a server task that fits to the example application

Definition at line 27 of file TGo4ExampleServer.h.


Constructor & Destructor Documentation

TGo4ExampleServer::TGo4ExampleServer const char *  name,
UInt_t  negotiationport = 0,
Bool_t  blockingmode = kFALSE
 

Definition at line 49 of file TGo4ExampleServer.cxx.

References TGo4Log::Debug(), fcControlName, fcLoggingName, fgcCONTROLTHREAD, fgcLOGGINGTHREAD, TGo4ThreadManager::fguTEXTLENGTH, fxController, TGo4ThreadManager::fxWorkHandler, TGo4ThreadManager::Launch(), TGo4ThreadHandler::NewThread(), and TRACE.

TGo4ExampleServer::~TGo4ExampleServer  )  [virtual]
 

Definition at line 39 of file TGo4ExampleServer.cxx.

References TGo4ThreadHandler::CancelAll(), fcControlName, fcLoggingName, fxController, TGo4ThreadManager::fxWorkHandler, and TRACE.

TGo4ExampleServer::TGo4ExampleServer  )  [private]
 


Member Function Documentation

TGo4ExampleController * TGo4ExampleServer::GetController  ) 
 

Definition at line 33 of file TGo4ExampleServer.cxx.

References fxController, and TRACE.

Referenced by TGo4ControllerRunnable::TGo4ControllerRunnable(), and TGo4LoggingRunnable::TGo4LoggingRunnable().

TGo4TaskHandlerCommandList * TGo4ExampleServer::CreateCommandList  )  [virtual]
 

factory method for command list; overridden by implementation

Reimplemented from TGo4Task.

Definition at line 81 of file TGo4ExampleServer.cxx.

Int_t TGo4ExampleServer::StartWorkThreads  )  [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 120 of file TGo4ExampleServer.cxx.

References TGo4Log::Debug(), fcControlName, fcLoggingName, TGo4ThreadManager::GetWorkHandler(), TGo4ThreadHandler::Start(), and TGo4Task::StartWorkThreads().

Int_t TGo4ExampleServer::StopWorkThreads  )  [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 86 of file TGo4ExampleServer.cxx.

References TGo4BufferQueue::AddBufferFromObject(), TGo4Log::Debug(), fcControlName, fcLoggingName, TGo4ServerTask::GetDataQueue(), TGo4ServerTask::GetStatusQueue(), TGo4ThreadManager::GetWorkHandler(), TGo4ThreadHandler::Stop(), and TGo4Task::StopWorkThreads().


Member Data Documentation

const Text_t TGo4ExampleServer::fgcCONTROLTHREAD = "CONTROL-" [static]
 

suffix for controller thread name

Definition at line 32 of file TGo4ExampleServer.cxx.

Referenced by TGo4ExampleServer().

const Text_t TGo4ExampleServer::fgcLOGGINGTHREAD = "LOGGER-" [static]
 

suffix for logging thread name

Definition at line 31 of file TGo4ExampleServer.cxx.

Referenced by TGo4ExampleServer().

TGo4ExampleController* TGo4ExampleServer::fxController [private]
 

1 0.

.1

Definition at line 58 of file TGo4ExampleServer.h.

Referenced by GetController(), TGo4ExampleServer(), and ~TGo4ExampleServer().

Text_t* TGo4ExampleServer::fcControlName [private]
 

remember name of controller thread

Definition at line 61 of file TGo4ExampleServer.h.

Referenced by StartWorkThreads(), StopWorkThreads(), TGo4ExampleServer(), and ~TGo4ExampleServer().

Text_t* TGo4ExampleServer::fcLoggingName [private]
 

remember name of logging thread

Definition at line 64 of file TGo4ExampleServer.h.

Referenced by StartWorkThreads(), StopWorkThreads(), TGo4ExampleServer(), and ~TGo4ExampleServer().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 13:00:53 2008 for Go4-v3.04-1 by  doxygen 1.4.2