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

#include <TGo4TaskHandler.h>

+ Inheritance diagram for TGo4TaskHandler:

Public Member Functions

 TGo4TaskHandler (const char *name, TGo4ThreadManager *threadmanager, Bool_t clientmode=kFALSE, Bool_t mastermode=kTRUE, UInt_t negotiationport=0)
 
virtual ~TGo4TaskHandler ()
 
Bool_t ConnectServerChannel (const char *name, TGo4Socket *negotiator, TGo4Socket *channel, const char *host)
 
Bool_t ConnectClientChannel (const char *name, TGo4Socket *negotiator, TGo4Socket *channel, const char *host)
 
TGo4SocketServerRequest (const char *host="localhost")
 
Bool_t ServerLogin (TGo4Socket *connector, Go4CommandMode_t account)
 
Bool_t Connect (const char *host="localhost", TGo4Socket *negotiator=nullptr)
 
Bool_t DisConnect (Bool_t waitforclient=kTRUE)
 
TGo4ThreadManagerGetThreadManager () const
 
Int_t WaitGetPort (TGo4Socket *sock)
 
void SetNegotiationPort (UInt_t port)
 
TGo4SocketGetCommandTransport () const
 
TGo4SocketGetStatusTransport () const
 
TGo4SocketGetDataTransport () const
 
TGo4QueueGetCommandQueue () const
 
TGo4QueueGetStatusQueue () const
 
TGo4QueueGetDataQueue () const
 
const char * GetHostName () const
 
const char * GetComName () const
 
const char * GetDatName () const
 
const char * GetStatName () const
 
Int_t GetComPort () const
 
Int_t GetDatPort () const
 
Int_t GetStatPort () const
 
Go4CommandMode_t GetRole ()
 
void SetRole (Go4CommandMode_t role)
 
TGo4CommandInvokerGetInvoker () const
 
Bool_t IsClientMode () const
 
Bool_t IsMasterMode () const
 
void SetAborting (Bool_t isaborting=kTRUE)
 
Bool_t IsAborting () const
 
void SetInvoker (TGo4CommandInvoker *inv)
 
virtual TGo4TaskHandlerStatusCreateStatus ()
 
Bool_t StopTransportThreads (Bool_t wait=kTRUE)
 
void StartTransportThreads ()
 
Bool_t WaitThreadStop (const char *name)
 
void CloseChannels (Option_t *opt="")
 
void ClearQueues ()
 

Static Public Member Functions

static void SetAdminAccount (const char *name, const char *passwd)
 
static void SetCtrlAccount (const char *name, const char *passwd)
 
static void SetObservAccount (const char *name, const char *passwd)
 
static const char * Get_fgcOK ()
 
static const char * Get_fgcERROR ()
 
static UInt_t Get_fguPORTWAITTIME ()
 
static Int_t Get_fgiPORTWAITCYCLES ()
 

Static Protected Attributes

static const UInt_t fguCONNECTORPORT =5000
 
static const Int_t fgiTHREADSTOPCYCLES =6
 
static const UInt_t fguTHREADSTOPTIME =500
 
static const UInt_t fguTRANSPORTCHECKDELAY =5000
 
static const UInt_t fguSTATUSQUEUESIZE =1000
 
static const UInt_t fguDATAQUEUESIZE =1000
 
static const UInt_t fguCOMMANDQUEUESIZE =1000
 
static const char * fgcCONNECT ="CONNECT-VERSION-300"
 
static const char * fgcDISCONNECT ="DISCONNECT-VERSION-300"
 
static const char * fgcMASTER ="Master-VERSION-300"
 
static const char * fgcSLAVE ="Slave-VERSION-300"
 
static const char * fgcCOMMANDTHREAD ="COMMAND-"
 
static const char * fgcSTATUSTHREAD ="STATUS-"
 
static const char * fgcDATATHREAD ="DATA-"
 

Private Member Functions

 TGo4TaskHandler ()
 

Private Attributes

Bool_t fbClientMode {kFALSE}
 
Bool_t fbMasterMode {kFALSE}
 
Bool_t fbIsAborting {kFALSE}
 
TGo4ThreadManagerfxThreadManager {nullptr}
 
TGo4ThreadHandlerfxThreadHandler {nullptr}
 
TGo4CommandInvokerfxInvoker {nullptr}
 
TGo4QueuefxCommandQueue {nullptr}
 
TGo4QueuefxStatusQueue {nullptr}
 
TGo4QueuefxDataQueue {nullptr}
 
TGo4SocketfxCommandTransport {nullptr}
 
TGo4SocketfxStatusTransport {nullptr}
 
TGo4SocketfxDataTransport {nullptr}
 
TString fxComName
 
TString fxStatName
 
TString fxDatName
 
TString fxHostName
 
UInt_t fuNegPort {0}
 
Int_t fiComPort {0}
 
Int_t fiStatPort {0}
 
Int_t fiDatPort {0}
 
Go4CommandMode_t fiRole
 
TGo4StatusRunnablefxStatusRun {nullptr}
 
TGo4DataRunnablefxDataRun {nullptr}
 
TGo4CommandRunnablefxCommandRun {nullptr}
 

Static Private Attributes

static TNamed fgxADMINISTRATORACCOUNT
 
static TNamed fgxOBSERVERACCOUNT
 
static TNamed fgxCONTROLLERACCOUNT
 
static const char * fgcERROR = "ERROR-VERSION-300"
 
static const char * fgcOK = "OK-VERSION-300"
 
static const UInt_t fguPORTWAITTIME =200
 
static const Int_t fgiPORTWAITCYCLES =150
 

Friends

class TGo4TaskManager
 

Detailed Description

This class is responsible for the interconnection of two tasks: provided are three communication channels (data, command, status), one thread runnable is acting on each transport channel (e.g. socket); one queue (buffer) is assigned to each channel depending on client or server mode of the task handler, the threads get objects from transporl and put them into the queue, or vice versa. (servertask sends commands, but receives data and status objects) taskhander is named such that it can be found in a list (i.e. task manager) by the server task which may serve more than one client tasks

Definition at line 42 of file TGo4TaskHandler.h.

Constructor & Destructor Documentation

◆ TGo4TaskHandler() [1/2]

TGo4TaskHandler::TGo4TaskHandler ( const char *  name,
TGo4ThreadManager threadmanager,
Bool_t  clientmode = kFALSE,
Bool_t  mastermode = kTRUE,
UInt_t  negotiationport = 0 
)

◆ ~TGo4TaskHandler()

TGo4TaskHandler::~TGo4TaskHandler ( )
virtual

◆ TGo4TaskHandler() [2/2]

TGo4TaskHandler::TGo4TaskHandler ( )
private

Member Function Documentation

◆ ClearQueues()

void TGo4TaskHandler::ClearQueues ( )

Clear all entries of queues.

Definition at line 411 of file TGo4TaskHandler.cxx.

References TGo4Queue::Clear(), fxCommandQueue, fxDataQueue, and fxStatusQueue.

Referenced by CloseChannels(), TGo4ClientTask::ConnectServer(), and SetInvoker().

◆ CloseChannels()

void TGo4TaskHandler::CloseChannels ( Option_t *  opt = "")

Close transport channels and clear queues. Option may indicate root TSocket Close option, e.g. "force" to force socket close

Definition at line 385 of file TGo4TaskHandler.cxx.

References ClearQueues(), TGo4Socket::Close(), fxCommandTransport, fxDataTransport, and fxStatusTransport.

Referenced by DisConnect(), and SetInvoker().

◆ Connect()

Bool_t TGo4TaskHandler::Connect ( const char *  host = "localhost",
TGo4Socket negotiator = nullptr 
)

◆ ConnectClientChannel()

Bool_t TGo4TaskHandler::ConnectClientChannel ( const char *  name,
TGo4Socket negotiator,
TGo4Socket channel,
const char *  host 
)

method defining the connection protocol of one data transport channel (data, status, or command). For client socket mode (used by taskhandler)

Definition at line 507 of file TGo4TaskHandler.cxx.

References TGo4Log::Debug(), fgcOK, TGo4Socket::IsOpen(), TGo4Socket::Open(), TGo4Socket::RecvRaw(), and TGo4Socket::Send().

Referenced by Connect().

◆ ConnectServerChannel()

Bool_t TGo4TaskHandler::ConnectServerChannel ( const char *  name,
TGo4Socket negotiator,
TGo4Socket channel,
const char *  host 
)

Method defining the connection protocol of one data transport channel (data, status, or command). For server socket mode (used by taskmanager)

Definition at line 431 of file TGo4TaskHandler.cxx.

References TGo4Log::Debug(), fgcOK, fxThreadManager, TGo4Socket::IsOpen(), TGo4Socket::RecvRaw(), TGo4Socket::Send(), TGo4ServerTask::SetConnect(), TGo4ServerTask::WaitForConnection(), TGo4ServerTask::WaitForOpen(), and WaitGetPort().

Referenced by Connect().

◆ CreateStatus()

TGo4TaskHandlerStatus * TGo4TaskHandler::CreateStatus ( )
virtual

create a status object with information on the current taskhandler state. this object may be sent to the server or may be used to restore current status by memento mechanism

Definition at line 419 of file TGo4TaskHandler.cxx.

References fbIsAborting, fiComPort, fiDatPort, fiStatPort, fuNegPort, GetComName(), GetDatName(), GetHostName(), GetStatName(), TGo4TaskHandlerStatus::SetFlags(), TGo4TaskHandlerStatus::SetNames(), and TGo4TaskHandlerStatus::SetPorts().

Referenced by SetInvoker(), and TGo4Task::UpdateStatus().

◆ DisConnect()

Bool_t TGo4TaskHandler::DisConnect ( Bool_t  waitforclient = kTRUE)

Closes the connections of all three transport channels. Argument waitforclient specifies if server shall wait for client handshake over negotiation channel before shutting down the sockets.

Definition at line 326 of file TGo4TaskHandler.cxx.

References TGo4Socket::Close(), CloseChannels(), TGo4Log::Debug(), fbClientMode, fgcDISCONNECT, fgcOK, GetHostName(), IsAborting(), TGo4Socket::Send(), ServerRequest(), and StopTransportThreads().

Referenced by TGo4TaskManager::DisConnectClient(), and TGo4ClientTask::DisconnectServer().

◆ Get_fgcERROR()

const char * TGo4TaskHandler::Get_fgcERROR ( )
static

◆ Get_fgcOK()

const char * TGo4TaskHandler::Get_fgcOK ( )
static

◆ Get_fgiPORTWAITCYCLES()

Int_t TGo4TaskHandler::Get_fgiPORTWAITCYCLES ( )
static

◆ Get_fguPORTWAITTIME()

UInt_t TGo4TaskHandler::Get_fguPORTWAITTIME ( )
static

◆ GetCommandQueue()

TGo4Queue* TGo4TaskHandler::GetCommandQueue ( ) const
inline

◆ GetCommandTransport()

TGo4Socket* TGo4TaskHandler::GetCommandTransport ( ) const
inline

Definition at line 103 of file TGo4TaskHandler.h.

References fxCommandTransport.

Referenced by TGo4CommandRunnable::TGo4CommandRunnable().

◆ GetComName()

const char* TGo4TaskHandler::GetComName ( ) const
inline

◆ GetComPort()

Int_t TGo4TaskHandler::GetComPort ( ) const
inline

Definition at line 123 of file TGo4TaskHandler.h.

References fiComPort.

Referenced by TGo4TaskManager::AddClient().

◆ GetDataQueue()

TGo4Queue* TGo4TaskHandler::GetDataQueue ( ) const
inline

◆ GetDataTransport()

TGo4Socket* TGo4TaskHandler::GetDataTransport ( ) const
inline

Definition at line 107 of file TGo4TaskHandler.h.

References fxDataTransport.

Referenced by TGo4DataRunnable::TGo4DataRunnable().

◆ GetDatName()

const char* TGo4TaskHandler::GetDatName ( ) const
inline

◆ GetDatPort()

Int_t TGo4TaskHandler::GetDatPort ( ) const
inline

Definition at line 125 of file TGo4TaskHandler.h.

References fiDatPort.

Referenced by TGo4TaskManager::AddClient().

◆ GetHostName()

const char* TGo4TaskHandler::GetHostName ( ) const
inline

Definition at line 115 of file TGo4TaskHandler.h.

References fxHostName.

Referenced by CreateStatus(), and DisConnect().

◆ GetInvoker()

TGo4CommandInvoker* TGo4TaskHandler::GetInvoker ( ) const
inline

returns pointer to copy of client invoker which may be used by server to check the valid command clients

Definition at line 136 of file TGo4TaskHandler.h.

References fxInvoker.

◆ GetRole()

Go4CommandMode_t TGo4TaskHandler::GetRole ( )
inline

◆ GetStatName()

const char* TGo4TaskHandler::GetStatName ( ) const
inline

◆ GetStatPort()

Int_t TGo4TaskHandler::GetStatPort ( ) const
inline

Definition at line 127 of file TGo4TaskHandler.h.

References fiStatPort.

Referenced by TGo4TaskManager::AddClient().

◆ GetStatusQueue()

TGo4Queue* TGo4TaskHandler::GetStatusQueue ( ) const
inline

◆ GetStatusTransport()

TGo4Socket* TGo4TaskHandler::GetStatusTransport ( ) const
inline

Definition at line 105 of file TGo4TaskHandler.h.

References fxStatusTransport.

Referenced by TGo4StatusRunnable::TGo4StatusRunnable().

◆ GetThreadManager()

TGo4ThreadManager* TGo4TaskHandler::GetThreadManager ( ) const
inline

Definition at line 87 of file TGo4TaskHandler.h.

References fxThreadManager, and WaitGetPort().

Referenced by TGo4TaskHandlerException::TGo4TaskHandlerException().

◆ IsAborting()

Bool_t TGo4TaskHandler::IsAborting ( ) const
inline

Check whether this instance is currently being aborted

Definition at line 151 of file TGo4TaskHandler.h.

References fbIsAborting.

Referenced by DisConnect(), TGo4TaskHandlerAbortException::Handle(), TGo4Task::SendStopBuffers(), and TGo4Task::WakeCommandQueue().

◆ IsClientMode()

Bool_t TGo4TaskHandler::IsClientMode ( ) const
inline

Check whether this instance is client or server taskhandler

Definition at line 139 of file TGo4TaskHandler.h.

References fbClientMode.

Referenced by TGo4TaskHandlerAbortException::Handle(), TGo4CommandRunnable::Run(), and TGo4TaskHandler().

◆ IsMasterMode()

Bool_t TGo4TaskHandler::IsMasterMode ( ) const
inline

Check whether this instance is client or server taskhandler

Definition at line 142 of file TGo4TaskHandler.h.

References fbMasterMode.

Referenced by StopTransportThreads(), and TGo4TaskHandler().

◆ ServerLogin()

Bool_t TGo4TaskHandler::ServerLogin ( TGo4Socket connector,
Go4CommandMode_t  account 
)

◆ ServerRequest()

TGo4Socket * TGo4TaskHandler::ServerRequest ( const char *  host = "localhost")

request to server at host to connect or disconnect us, returns negotiation channel

Definition at line 145 of file TGo4TaskHandler.cxx.

References TGo4Socket::Close(), TGo4Log::Debug(), fbClientMode, fuNegPort, fxThreadManager, Get_fgcERROR(), GetRole(), TGo4Socket::Open(), TGo4Socket::Send(), and ServerLogin().

Referenced by Connect(), and DisConnect().

◆ SetAborting()

void TGo4TaskHandler::SetAborting ( Bool_t  isaborting = kTRUE)
inline

sets the internal aborting state of this taskhandler instance; will be checked before an exception tries to cancel this taskhandler

Definition at line 148 of file TGo4TaskHandler.h.

References fbIsAborting.

Referenced by Connect(), and TGo4TaskHandlerAbortException::Handle().

◆ SetAdminAccount()

void TGo4TaskHandler::SetAdminAccount ( const char *  name,
const char *  passwd 
)
static

Specify login name and password for administrator account. This is used when client requests for a server connection. For multiple master clients at a slave server, there can be only one controller, but many observers with restricted command rights.

Definition at line 618 of file TGo4TaskHandler.cxx.

References fgxADMINISTRATORACCOUNT.

Referenced by TGo4ClientTask::ConnectServer(), TGo4AnalysisClient::Constructor(), and SetInvoker().

◆ SetCtrlAccount()

void TGo4TaskHandler::SetCtrlAccount ( const char *  name,
const char *  passwd 
)
static

Specify login name and password for controller account. This is used when client requests for a server connection. For multiple master clients at a slave server, there can be only one controller. Master server at slave client has always controller role.

Definition at line 624 of file TGo4TaskHandler.cxx.

References fgxCONTROLLERACCOUNT.

Referenced by TGo4ClientTask::ConnectServer(), TGo4AnalysisClient::Constructor(), and SetInvoker().

◆ SetInvoker()

void TGo4TaskHandler::SetInvoker ( TGo4CommandInvoker inv)
inline

sets pointer to client invoker which may be used by server to check the valid command clients

Definition at line 157 of file TGo4TaskHandler.h.

References ClearQueues(), CloseChannels(), CreateStatus(), fxInvoker, Get_fgcERROR(), Get_fgcOK(), Get_fgiPORTWAITCYCLES(), Get_fguPORTWAITTIME(), SetAdminAccount(), SetCtrlAccount(), SetObservAccount(), StartTransportThreads(), StopTransportThreads(), and WaitThreadStop().

◆ SetNegotiationPort()

void TGo4TaskHandler::SetNegotiationPort ( UInt_t  port)
inline

Set port for the negotiation channel (client mode). Required if connection should be done on different port after taskhandler was created.

Definition at line 101 of file TGo4TaskHandler.h.

References fuNegPort.

Referenced by TGo4ClientTask::ConnectServer().

◆ SetObservAccount()

void TGo4TaskHandler::SetObservAccount ( const char *  name,
const char *  passwd 
)
static

Specify login name and password for observer account. This is used when client requests for a server connection. For multiple master clients at a slave server, there can be only one controller, but many observers with restricted command rights.

Definition at line 630 of file TGo4TaskHandler.cxx.

References fgxOBSERVERACCOUNT.

Referenced by TGo4ClientTask::ConnectServer(), TGo4AnalysisClient::Constructor(), and SetInvoker().

◆ SetRole()

void TGo4TaskHandler::SetRole ( Go4CommandMode_t  role)
inline

Definition at line 130 of file TGo4TaskHandler.h.

References fiRole.

Referenced by TGo4TaskManager::AddClient(), and TGo4ClientTask::ConnectServer().

◆ StartTransportThreads()

void TGo4TaskHandler::StartTransportThreads ( )

Start all transport threads of this taskhandler (command, data, status).

Definition at line 570 of file TGo4TaskHandler.cxx.

References fxThreadHandler, GetComName(), GetDatName(), GetStatName(), and TGo4ThreadHandler::Start().

Referenced by Connect(), and SetInvoker().

◆ StopTransportThreads()

Bool_t TGo4TaskHandler::StopTransportThreads ( Bool_t  wait = kTRUE)

Stop all transport threads of this taskhandler (command, data, status). If wait is true, wait until threads are really stopped before return. If not all threads were stopped within defined stoptime and waitcycles, return value is false.

Definition at line 577 of file TGo4TaskHandler.cxx.

References fxThreadHandler, GetCommandQueue(), GetComName(), GetDatName(), GetStatName(), IsMasterMode(), TGo4ThreadHandler::Stop(), WaitThreadStop(), and TGo4Queue::Wake().

Referenced by DisConnect(), and SetInvoker().

◆ WaitGetPort()

Int_t TGo4TaskHandler::WaitGetPort ( TGo4Socket sock)

Get actual local port number of specified Go4 socket. Method polls until the port number is not zero, i.e. the created server socket has been bound to that number. Used by the Connect protocol to find out server port before sending it to the client.

Definition at line 545 of file TGo4TaskHandler.cxx.

References fgiPORTWAITCYCLES, fguPORTWAITTIME, fxThreadManager, TGo4Socket::GetPort(), TGo4ThreadManager::IsTerminating(), and TGo4Thread::Sleep().

Referenced by Connect(), ConnectServerChannel(), and GetThreadManager().

◆ WaitThreadStop()

Bool_t TGo4TaskHandler::WaitThreadStop ( const char *  name)

Wait for the thread of name to be stopped. Returns false if thread has not reached stopped state within the defined stoptime and cycles.

Definition at line 598 of file TGo4TaskHandler.cxx.

References TGo4Log::Debug(), fgiTHREADSTOPCYCLES, fguTHREADSTOPTIME, fxThreadHandler, TGo4ThreadHandler::GetThread(), TGo4Thread::IsWaiting(), and TGo4Thread::Sleep().

Referenced by SetInvoker(), and StopTransportThreads().

Friends And Related Function Documentation

◆ TGo4TaskManager

friend class TGo4TaskManager
friend

Definition at line 46 of file TGo4TaskHandler.h.

Member Data Documentation

◆ fbClientMode

Bool_t TGo4TaskHandler::fbClientMode {kFALSE}
private

True if taskhandler runs in client mode

Definition at line 303 of file TGo4TaskHandler.h.

Referenced by Connect(), DisConnect(), IsClientMode(), ServerRequest(), and TGo4TaskHandler().

◆ fbIsAborting

Bool_t TGo4TaskHandler::fbIsAborting {kFALSE}
private

True if taskhandler is being aborted e.g. by remove exception

Definition at line 309 of file TGo4TaskHandler.h.

Referenced by CreateStatus(), IsAborting(), and SetAborting().

◆ fbMasterMode

Bool_t TGo4TaskHandler::fbMasterMode {kFALSE}
private

True if taskhandler runs in master mode (sends commands, receives data and status). Otherwise false.

Definition at line 306 of file TGo4TaskHandler.h.

Referenced by IsMasterMode(), ServerLogin(), and TGo4TaskHandler().

◆ fgcCOMMANDTHREAD

const char * TGo4TaskHandler::fgcCOMMANDTHREAD ="COMMAND-"
staticprotected

Suffix for command thread name

Definition at line 260 of file TGo4TaskHandler.h.

Referenced by TGo4TaskHandler().

◆ fgcCONNECT

const char * TGo4TaskHandler::fgcCONNECT ="CONNECT-VERSION-300"
staticprotected

Initial string for connect request (raw transport)

Definition at line 248 of file TGo4TaskHandler.h.

Referenced by Connect(), and TGo4TaskManager::ServeClient().

◆ fgcDATATHREAD

const char * TGo4TaskHandler::fgcDATATHREAD ="DATA-"
staticprotected

Suffix for data thread name

Definition at line 266 of file TGo4TaskHandler.h.

Referenced by TGo4TaskHandler().

◆ fgcDISCONNECT

const char * TGo4TaskHandler::fgcDISCONNECT ="DISCONNECT-VERSION-300"
staticprotected

Initial string for disconnect request (raw transport)

Definition at line 251 of file TGo4TaskHandler.h.

Referenced by DisConnect(), and TGo4TaskManager::ServeClient().

◆ fgcERROR

const char * TGo4TaskHandler::fgcERROR = "ERROR-VERSION-300"
staticprivate

Error string for client connect negotiations (raw transport)

Definition at line 291 of file TGo4TaskHandler.h.

Referenced by Get_fgcERROR().

◆ fgcMASTER

const char * TGo4TaskHandler::fgcMASTER ="Master-VERSION-300"
staticprotected

Task identifier for client connect negotiations (raw transport)

Definition at line 254 of file TGo4TaskHandler.h.

Referenced by TGo4TaskManager::ClientLogin(), and ServerLogin().

◆ fgcOK

const char * TGo4TaskHandler::fgcOK = "OK-VERSION-300"
staticprivate

Ok string for client connect negotiations (raw transport)

Definition at line 294 of file TGo4TaskHandler.h.

Referenced by Connect(), ConnectClientChannel(), ConnectServerChannel(), DisConnect(), Get_fgcOK(), and ServerLogin().

◆ fgcSLAVE

const char * TGo4TaskHandler::fgcSLAVE ="Slave-VERSION-300"
staticprotected

Task identifier for client connect negotiations (raw transport)

Definition at line 257 of file TGo4TaskHandler.h.

Referenced by TGo4TaskManager::ClientLogin(), and ServerLogin().

◆ fgcSTATUSTHREAD

const char * TGo4TaskHandler::fgcSTATUSTHREAD ="STATUS-"
staticprotected

Suffix for status thread name

Definition at line 263 of file TGo4TaskHandler.h.

Referenced by TGo4TaskHandler().

◆ fgiPORTWAITCYCLES

const Int_t TGo4TaskHandler::fgiPORTWAITCYCLES =150
staticprivate

Cycles to wait for a nonzero portnumber

Definition at line 300 of file TGo4TaskHandler.h.

Referenced by Get_fgiPORTWAITCYCLES(), and WaitGetPort().

◆ fgiTHREADSTOPCYCLES

const Int_t TGo4TaskHandler::fgiTHREADSTOPCYCLES =6
staticprotected

cycles to wait for taskhandler thread stop on disconnection

Definition at line 230 of file TGo4TaskHandler.h.

Referenced by WaitThreadStop().

◆ fguCOMMANDQUEUESIZE

const UInt_t TGo4TaskHandler::fguCOMMANDQUEUESIZE =1000
staticprotected

Maximum entries allowed for command queue

Definition at line 245 of file TGo4TaskHandler.h.

Referenced by TGo4TaskHandler().

◆ fguCONNECTORPORT

const UInt_t TGo4TaskHandler::fguCONNECTORPORT =5000
staticprotected

Default port number of negotiation connection (raw transport)

Definition at line 227 of file TGo4TaskHandler.h.

Referenced by TGo4TaskHandler(), and TGo4TaskManager::TGo4TaskManager().

◆ fguDATAQUEUESIZE

const UInt_t TGo4TaskHandler::fguDATAQUEUESIZE =1000
staticprotected

Maximum entries allowed for data queue

Definition at line 242 of file TGo4TaskHandler.h.

Referenced by TGo4TaskHandler().

◆ fguPORTWAITTIME

const UInt_t TGo4TaskHandler::fguPORTWAITTIME =200
staticprivate

Time for each waitgetport cycle

Definition at line 297 of file TGo4TaskHandler.h.

Referenced by Get_fguPORTWAITTIME(), and WaitGetPort().

◆ fguSTATUSQUEUESIZE

const UInt_t TGo4TaskHandler::fguSTATUSQUEUESIZE =1000
staticprotected

Maximum entries allowed for status queue

Definition at line 239 of file TGo4TaskHandler.h.

Referenced by TGo4TaskHandler().

◆ fguTHREADSTOPTIME

const UInt_t TGo4TaskHandler::fguTHREADSTOPTIME =500
staticprotected

time for each threadstop wait cycle

Definition at line 233 of file TGo4TaskHandler.h.

Referenced by WaitThreadStop().

◆ fguTRANSPORTCHECKDELAY

const UInt_t TGo4TaskHandler::fguTRANSPORTCHECKDELAY =5000
staticprotected

Delay time (ms) to wait between two checks of transport connection

Definition at line 236 of file TGo4TaskHandler.h.

◆ fgxADMINISTRATORACCOUNT

TNamed TGo4TaskHandler::fgxADMINISTRATORACCOUNT
staticprivate

This keeps account for admin connection. Name is accountname, title is password. May be set from outside by public methods SetObservAccount and SetObservPasswd. Later we might keep this with encryption...

Definition at line 276 of file TGo4TaskHandler.h.

Referenced by TGo4TaskManager::ClientLogin(), ServerLogin(), and SetAdminAccount().

◆ fgxCONTROLLERACCOUNT

TNamed TGo4TaskHandler::fgxCONTROLLERACCOUNT
staticprivate

This keeps account for controller connection. Name is accountname, title is password. May be set from outside by public methods SetCtrlAccount and SetCtrlPasswd. Later we might keep this with encryption...

Definition at line 288 of file TGo4TaskHandler.h.

Referenced by TGo4TaskManager::ClientLogin(), ServerLogin(), and SetCtrlAccount().

◆ fgxOBSERVERACCOUNT

TNamed TGo4TaskHandler::fgxOBSERVERACCOUNT
staticprivate

This keeps account for observer connection. Name is accountname, title is password. May be set from outside by public methods SetObservAccount and SetObservPasswd. Later we might keep this with encryption...

Definition at line 282 of file TGo4TaskHandler.h.

Referenced by TGo4TaskManager::ClientLogin(), ServerLogin(), and SetObservAccount().

◆ fiComPort

Int_t TGo4TaskHandler::fiComPort {0}
private

Command connection port number

Definition at line 351 of file TGo4TaskHandler.h.

Referenced by Connect(), CreateStatus(), and GetComPort().

◆ fiDatPort

Int_t TGo4TaskHandler::fiDatPort {0}
private

Data connection port number

Definition at line 357 of file TGo4TaskHandler.h.

Referenced by Connect(), CreateStatus(), and GetDatPort().

◆ fiRole

Go4CommandMode_t TGo4TaskHandler::fiRole
private

For server connection to client: This indicates role of connected client, if client is master. Depending on role, some actions may be forbidden. Role is equivalent to allowed command execution mode.

Definition at line 363 of file TGo4TaskHandler.h.

Referenced by GetRole(), and SetRole().

◆ fiStatPort

Int_t TGo4TaskHandler::fiStatPort {0}
private

Status connection port number

Definition at line 354 of file TGo4TaskHandler.h.

Referenced by Connect(), CreateStatus(), and GetStatPort().

◆ fuNegPort

UInt_t TGo4TaskHandler::fuNegPort {0}
private

Actual port number of negotiation connection (raw transport)

Definition at line 348 of file TGo4TaskHandler.h.

Referenced by CreateStatus(), ServerRequest(), SetNegotiationPort(), and TGo4TaskHandler().

◆ fxCommandQueue

TGo4Queue* TGo4TaskHandler::fxCommandQueue {nullptr}
private

Buffers (queues) for the three transport channels:

Definition at line 326 of file TGo4TaskHandler.h.

Referenced by ClearQueues(), GetCommandQueue(), TGo4TaskHandler(), and ~TGo4TaskHandler().

◆ fxCommandRun

TGo4CommandRunnable* TGo4TaskHandler::fxCommandRun {nullptr}
private

link to command runnable which is managed by thread handler 1 1

Definition at line 378 of file TGo4TaskHandler.h.

Referenced by TGo4TaskHandler().

◆ fxCommandTransport

TGo4Socket* TGo4TaskHandler::fxCommandTransport {nullptr}
private

Transport channels (e.g. sockets) for command, status, data

Definition at line 331 of file TGo4TaskHandler.h.

Referenced by CloseChannels(), Connect(), GetCommandTransport(), TGo4TaskHandler(), and ~TGo4TaskHandler().

◆ fxComName

TString TGo4TaskHandler::fxComName
private

Remember name of command thread

Definition at line 336 of file TGo4TaskHandler.h.

Referenced by GetComName(), and TGo4TaskHandler().

◆ fxDataQueue

TGo4Queue* TGo4TaskHandler::fxDataQueue {nullptr}
private

Definition at line 328 of file TGo4TaskHandler.h.

Referenced by ClearQueues(), GetDataQueue(), TGo4TaskHandler(), and ~TGo4TaskHandler().

◆ fxDataRun

TGo4DataRunnable* TGo4TaskHandler::fxDataRun {nullptr}
private

link to data runnable which is managed by thread handler 1 1

Definition at line 373 of file TGo4TaskHandler.h.

Referenced by TGo4TaskHandler().

◆ fxDataTransport

TGo4Socket* TGo4TaskHandler::fxDataTransport {nullptr}
private

◆ fxDatName

TString TGo4TaskHandler::fxDatName
private

Remember name of data thread

Definition at line 342 of file TGo4TaskHandler.h.

Referenced by GetDatName(), and TGo4TaskHandler().

◆ fxHostName

TString TGo4TaskHandler::fxHostName
private

Remember name of remote task handler

Definition at line 345 of file TGo4TaskHandler.h.

Referenced by Connect(), and GetHostName().

◆ fxInvoker

TGo4CommandInvoker* TGo4TaskHandler::fxInvoker {nullptr}
private

Link to external command invoker instance used for direct command in client mode:

Definition at line 323 of file TGo4TaskHandler.h.

Referenced by GetInvoker(), SetInvoker(), and TGo4TaskHandler().

◆ fxStatName

TString TGo4TaskHandler::fxStatName
private

Remember name of status thread

Definition at line 339 of file TGo4TaskHandler.h.

Referenced by GetStatName(), and TGo4TaskHandler().

◆ fxStatusQueue

TGo4Queue* TGo4TaskHandler::fxStatusQueue {nullptr}
private

Definition at line 327 of file TGo4TaskHandler.h.

Referenced by ClearQueues(), GetStatusQueue(), TGo4TaskHandler(), and ~TGo4TaskHandler().

◆ fxStatusRun

TGo4StatusRunnable* TGo4TaskHandler::fxStatusRun {nullptr}
private

link to status runnable which is managed by thread handler 1 1

Definition at line 368 of file TGo4TaskHandler.h.

Referenced by TGo4TaskHandler().

◆ fxStatusTransport

TGo4Socket* TGo4TaskHandler::fxStatusTransport {nullptr}
private

◆ fxThreadHandler

TGo4ThreadHandler* TGo4TaskHandler::fxThreadHandler {nullptr}
private

link to external threadhandler which is used for the transport service threads (runnables); these runnables are instantiated from the task handler ctor and passed to the thread handler who takes over the responsibility for the runnables (threadhandler internal mode threads) <{TGo4ThreadHandler}>

Definition at line 320 of file TGo4TaskHandler.h.

Referenced by StartTransportThreads(), StopTransportThreads(), TGo4TaskHandler(), WaitThreadStop(), and ~TGo4TaskHandler().

◆ fxThreadManager

TGo4ThreadManager* TGo4TaskHandler::fxThreadManager {nullptr}
private

Link to threadmanager that owns the task handler, used for runnable ctors

Definition at line 312 of file TGo4TaskHandler.h.

Referenced by ConnectServerChannel(), GetThreadManager(), ServerRequest(), TGo4TaskHandler(), and WaitGetPort().


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