CARMA C++
sza::antenna::control::AntennaDrive Class Reference

The AntennaDrive collects together the functionality of the base class Drive and its descendants, namely PointingModel. More...

#include <carma/antenna/sza/antenna/control/AntennaDrive.h>

Inheritance diagram for sza::antenna::control::AntennaDrive:
sza::util::GenericTask< AntennaDriveMsg >

Public Member Functions

void sendCarmaSeqNoMsg (unsigned long seq, sza::util::GenericTaskMsg::CarmaSeqNoType type, bool success)
 Send a message to the parent that a CARMA sequence number should be written. More...
 
void sendPmacConnectedMsg (bool connected)
 Send a message that the pmac is dis/connected. More...
 
void sendPmacDoneMsg (unsigned int seq)
 Send a message to the parent that the pmac is disconnected. More...
 
void sendSourceSetMsg (unsigned int seq)
 Send a message to the parent that the source has set. More...
 
- Public Member Functions inherited from sza::antenna::control::SzaTask
SzaSharegetShare ()
 Public method to get a pointer to our shared object. More...
 
 SzaTask ()
 Constructor. More...
 
virtual ~SzaTask ()
 Make this virtual so that inheritors destructors are properly called even if they are upcast. More...
 
- Public Member Functions inherited from sza::util::GenericTask< AntennaDriveMsg >
virtual void fwdTaskMsg (AntennaDriveMsg *msg)
 Forward a message to this task via its message queue. More...
 
void sendHeartBeatMsg ()
 Method to send a heartbeat message to this task via its message queue. More...
 
void sendRestartMsg ()
 Method to send a stop message to this task via its message queue. More...
 
void sendStopMsg ()
 Method to send a stop message to this task via its message queue. More...
 

Friends

class AntennaMaster
 We declare AntennaMaster a friend because its startAntennaDrive() method will call serviceMsgQ(). More...
 

Additional Inherited Members

- Protected Member Functions inherited from sza::util::GenericTask< AntennaDriveMsg >
virtual void addHandler (AntennaDriveMsg *msg)
 Respond to a message to add/remove a handler. More...
 
void cancelThread (unsigned order)
 Cancel the next thread with the specified order. More...
 
void cancelThreads ()
 A method to cancel threads managed by this task. More...
 
virtual void enableTimer (AntennaDriveMsg *msg)
 Respond to a message to enable/disable a timer. More...
 
 GenericTask ()
 Protected constructor ensures that the base class cannot be instantiated. More...
 
 GenericTask (Thread *thread)
 Constructor which initializes thread_, below. More...
 
unsigned getMinCancelOrder ()
 Method to return the minimum cancel order for threads which are not yet running. More...
 
unsigned getMinStartOrder ()
 Method to return the minimum start order for threads which are not yet running. More...
 
ThreadgetThread (std::string name)
 A method to start all threads managed by this task running. More...
 
virtual void installSignal (AntennaDriveMsg *msg)
 Respond to a message to install a signal. More...
 
virtual void installTimer (AntennaDriveMsg *msg)
 Respond to a message to install a timer. More...
 
void pingThreads (void *arg)
 A method to ping all pingable threads managed by this task. More...
 
virtual void processMsg (AntennaDriveMsg *msg)
 This method should be defined by each inheriting task to process its own task-specific messages. More...
 
virtual void processTaskMsg (bool *stop)
 Process a message received on our message queue. More...
 
void raise (std::string name, int sigNo)
 Raise a signal to a named thread. More...
 
virtual void restart (void)
 Restart this thread. More...
 
virtual void run (void)
 Force inheritors to define a run method. More...
 
void sendTaskMsg (AntennaDriveMsg *msg)
 Send a message to this task via its message queue. More...
 
virtual void serviceMsgQ (void)
 This routine will simply block, servicing messages on the message queue. More...
 
void shutdownConnection (int fd)
 Shutdown a connection. More...
 
void startThread (void *arg, unsigned order)
 Start the next thread with the specified order. More...
 
void startThreads (void *arg)
 A method to start all threads. More...
 
bool threadsAreRunning ()
 A method to test if the threads managed by this task are running. More...
 
bool threadsNeedCancelling ()
 Return true if there are still uncancelled threads. More...
 
bool threadsNeedStarting ()
 Return true if there are still unstarted threads. More...
 
virtual ~GenericTask ()
 Making the destructor virtual ensures that the right destructor will be called for classes which inherit from GenericTask. More...
 
- Protected Attributes inherited from sza::antenna::control::SzaTask
SzaShareshare_
 The shared-memory object. More...
 
- Protected Attributes inherited from sza::util::GenericTask< AntennaDriveMsg >
sza::util::FdSet fdSet_
 A set of file descriptors associated with this task. More...
 
PipeQ< AntennaDriveMsg > msgq_
 A message queue, implemented as a pipe, by which we can communicate with this task. More...
 
Threadthread_
 If this GenericTask object was instantiated by another thread, keep a pointer to it here. More...
 
std::vector< Thread * > threads_
 A vector of Thread objects managed by this task. More...
 

Detailed Description

The AntennaDrive collects together the functionality of the base class Drive and its descendants, namely PointingModel.

Remotely, there will be a single CORBA DO for an Antenna object, from which antenna->Drive()->Pointingmodel() and its methods can be accessed directly. However, we want these methods to be routed through the AntennaDrive message queue, and so the antenna->Drive() portion of the DO is managed by the AntennaDrive class.

Definition at line 43 of file AntennaDrive.h.

Member Function Documentation

void sza::antenna::control::AntennaDrive::sendCarmaSeqNoMsg ( unsigned long  seq,
sza::util::GenericTaskMsg::CarmaSeqNoType  type,
bool  success 
)

Send a message to the parent that a CARMA sequence number should be written.

void sza::antenna::control::AntennaDrive::sendPmacConnectedMsg ( bool  connected)

Send a message that the pmac is dis/connected.

void sza::antenna::control::AntennaDrive::sendPmacDoneMsg ( unsigned int  seq)

Send a message to the parent that the pmac is disconnected.

void sza::antenna::control::AntennaDrive::sendSourceSetMsg ( unsigned int  seq)

Send a message to the parent that the source has set.

Friends And Related Function Documentation

friend class AntennaMaster
friend

We declare AntennaMaster a friend because its startAntennaDrive() method will call serviceMsgQ().

Definition at line 80 of file AntennaDrive.h.


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