GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
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. More...
#include <TGo4CommandRunnable.h>
Public Member Functions | |
TGo4CommandRunnable (const char *name, TGo4ThreadManager *man, TGo4TaskHandler *hand, Bool_t receivermode=kTRUE) | |
virtual | ~TGo4CommandRunnable () |
Int_t | Run (void *ptr) override |
The working function which runs in the thread. | |
![]() | |
TGo4TaskHandlerRunnable (const char *name, TGo4ThreadManager *man, TGo4TaskHandler *hand, Bool_t receivermode=kTRUE) | |
virtual | ~TGo4TaskHandlerRunnable () |
TGo4TaskHandler * | GetTaskHandler () |
![]() | |
TGo4Runnable (const char *name, TGo4ThreadManager *man) | |
TGo4Runnable (const TGo4Runnable &right) | |
virtual | ~TGo4Runnable () |
TGo4Thread * | GetThread () const |
TGo4ThreadManager * | GetThreadManager () const |
void | SetThread (TGo4Thread *gthread) |
Private Member Functions | |
TGo4CommandRunnable () | |
void | RedirectIO () |
for error in socket: redirect std::cout/std::cerr to dummy buffer to avoid trouble if client is running in dying QProcess | |
Private Attributes | |
TGo4CommandInvoker * | fxInvoker {nullptr} |
client mode: link to external (static) invoker singleton, that is used to execute the async commands before the command queue server mode: not used | |
Additional Inherited Members | |
![]() | |
Bool_t | CheckStopBuffer (TBuffer *buf, Int_t *result=nullptr) |
Test if buffer contains a message to stop this runnable. | |
Bool_t | CheckTransportOpen () |
Test if socket transport exists and is open. | |
![]() | |
TGo4Runnable () | |
virtual Int_t | PostRun (void *ptr) |
Function which is called once after the Run()method on threadstop. | |
virtual Int_t | PreRun (void *ptr) |
Function which is called once before the Run() method on threadstart. | |
virtual void | ThreadCatch (TGo4Exception &ex) |
catch for exceptions occurring in workfunc | |
virtual void | UnexpectedCatch () |
catch for all unexpected exceptions happening in workfunc | |
![]() | |
Bool_t | fbReceiverMode {kFALSE} |
flag indicating operation mode of runnable, depending on client or server mode of task handler | |
TGo4BufferQueue * | fxBufferQueue {nullptr} |
Link to external buffer queue. | |
TGo4TaskHandler * | fxTaskHandler {nullptr} |
link to external task handler (for server mode) 1 1 | |
TGo4Socket * | fxTransport {nullptr} |
link to external inter-tasl transport channel | |
![]() | |
TGo4Thread * | fxGo4Thread {nullptr} |
Backlink to thread which runs this. | |
TGo4ThreadManager * | fxManager {nullptr} |
The threadmanager which is responsible for our thread. | |
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.
Definition at line 33 of file TGo4CommandRunnable.h.
TGo4CommandRunnable::TGo4CommandRunnable | ( | const char * | name, |
TGo4ThreadManager * | man, | ||
TGo4TaskHandler * | hand, | ||
Bool_t | receivermode = kTRUE ) |
|
virtual |
Definition at line 41 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 199 of file TGo4CommandRunnable.cxx.
Referenced by Run().
|
overridevirtual |
The working function which runs in the thread.
Implements TGo4TaskHandlerRunnable.
Definition at line 45 of file TGo4CommandRunnable.cxx.
References TGo4TaskHandlerRunnable::CheckStopBuffer(), TGo4TaskHandlerRunnable::CheckTransportOpen(), TGo4Log::Debug(), TGo4TaskHandlerRunnable::fbReceiverMode, TGo4TaskHandlerRunnable::fxBufferQueue, TGo4Runnable::fxManager, TGo4TaskHandlerRunnable::fxTaskHandler, TGo4TaskHandlerRunnable::fxTransport, TGo4TaskHandler::Get_fgcERROR(), TGo4TaskHandler::Get_fgcOK(), TGo4Runnable::GetThread(), TGo4SocketSignalHandler::IsLastSignalWINCH(), kComAbortTask, kComCloseInput, kComKillMain, kComQuit, kComRestartMain, kGo4ComModeObserver, TGo4Task::KillMain(), RedirectIO(), TGo4Task::RestartMain(), TGo4SocketSignalHandler::SetLastSignal(), TGo4Thread::Stop(), and TGo4Task::SubmitLocalCommand().
|
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().