#include <tcsmonSched.h>
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 |
|
|
|
|
|
Checks a control attribute. Reads the database pointed by the node and compares it with its okValue.
|
|
|
|
Get info about the DB point passed. Gets type and direct address of <symAddr> and updates the node attribute with this info.
|
|
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..
|
|
|
|
FITS log a group. Logs the FITS keyword and DB value of a single node.
|
|
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} |
|
Reads and parses an input file. The file is first lokked up at INTROOT/config and then at VLTROOT/config.
|
|
Performs a logging cycle. This functions reads an mTable entry (time, group), check the group's control attribute and logs the group's values.
|
|
|
|
|
|
|
|
Vector which holds Group definitions for logging. |
|
Indexed by period, returns how many groups logs on a given period. |
|
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}. |
|
|
|
|
|
|
|
|