Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

tcsmonSched Class Reference

#include <tcsmonSched.h>

List of all members.

Public Methods

 tcsmonSched (const char *)
virtual ~tcsmonSched ()
void print (void)
ccsCOMPL_STAT getType (char *symAddr, node &n)
ccsCOMPL_STAT addNode (node *n)
ccsCOMPL_STAT readAttr (node *)
ccsCOMPL_STAT fitsLog (node *)
ccsCOMPL_STAT generateMap (void)
ccsCOMPL_STAT readFile (const char *)
vltUINT32 cycle (void)
ccsCOMPL_STAT reset (void)
ccsCOMPL_STAT listTable (char *name)
bool OK (void)

Protected Methods

ccsCOMPL_STAT checkGidAttr (node *n)

Private Attributes

vector< nodeGroup *> vTable
map< vltUINT16, vltUINT16 > mPeriod
map< vltUINT32, nodeGroup *> mTable
ifstream ifile
vltUINT16 period
map< vltUINT32, nodeGroup
*>::iterator 
mi
bool ok


Constructor & Destructor Documentation

tcsmonSched::tcsmonSched const char *   
 

virtual tcsmonSched::~tcsmonSched   [virtual]
 


Member Function Documentation

ccsCOMPL_STAT tcsmonSched::checkGidAttr node   n [protected]
 

Checks a control attribute. Reads the database pointed by the node and compares it with its okValue.

Parameters:
n  node to check
Returns:
SUCCESS or FAILURE

void tcsmonSched::print void   
 

ccsCOMPL_STAT tcsmonSched::getType char *    symAddr,
node   n
 

Get info about the DB point passed.

Gets type and direct address of <symAddr> and updates the node attribute with this info.

Parameters:
symAddr  Symbolic address of the point where to get the data
n  node to update with data gathered from <symAddr>
Returns:
SUCCESS or FAILURE

ccsCOMPL_STAT tcsmonSched::addNode node   n
 

Add a new node group or a node to a node group.

Takes the node passed as a parameter and creates a new node group (if Node->gid>0) or adds a node to the lastGroup created.

If the node is a group definition adds the node to vector vTable and its period to vector vPeriod (used later by generateMap) it also increments mPeriod[period] entry..

Parameters:
Node  The node to add
Returns:
SUCCESS or FAILURE

ccsCOMPL_STAT tcsmonSched::readAttr node  
 

ccsCOMPL_STAT tcsmonSched::fitsLog node  
 

FITS log a group.

Logs the FITS keyword and DB value of a single node.

Parameters:
node  the node to log.
Returns:
SUCCESS or FAILURE

ccsCOMPL_STAT tcsmonSched::generateMap void   
 

Create the logging time table (populate mTable map).

mTable consist of pairs $(time, group)$, where time is the time left to start the {next} logging cycle (a logging cycle logs all DB attrs from a group definition).

The table is populated as follows: \begin{itemize} \item The size of the table is the common denomitator of all logging periods. This is the period $T$ of the time table. \item Each logging group is allocated in the time table $T/p$ times ($p$ is the logging group period).

The logging time for each logging group $Gi$ with logging period $p$ is computed as follows: Given $N_{p}$ (the number of groups with period $p$).\

$f = p/N_{p}$ \ $time_{0} = f * i, i=0 \ldots N_{p-1}$\ $time_{i} = time_{ i-1}+f*N_{p}$\ $time_{i} < T$ \

\item In case of collision an arbitrary offset of 3.7(s) is added until the collision is cleared. \end{itemize}

ccsCOMPL_STAT tcsmonSched::readFile const char *   
 

Reads and parses an input file.

The file is first lokked up at INTROOT/config and then at VLTROOT/config.

Parameters:
file  The name of the file to read.
Returns:
SUCCESS or FAILURE

vltUINT32 tcsmonSched::cycle void   
 

Performs a logging cycle. This functions reads an mTable entry (time, group), check the group's control attribute and logs the group's values.

Returns:
The time (us) for the next cycle.

ccsCOMPL_STAT tcsmonSched::reset void   
 

ccsCOMPL_STAT tcsmonSched::listTable char *    name
 

bool tcsmonSched::OK void    [inline]
 


Member Data Documentation

vector<nodeGroup*> tcsmonSched::vTable [private]
 

Vector which holds Group definitions for logging.

map<vltUINT16,vltUINT16> tcsmonSched::mPeriod [private]
 

Indexed by period, returns how many groups logs on a given period.

map<vltUINT32, nodeGroup*> tcsmonSched::mTable [private]
 

mTable is a map. The keys (vltINT32) are timestamps signaling when to read the {nex}t logging group. The elements are the node group to log {now}.

ifstream tcsmonSched::ifile [private]
 

vltUINT16 tcsmonSched::period [private]
 

map<vltUINT32, nodeGroup*>::iterator tcsmonSched::mi [private]
 

bool tcsmonSched::ok [private]
 


The documentation for this class was generated from the following file:
Generated on Wed Dec 3 14:59:17 2003 for ATCS API by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001