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

#include <Master.h>

Inheritance diagram for gcp::grabber::Master:
gcp::util::GenericMasterTask< MasterMsg > gcp::util::GenericMasterTask< MasterMsg > gcp::util::GenericTask< MasterMsg > gcp::util::GenericTask< MasterMsg >

Public Member Functions

 Master (std::string ctlHost, std::string imHost, bool simulate, unsigned channel)
 
 ~Master ()
 
std::string ctlHost ()
 
std::string imHost ()
 
 MASTER_TASK_FWD_FN (forwardMasterMsg)
 
 MASTER_TASK_FWD_FN (forwardScannerMsg)
 
 MASTER_TASK_FWD_FN (forwardControlMsg)
 
unsigned channel ()
 
 Master (std::string ctlHost, std::string imHost, bool simulate, unsigned channel)
 
 ~Master ()
 
std::string ctlHost ()
 
std::string imHost ()
 
 MASTER_TASK_FWD_FN (forwardMasterMsg)
 
 MASTER_TASK_FWD_FN (forwardScannerMsg)
 
 MASTER_TASK_FWD_FN (forwardControlMsg)
 
unsigned channel ()
 
- Public Member Functions inherited from gcp::util::GenericMasterTask< MasterMsg >
 GenericMasterTask ()
 
virtual ~GenericMasterTask ()
 
- Public Member Functions inherited from gcp::util::GenericTask< MasterMsg >
void sendRestartMsg ()
 
void sendStopMsg ()
 
void sendHeartBeatMsg ()
 
virtual void fwdTaskMsg (MasterMsg *msg)
 

Additional Inherited Members

- Protected Member Functions inherited from gcp::util::GenericMasterTask< MasterMsg >
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 (MasterMsg *msg)
 
void sendInstallSignalMsg (int sigNo, SIGNALTASK_HANDLER_FN(*handler))
 
void installSignal (MasterMsg *msg)
 
void sendEnableTimerMsg (std::string name, bool enable)
 
void enableTimer (MasterMsg *msg)
 
void sendAddHandlerMsg (std::string name, SIGNALTASK_HANDLER_FN(*handler), bool add)
 
void addHandler (MasterMsg *msg)
 
- Protected Member Functions inherited from gcp::util::GenericTask< MasterMsg >
 GenericTask ()
 
 GenericTask (Thread *thread)
 
virtual ~GenericTask ()
 
void sendTaskMsg (MasterMsg *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 (MasterMsg *msg)
 
virtual void respondToHeartBeat ()
 
void stepCommands ()
 
- Protected Attributes inherited from gcp::util::GenericMasterTask< MasterMsg >
gcp::util::SignalTasksignal_
 
- Protected Attributes inherited from gcp::util::GenericTask< MasterMsg >
Threadthread_
 
std::vector< Thread * > threads_
 
PipeQ< MasterMsg > msgq_
 
gcp::util::FdSet fdSet_
 
std::vector< Command * > commands_
 
struct timeval * timeOut_
 
TimeVal commandTimeOut_
 

Detailed Description

............................................................ A class for reading frames from the frame grabber, and sending them of to the outside world.

Instantiating a object starts up three threads: the main one, and two spawned threads, represented by the following objects:

1) Control: which listens for network commands.

2) Scanner: which receives frames from the frame grabber, and sends them off to the outside world.

3) Signal: which handles all signals for this task.

Constructor & Destructor Documentation

gcp::grabber::Master::Master ( std::string  ctlHost,
std::string  imHost,
bool  simulate,
unsigned  channel 
)

Constructor.

Parameters
hostThe control host and the host to send images to.
Master::~Master ( )

Destructor.

....................................................................... Delete the resource object of the program.

Input: sup Master * The object to be deleted. Output: return Master * The deleted object (always NULL).

gcp::grabber::Master::Master ( std::string  ctlHost,
std::string  imHost,
bool  simulate,
unsigned  channel 
)

Constructor.

Parameters
hostThe control host and the host to send images to.
gcp::grabber::Master::~Master ( )

Destructor.

Member Function Documentation

string Master::ctlHost ( )

Methods by which tasks can query std::strings pertinent to the connection.

....................................................................... Method by which tasks can query the control host.

std::string gcp::grabber::Master::ctlHost ( )

Methods by which tasks can query std::strings pertinent to the connection.

string Master::imHost ( )

....................................................................... Method by which tasks can query the image host.

gcp::grabber::Master::MASTER_TASK_FWD_FN ( forwardMasterMsg  )

Forward a message to the master task

gcp::grabber::Master::MASTER_TASK_FWD_FN ( forwardMasterMsg  )

Forward a message to the master task

gcp::grabber::Master::MASTER_TASK_FWD_FN ( forwardScannerMsg  )

Forward a message to the scanner task

gcp::grabber::Master::MASTER_TASK_FWD_FN ( forwardScannerMsg  )

Forward a message to the scanner task

gcp::grabber::Master::MASTER_TASK_FWD_FN ( forwardControlMsg  )

Forward a message to the control task

gcp::grabber::Master::MASTER_TASK_FWD_FN ( forwardControlMsg  )

Forward a message to the control task


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