Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

ParamList Class Reference

This is a class for passing parameter addresses to threads. More...

Collaboration diagram for ParamList:

Collaboration graph
[legend]

Public Member Functions

 ParamList (RodModule *rod, PPBuffer< unsigned long > *replyBuffer, PPBuffer< char > *textBuffer, PPBuffer< char > *errBuffer, PPMutex *coutMutex)
 ParamList (const ParamList &)
ParamListoperator= (const ParamList &)
void setRod (RodModule *rod)
void setReplyBuffer (PPBuffer< unsigned long > *replyBuffer)
void setTextBuffer (PPBuffer< char > *textBuffer)
void setErrBuffer (PPBuffer< char > *errBuffer)
void setCoutMutex (PPMutex *coutMutex)
void setFinished (bool finished)
RodModulegetRod ()
PPBuffer< unsigned long > * getReplyBuffer ()
PPBuffer< char > * getTextBuffer ()
PPBuffer< char > * getErrBuffer ()
PPMutex * getCoutMutex ()
bool getFinished ()

Private Attributes

RodModulem_rod
PPBuffer< unsigned long > * m_replyBuffer
PPBuffer< char > * m_textBuffer
PPBuffer< char > * m_errBuffer
PPMutex * m_coutMutex
bool m_finished

Detailed Description

This is a class for passing parameter addresses to threads.

This class is used by threads to pass addresses of data to other threads.

The mutex m_coutMutex is used to avoid interleaving when printing output from several threads at the same time. The boolean data member m_finished is used to signal that the program is ending. Threads that are blocked waiting for a buffer are sent an empty buffer and should test m_finished. If it is "true" they terminate themselves.

Note that another way I could have done this would have been to use a separate ParamList object for each thread, but it seems easier and more versatile to have all the links in one object.

Author:
Tom Meyer (meyer@iastate.edu)

Definition at line 40 of file EchoTestThread.cxx.


The documentation for this class was generated from the following file:
Generated on Thu Dec 15 21:14:51 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5