GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCI / V6-0-1 > LCI_test / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

test_compiler.c File Reference

Test the LCI compiler. More...

#include "test_p.h"
#include "lci_host_p.h"
#include "compile_p.h"
#include "configure_p.h"
#include "LCI/LCI_msgs.h"
#include "LSEC/enums.h"
#include "LSEC/LSEC_ctx.h"
#include "MSG/MSG_pubdefs.h"

Functions

unsigned LCI_test_compiler (void)
 Perform a compiler test.
int compiler_acd (void)
 Test ACD compiler.
int compiler_cal (void)
 Test CAL compiler.
int compiler_tkr (void)
 Test TKR compiler.
int compare (const char *type, const char *filename, const char *fid)
 Compare the configuration data written directly to file with the product of compilation.
void setItemVar (LCI_cnfItem *itm, unsigned start, unsigned count, unsigned delta)
 Set the start, count and delta fields of the configuration item.
void setItemCst (LCI_cnfItem *itm, unsigned val)
 Fill the fields of the configuration item to produce a constant value.
void printACD (FILE *fp, LCI_cnfInput *inp)
 Append the XML form of an ACD configuration to the file.
void printCAL (FILE *fp, LCI_cnfInput *inp)
 Append the XML form of a CAL configuration to the file.
void printTKR (FILE *fp, LCI_cnfInput *inp)
 Append the XML form of a TKR configuration to the file.
void printItem (FILE *fp, LCI_cnfItem *itm, unsigned indent, const char *tag)
 Write out a configuration item as either the keyword LATC, the single tag "constant" or the set of tags "initial", "delta" and "count".
void printCol (FILE *fp, LCI_cnfItem *itm, unsigned indent)
 Write out the CAL column configuration item.
void printChnl (FILE *fp, LCI_cnfItem *itm, unsigned indent)
 Write out the TKR channel configuration item.
void printIndent (FILE *fp, unsigned indent)
 Print an indentation into a file.
void printStartACD (FILE *fp)
 Print the first lines of an ACD XML file.
void printEndACD (FILE *fp)
 Print the last line of an ACD XML file.
void printStartCAL (FILE *fp)
 Print the first three lines of a CAL XML file.
void printEndCAL (FILE *fp)
 Print the last line of a CAL XML file.
void printStartTKR (FILE *fp)
 Print the first three lines of a TKR XML file.
void printEndTKR (FILE *fp)
 Print the last line of a TKR XML file.


Detailed Description

Test the LCI compiler.

Author:
James Swain & Owen Saxton
$Id: test_compiler.c,v 1.13 2010/05/03 20:11:32 saxton Exp $

Function Documentation

int compare ( const char *  type,
const char *  filename,
const char *  fid 
)

Compare the configuration data written directly to file with the product of compilation.

Parameters:
filename Name of the XML file to compile
fid ID of the binary configuration file to compare with product of compilation
type One of ACD, CAL or TKR
Return values:
0 No errors
1 Errors

int compiler_acd ( void   ) 

Test ACD compiler.

Returns:
Line number of first failure

int compiler_cal ( void   ) 

Test CAL compiler.

Returns:
Line number of first failure

int compiler_tkr ( void   ) 

Test TKR compiler.

Returns:
Line number of first failure

unsigned LCI_test_compiler ( void   ) 

Perform a compiler test.

Returns:
Line number of first failure

void printACD ( FILE *  fp,
LCI_cnfInput inp 
)

Append the XML form of an ACD configuration to the file.

Parameters:
fp Pointer to file to write the XML into
inp Pointer to the configuration data to write

void printCAL ( FILE *  fp,
LCI_cnfInput inp 
)

Append the XML form of a CAL configuration to the file.

Parameters:
fp Pointer to file to write the XML into
inp Pointer to the configuration data to write

void printChnl ( FILE *  fp,
LCI_cnfItem itm,
unsigned  indent 
)

Write out the TKR channel configuration item.

Parameters:
fp Pointer to file to write XML into
itm Configuration item to write
indent Current depth of the indent

void printCol ( FILE *  fp,
LCI_cnfItem itm,
unsigned  indent 
)

Write out the CAL column configuration item.

Parameters:
fp Pointer to file to write XML into
itm Configuration item to write
indent Current depth of the indent

void printEndACD ( FILE *  fp  ) 

Print the last line of an ACD XML file.

Parameters:
fp Pointer to file to write XML into

void printEndCAL ( FILE *  fp  ) 

Print the last line of a CAL XML file.

Parameters:
fp Pointer to file to write XML into

void printEndTKR ( FILE *  fp  ) 

Print the last line of a TKR XML file.

Parameters:
fp Pointer to file to write XML into

void printIndent ( FILE *  fp,
unsigned  indent 
)

Print an indentation into a file.

Parameters:
fp Pointer to file to write indent into
indent Size of the indentation

void printItem ( FILE *  fp,
LCI_cnfItem itm,
unsigned  indent,
const char *  tag 
)

Write out a configuration item as either the keyword LATC, the single tag "constant" or the set of tags "initial", "delta" and "count".

Parameters:
fp Pointer to file to write XML into
itm Configuration item to write
indent Current depth of the indent
tag String for the XML tag containing the item

void printStartACD ( FILE *  fp  ) 

Print the first lines of an ACD XML file.

Parameters:
fp Pointer to file to write XML into

void printStartCAL ( FILE *  fp  ) 

Print the first three lines of a CAL XML file.

Parameters:
fp Pointer to file to write XML into

void printStartTKR ( FILE *  fp  ) 

Print the first three lines of a TKR XML file.

Parameters:
fp Pointer to file to write XML into

void printTKR ( FILE *  fp,
LCI_cnfInput inp 
)

Append the XML form of a TKR configuration to the file.

Parameters:
fp Pointer to file to write the XML into
inp Pointer to the configuration data to write

void setItemCst ( LCI_cnfItem itm,
unsigned  val 
)

Fill the fields of the configuration item to produce a constant value.

Parameters:
itm Pointer to the configuration item to fill
val Constant value to set the configuration item to

void setItemVar ( LCI_cnfItem itm,
unsigned  start,
unsigned  count,
unsigned  delta 
)

Set the start, count and delta fields of the configuration item.

Parameters:
itm Pointer to the configuration item to fill
start Start value for the configuration item
count Count value for the configuration item
delta Delta value for the configuration item


Generated on Tue May 25 13:34:53 2010 by  doxygen 1.5.3