My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::GenericMasterTask< Msg > Class Template Reference
Inheritance diagram for gcp::util::GenericMasterTask< Msg >:
gcp::util::GenericTask< Msg >

Public Member Functions

 GenericMasterTask ()
 
virtual ~GenericMasterTask ()
 
- Public Member Functions inherited from gcp::util::GenericTask< Msg >
void sendRestartMsg ()
 
void sendStopMsg ()
 
void sendHeartBeatMsg ()
 
virtual void fwdTaskMsg (Msg *msg)
 

Protected Member Functions

void processTaskMsg (bool *stop)
 
void sendInstallTimerMsg (std::string name, int sigNo, unsigned long intervalSec, unsigned long intervalNsec, SIGNALTASK_HANDLER_FN(*handler))
 
void sendInstallTimerMsg (std::string name, int sigNo, unsigned long initSec, unsigned long initNsec, unsigned long intervalSec, unsigned long intervalNsec, SIGNALTASK_HANDLER_FN(*handler))
 
void installTimer (Msg *msg)
 
virtual void installTimers ()
 
void sendInstallSignalMsg (int sigNo, SIGNALTASK_HANDLER_FN(*handler))
 
void installSignal (Msg *msg)
 
virtual void installSignals ()
 
void sendEnableTimerMsg (std::string name, bool enable)
 
void enableTimer (Msg *msg)
 
void sendAddHandlerMsg (std::string name, SIGNALTASK_HANDLER_FN(*handler), bool add)
 
void addHandler (Msg *msg)
 
- Protected Member Functions inherited from gcp::util::GenericTask< Msg >
 GenericTask ()
 
 GenericTask (Thread *thread)
 
virtual ~GenericTask ()
 
void sendTaskMsg (Msg *msg)
 
void startThreads (void *arg)
 
void startThread (void *arg, unsigned order)
 
unsigned getMinStartOrder ()
 
bool threadsNeedStarting ()
 
void cancelThreads ()
 
void cancelThread (unsigned order)
 
unsigned getMinCancelOrder ()
 
bool threadsNeedCancelling ()
 
void pingThreads (void *arg)
 
void raise (std::string name, int sigNo)
 
ThreadgetThread (std::string name)
 
bool threadsAreRunning ()
 
void shutdownConnection (int fd)
 
virtual void serviceMsgQ (void)
 
virtual void restart (void)
 
virtual void run (void)
 
virtual void processMsg (Msg *msg)
 
virtual void respondToHeartBeat ()
 
void stepCommands ()
 

Protected Attributes

gcp::util::SignalTasksignal_
 
- Protected Attributes inherited from gcp::util::GenericTask< Msg >
Threadthread_
 
std::vector< Thread * > threads_
 
PipeQ< Msg > msgq_
 
gcp::util::FdSet fdSet_
 
std::vector< Command * > commands_
 
struct timeval * timeOut_
 
TimeVal commandTimeOut_
 

Constructor & Destructor Documentation

template<class Msg >
gcp::util::GenericMasterTask< Msg >::GenericMasterTask ( )

Constructor.

template<class Msg >
gcp::util::GenericMasterTask< Msg >::~GenericMasterTask ( )
virtual

Destructor.

Member Function Documentation

template<class Msg>
void gcp::util::GenericMasterTask< Msg >::addHandler ( Msg *  msg)
protectedvirtual

Respond to a message to add/remove a handler

Send a message to the signal thread to add a handler.

Reimplemented from gcp::util::GenericTask< Msg >.

template<class Msg>
void gcp::util::GenericMasterTask< Msg >::enableTimer ( Msg *  msg)
protectedvirtual

Respond to a message to enable/disable a timer.

Send a message to the master thread to install a timer.

Reimplemented from gcp::util::GenericTask< Msg >.

template<class Msg>
void gcp::util::GenericMasterTask< Msg >::installSignal ( Msg *  msg)
protectedvirtual

Respond to a message to install a signal.

Reimplemented from gcp::util::GenericTask< Msg >.

template<class Msg >
void gcp::util::GenericMasterTask< Msg >::installSignals ( )
protectedvirtual

Install timers of interest to us.

Install signals of interest to us.

template<class Msg>
void gcp::util::GenericMasterTask< Msg >::installTimer ( Msg *  msg)
protectedvirtual

Respond to a message to install a timer.

Reimplemented from gcp::util::GenericTask< Msg >.

template<class Msg >
void gcp::util::GenericMasterTask< Msg >::installTimers ( )
protectedvirtual

Install timers of interest to us.

template<class Msg >
void gcp::util::GenericMasterTask< Msg >::processTaskMsg ( bool *  stop)
protectedvirtual

Method to process a message received on the Task message * queue

Reimplemented from gcp::util::GenericTask< Msg >.

template<class Msg >
void gcp::util::GenericMasterTask< Msg >::sendAddHandlerMsg ( std::string  name,
SIGNALTASK_HANDLER_FN *  handler,
bool  add 
)
protected

A message to add/remove a signal handler

Send a message to the master thread to install a timer.

template<class Msg >
void gcp::util::GenericMasterTask< Msg >::sendEnableTimerMsg ( std::string  name,
bool  enable 
)
protected

A message to enable/disable a timer.

Send a message to the master thread to install a timer.

template<class Msg >
void gcp::util::GenericMasterTask< Msg >::sendInstallSignalMsg ( int  sigNo,
SIGNALTASK_HANDLER_FN *  handler 
)
protected

A method to install a signal

Send a message to the master thread to install a signal.

template<class Msg >
void gcp::util::GenericMasterTask< Msg >::sendInstallTimerMsg ( std::string  name,
int  sigNo,
unsigned long  intervalSec,
unsigned long  intervalNsec,
SIGNALTASK_HANDLER_FN *  handler 
)
protected

Send a message to the master thread to install a timer. The initial delay is set to the interval in this version.

template<class Msg >
void gcp::util::GenericMasterTask< Msg >::sendInstallTimerMsg ( std::string  name,
int  sigNo,
unsigned long  initSec,
unsigned long  initNsec,
unsigned long  intervalSec,
unsigned long  intervalNsec,
SIGNALTASK_HANDLER_FN *  handler 
)
protected

Send the signal task a message to install a timer.

....................................................................... Send a message to install a timer.

Member Data Documentation

template<class Msg>
gcp::util::SignalTask* gcp::util::GenericMasterTask< Msg >::signal_
protected

Handles all signals for this process


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