My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::DliPowerStripController Class Reference
Inheritance diagram for gcp::util::DliPowerStripController:
gcp::util::SpawnableTask< DliPowerStripControllerMsg > gcp::util::GenericTask< DliPowerStripControllerMsg > gcp::util::RunnableTask gcp::util::Runnable

Public Member Functions

 DliPowerStripController (std::string host, bool doSpawn=true)
 
virtual ~DliPowerStripController ()
 
void on (DliPowerStrip::Outlet mask)
 
void off (DliPowerStrip::Outlet mask)
 
void cycle (DliPowerStrip::Outlet mask)
 
void status ()
 
- Public Member Functions inherited from gcp::util::SpawnableTask< DliPowerStripControllerMsg >
 SpawnableTask (bool spawn)
 
virtual ~SpawnableTask ()
 
- Public Member Functions inherited from gcp::util::GenericTask< DliPowerStripControllerMsg >
void sendRestartMsg ()
 
void sendStopMsg ()
 
void sendHeartBeatMsg ()
 
virtual void fwdTaskMsg (DliPowerStripControllerMsg *msg)
 
- Public Member Functions inherited from gcp::util::RunnableTask
 RunnableTask (bool spawnThread)
 
virtual ~RunnableTask ()
 
- Public Member Functions inherited from gcp::util::Runnable
 Runnable (bool spawnThread, RUN_FN(*runFn))
 
 Runnable (bool spawnThread, RUN_FN(*runFn), int priority)
 
virtual ~Runnable ()
 
void blockForever ()
 
void spawn ()
 

Protected Member Functions

virtual void reportStatus (std::vector< DliPowerStrip::State > &status)
 
void processMsg (DliPowerStripControllerMsg *msg)
 
- Protected Member Functions inherited from gcp::util::SpawnableTask< DliPowerStripControllerMsg >
void run ()
 
- Protected Member Functions inherited from gcp::util::GenericTask< DliPowerStripControllerMsg >
 GenericTask ()
 
 GenericTask (Thread *thread)
 
virtual ~GenericTask ()
 
void sendTaskMsg (DliPowerStripControllerMsg *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 processTaskMsg (bool *stop)
 
virtual void respondToHeartBeat ()
 
virtual void installTimer (DliPowerStripControllerMsg *msg)
 
virtual void installSignal (DliPowerStripControllerMsg *msg)
 
virtual void enableTimer (DliPowerStripControllerMsg *msg)
 
virtual void addHandler (DliPowerStripControllerMsg *msg)
 
void stepCommands ()
 
- Protected Member Functions inherited from gcp::util::Runnable
virtual void broadcastReady ()
 
void spawn (void *arg)
 

Friends

std::ostream & operator<< (std::ostream &os, DliPowerStripController &obj)
 

Additional Inherited Members

- Static Public Member Functions inherited from gcp::util::RunnableTask
static RUN_FN (runFn)
 
- Static Public Member Functions inherited from gcp::util::Runnable
static THREAD_START (startUp)
 
- Protected Attributes inherited from gcp::util::GenericTask< DliPowerStripControllerMsg >
Threadthread_
 
std::vector< Thread * > threads_
 
PipeQ< DliPowerStripControllerMsgmsgq_
 
gcp::util::FdSet fdSet_
 
std::vector< Command * > commands_
 
struct timeval * timeOut_
 
TimeVal commandTimeOut_
 
- Protected Attributes inherited from gcp::util::Runnable
ThreadspawnedThread_
 
bool spawned_
 
RUN_FN * runFn_
 

Constructor & Destructor Documentation

DliPowerStripController::DliPowerStripController ( std::string  host,
bool  doSpawn = true 
)

Constructor.

....................................................................... Constructor.

DliPowerStripController::~DliPowerStripController ( )
virtual

Destructor.

....................................................................... Destructor.

Member Function Documentation

void DliPowerStripController::processMsg ( DliPowerStripControllerMsg msg)
protectedvirtual

....................................................................... Main Task event loop: when this is called, the task blocks forever in select(), or until a stop message is received.

Reimplemented from gcp::util::SpawnableTask< DliPowerStripControllerMsg >.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
DliPowerStripController obj 
)
friend

Output Operator.


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