GSI Object Oriented Online Offline (Go4)
GO4-5.3.2
|
#include <TGo4CommandRunnable.h>
Public Member Functions | |
TGo4CommandRunnable (const char *name, TGo4ThreadManager *man, TGo4TaskHandler *hand, Bool_t receivermode=kTRUE) | |
virtual | ~TGo4CommandRunnable () |
virtual Int_t | Run (void *ptr) |
Public Member Functions inherited from TGo4TaskHandlerRunnable | |
TGo4TaskHandlerRunnable (const char *name, TGo4ThreadManager *man, TGo4TaskHandler *hand, Bool_t receivermode=kTRUE) | |
virtual | ~TGo4TaskHandlerRunnable () |
TGo4TaskHandler * | GetTaskHandler () |
Public Member Functions inherited from TGo4Runnable | |
TGo4Runnable (const TGo4Runnable &right) | |
TGo4Runnable (const char *name, TGo4ThreadManager *man) | |
virtual | ~TGo4Runnable () |
void | SetThread (TGo4Thread *gthread) |
TGo4Thread * | GetThread () const |
TGo4ThreadManager * | GetThreadManager () const |
Private Member Functions | |
TGo4CommandRunnable () | |
void | RedirectIO () |
Private Attributes | |
TGo4CommandInvoker * | fxInvoker |
Additional Inherited Members | |
Protected Member Functions inherited from TGo4TaskHandlerRunnable | |
Bool_t | CheckStopBuffer (TBuffer *buf, Int_t *result=0) |
Bool_t | CheckTransportOpen () |
Protected Member Functions inherited from TGo4Runnable | |
TGo4Runnable () | |
virtual Int_t | PreRun (void *ptr) |
virtual Int_t | PostRun (void *ptr) |
virtual void | ThreadCatch (TGo4Exception &ex) |
virtual void | UnexpectedCatch () |
Protected Attributes inherited from TGo4TaskHandlerRunnable | |
TGo4Socket * | fxTransport |
TGo4TaskHandler * | fxTaskHandler |
Bool_t | fbReceiverMode |
TGo4BufferQueue * | fxBufferQueue |
Protected Attributes inherited from TGo4Runnable | |
TGo4ThreadManager * | fxManager |
TGo4Thread * | fxGo4Thread |
Runnable responsible for command exchange between transport (socket) and buffer (queue) In receiver mode, commands are received from transport, checked if sync or not, the command receiver of system (client) commands is set to the clienttask, sync commands are executed directly, async commands are passed to the queue in not receiver mode, runnables waits for the queue and sends all commands from the queue over the transport thread
Definition at line 33 of file TGo4CommandRunnable.h.
TGo4CommandRunnable::TGo4CommandRunnable | ( | const char * | name, |
TGo4ThreadManager * | man, | ||
TGo4TaskHandler * | hand, | ||
Bool_t | receivermode = kTRUE |
||
) |
Definition at line 33 of file TGo4CommandRunnable.cxx.
References TGo4TaskHandlerRunnable::fxBufferQueue, fxInvoker, TGo4TaskHandlerRunnable::fxTaskHandler, TGo4TaskHandlerRunnable::fxTransport, TGo4TaskHandler::GetCommandQueue(), TGo4TaskHandler::GetCommandTransport(), and TGo4CommandInvoker::Instance().
|
virtual |
Definition at line 43 of file TGo4CommandRunnable.cxx.
|
private |
|
private |
for error in socket: redirect std::cout/std::cerr to dummy buffer to avoid trouble if client is running in dying QProcess
Definition at line 203 of file TGo4CommandRunnable.cxx.
Referenced by Run().
|
virtual |
The working function which runs in the thread
Implements TGo4TaskHandlerRunnable.
Definition at line 47 of file TGo4CommandRunnable.cxx.
References TGo4BufferQueue::AddBuffer(), TGo4TaskHandlerRunnable::CheckStopBuffer(), TGo4TaskHandlerRunnable::CheckTransportOpen(), TGo4Log::Debug(), TGo4TaskHandlerRunnable::fbReceiverMode, TGo4BufferQueue::FreeBuffer(), TGo4TaskHandlerRunnable::fxBufferQueue, TGo4Runnable::fxManager, TGo4TaskHandlerRunnable::fxTaskHandler, TGo4TaskHandlerRunnable::fxTransport, TGo4TaskHandler::Get_fgcERROR(), TGo4TaskHandler::Get_fgcOK(), TGo4Socket::GetBuffer(), TGo4TaskHandler::GetRole(), TGo4Runnable::GetThread(), TGo4TaskHandler::IsClientMode(), TGo4SocketSignalHandler::IsLastSignalWINCH(), TGo4ThreadManager::IsTerminating(), kComCloseInput, kComKillMain, kComQuit, kComRestartMain, kGo4ComModeObserver, TGo4Task::KillMain(), TGo4Socket::ReceiveBuffer(), TGo4Socket::RecvRaw(), RedirectIO(), TGo4Task::RestartMain(), TGo4Socket::Send(), TGo4Socket::SendBuffer(), TGo4ThreadManager::SetBeingQuit(), TGo4SocketSignalHandler::SetLastSignal(), TGo4Thread::Stop(), TGo4Task::SubmitLocalCommand(), and TGo4BufferQueue::WaitBuffer().
|
private |
client mode: link to external (static) invoker singleton, that is used to execute the async commands before the command queue server mode: not used
Definition at line 54 of file TGo4CommandRunnable.h.
Referenced by TGo4CommandRunnable().