My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::GenericMasterTaskMsg Class Reference

#include <GenericMasterTaskMsg.h>

Inheritance diagram for gcp::util::GenericMasterTaskMsg:
gcp::util::GenericTaskMsg gcp::antenna::control::AntennaMasterMsg gcp::grabber::MasterMsg gcp::grabber::MasterMsg gcp::mediator::MasterMsg

Public Types

enum  GenericMasterMsgType {
  ADD_HANDLER = GenericTaskMsg::LAST+1, ENABLE_TIMER, INSTALL_TIMER, INSTALL_SIGNAL,
  TASK_SPECIFIC
}
 
- Public Types inherited from gcp::util::GenericTaskMsg
enum  GenericMsgType {
  HEARTBEAT, STOP, RESTART, TASK_SPECIFIC,
  LAST
}
 

Public Member Functions

void packInstallTimerMsg (std::string name, int sigNo, unsigned long initSec, unsigned long initNsec, unsigned long intervalSec, unsigned long intervalNsec, SIGNALTASK_HANDLER_FN(*handler))
 
void packInstallTimerMsg (std::string name, int sigNo, unsigned long intervalSec, unsigned long intervalNsec, SIGNALTASK_HANDLER_FN(*handler))
 
void packInstallSignalMsg (int sigNo, SIGNALTASK_HANDLER_FN(*handler))
 
void packEnableTimerMsg (std::string name, bool enable)
 
void packAddHandlerMsg (std::string name, SIGNALTASK_HANDLER_FN(*handler), bool add)
 

Public Attributes

union {
   struct {
      char   name [SIGNAL_NAME_LEN+1]
 
      int   sigNo
 
      unsigned long   initSec
 
      unsigned long   initNsec
 
      unsigned long   intervalSec
 
      unsigned long   intervalNsec
 
      SIGNALTASK_HANDLER_FN *   handler
 
   }   installTimer
 
   struct {
      int   sigNo
 
      SIGNALTASK_HANDLER_FN *   handler
 
      void *   args
 
   }   installSignal
 
   struct {
      char   name [SIGNAL_NAME_LEN+1]
 
      bool   enable
 
   }   enableTimer
 
   struct {
      char   name [SIGNAL_NAME_LEN+1]
 
      SIGNALTASK_HANDLER_FN *   handler
 
      void *   args
 
      bool   add
 
   }   addHandler
 
genericMasterBody
 
- Public Attributes inherited from gcp::util::GenericTaskMsg
GenericMsgType genericMsgType_
 

Detailed Description

A class to encapsulate message types for a generic task.

Classes which extend from this class should simply add whatever members are required to process additional task-specific messages, for instance a union of task-specific messages.

NB: There is no explicit constructor for this class, since the compiler won't allow classes with constructors to be included as members of unions. This means that we cannot construct unions using objects which inherit from GenericMasterTaskMsg unless they also don't have constructors.

Member Enumeration Documentation

Enumerate supported generic message types.

Member Function Documentation

void gcp::util::GenericMasterTaskMsg::packAddHandlerMsg ( std::string  name,
SIGNALTASK_HANDLER_FN *  handler,
bool  add 
)
inline

Pack a message to enable/disable a timer.

void gcp::util::GenericMasterTaskMsg::packEnableTimerMsg ( std::string  name,
bool  enable 
)
inline

Pack a message to enable/disable a timer.

void gcp::util::GenericMasterTaskMsg::packInstallSignalMsg ( int  sigNo,
SIGNALTASK_HANDLER_FN *  handler 
)
inline

Pack a message to install a signal.

void gcp::util::GenericMasterTaskMsg::packInstallTimerMsg ( std::string  name,
int  sigNo,
unsigned long  initSec,
unsigned long  initNsec,
unsigned long  intervalSec,
unsigned long  intervalNsec,
SIGNALTASK_HANDLER_FN *  handler 
)
inline

Pack a message to install a timer. Allows separately setting the initial delay and the interval

void gcp::util::GenericMasterTaskMsg::packInstallTimerMsg ( std::string  name,
int  sigNo,
unsigned long  intervalSec,
unsigned long  intervalNsec,
SIGNALTASK_HANDLER_FN *  handler 
)
inline

Pack a message to install a timer. Sets the initial delay and the interval to the same.

Member Data Documentation

union { ... } gcp::util::GenericMasterTaskMsg::genericMasterBody

A message body


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