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

#include <Master.h>

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

Public Member Functions

 Master (std::string ctlHost, std::string wxHost, bool sim, bool simRx)
 
 ~Master ()
 
 MASTER_TASK_FWD_FN (forwardMasterMsg)
 
std::string ctlHost ()
 
std::string wxHost ()
 
gcp::util::ArrayRegMapDataFrameManagergetArrayShare ()
 
bool sim ()
 
bool simRx ()
 
- 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 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 to encapsulate translation between the old-style DASI array control code and the new SZA antenna code. DASI code uses proprietary socket communications & network message containers to relay command messages and data between the ACC and the AC, while SZA code uses distributed CORBA objects and event channels.

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

1) Control: which listens to the control port for network commands, and translates them into commands distributed to various tasks

2) Scanner: which receives monitor events from the antenna task, translates them into data frames, and packages them for transmission to the control archiver port.

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

Constructor & Destructor Documentation

Master::Master ( std::string  ctlHost,
std::string  wxHost,
bool  sim,
bool  simRx 
)

Constructor.

Exceptions
Exception....................................................................... Create the resource object of the Master object.

Input: host char * The IP address of the computer on which the control program is running.

Master::~Master ( )

Destructor.

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

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

Member Function Documentation

std::string gcp::mediator::Master::ctlHost ( )
inline

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

gcp::mediator::Master::MASTER_TASK_FWD_FN ( forwardMasterMsg  )

Method by which tasks can forward messages to us.


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