GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LATC / V9-1-2 > latc_test_embd / rad750


Interface   Data Structures   File List   Data Fields   Globals  

t_data.c File Reference

Test the data manipulation routines of the LATC pkg. More...

#include "LATC/LATC_msgs.h"
#include "t_data_p.h"
#include "data.h"
#include "addr.h"
#include "AG_number_s.h"
#include "AG_initIMM_p.h"
#include "AG_latcType_s.h"
#include "LEM/msg_macros.h"
#include "PBS/MBA.h"
#include "MSG/MSG_pubdefs.h"
#include "mask.ic"
#include <stdio.h>
#include <string.h>

Classes

union  pu
 Union of a char array and an unsigned array, used as payloads. More...

Functions

int checkZero (LATC_imm *this, unsigned igtype, LATC_addr *igaddr, int igregId)
 Iterates over all the leaves of the tree and checks that they are zero.
void maskFld (LATC_type type, int regId, int fldId, void *value)
 mask the value down to the size of the field
int t_data (void *ptr)
 Tests the simple data manupulation functions of the LATC pkg.


Detailed Description

Test the data manipulation routines of the LATC pkg.

Author:
James Swain -- jswain@slac.stanford.edu

Function Documentation

int checkZero ( LATC_imm *  this,
unsigned  igtype,
LATC_addr igaddr,
int  igregId 
)

Iterates over all the leaves of the tree and checks that they are zero.

Parameters:
this Configuration to check
igtype Type of the leaf to ignore (that is known to be non-zero)
igaddr Pointer to an address structure for the leaf to ignore
igregId Register ID of the register to ignore.
Returns:
0 or the line number of the first error

References LATC_addr::cpt.

Referenced by t_data().

void maskFld ( LATC_type  type,
int  regId,
int  fldId,
void *  value 
)

mask the value down to the size of the field

Parameters:
type Type of data sought
regId Enum specifying register to write to
fldId Enum specifying field to write to
value Value to set the field to.

References RegDescription::fd, maskLngLngFld(), maskLongFld(), maskShortFld(), CptDescription::rd, and CptDescription::width.

Referenced by t_data().

int t_data ( void *  ptr  ) 

Tests the simple data manupulation functions of the LATC pkg.

Parameters:
ptr Pointer to test specific data
Returns:
0 (pass) or the line number (fail)

References checkZero(), LATC_addr::cpt, maskFld(), RegDescription::nflds, CptDescription::nregs, CptDescription::rd, sizeofCpt(), pu::uc, and pu::ui.


Generated on Fri Apr 1 22:26:54 2011 by  doxygen 1.5.8