My Project
|
#include <GenericMasterTaskMsg.h>
Public Types | |
enum | GenericMasterMsgType { ADD_HANDLER = GenericTaskMsg::LAST+1, ENABLE_TIMER, INSTALL_TIMER, INSTALL_SIGNAL, TASK_SPECIFIC } |
![]() | |
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 |
![]() | |
GenericMsgType | genericMsgType_ |
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.
Enumerate supported generic message types.
|
inline |
Pack a message to enable/disable a timer.
|
inline |
Pack a message to enable/disable a timer.
|
inline |
Pack a message to install a signal.
|
inline |
Pack a message to install a timer. Allows separately setting the initial delay and the interval
|
inline |
Pack a message to install a timer. Sets the initial delay and the interval to the same.
union { ... } gcp::util::GenericMasterTaskMsg::genericMasterBody |
A message body