GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > RIM / V1-0-0

Constituent: trim     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

t_record.c File Reference

Test the record routine. More...

#include "RIM/RIM.h"
#include "ctors_p.h"
#include "RIM_AG_init_p.h"
#include "RIM_AG_types_p.h"
#include "RIM_descriptions.ic"
#include "RIM_number.ic"

Include dependency graph for t_record.c:


Defines

#define SET_FIRST_ERROR   { if(!rec_error) {rec_error = __LINE__; } }
 Macro that records the line number of the first error encountered.

Functions

void startDgm (void *ctl)
 Function checking arguments used to start a new datagram.
unsigned startCtb (void *ctl, size_t size, unsigned type)
 Function checking arguments used to start a new contribution.
void addData (void *ctl, void *data, size_t size)
 Function checking arguments used to add the next block of data.
void endCtb (void *ctl)
 Function checking arguments used to end a contribution.
unsigned endDgm (void *ctl)
 Function checking arguments used to end a datagram.
unsigned nextIndex (void)
 Get the next expected index.
int t_record (void *param)
 Test of the RIM_record function.

Variables

static unsigned rec_error = 0
 Store the line number of the first error.
static unsigned e_type = 0
 The current expected type.
static unsigned isMap = 1
 Flag indicating that the current data block is a component map.
static RIMrim = NULL
 Pointer to the RIM structure being recorded, held as a static so that the verification functions can access it.
static unsigned e_index = 0
 Current expected index.
static void * pkt = (void*)(0xdeafabba)
 Pointer passed around in place of the control pointer.

Detailed Description

Test the record routine.

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

Function Documentation

void addData void *  ctl,
void *  data,
size_t  size
 

Function checking arguments used to add the next block of data.

Parameters:
ctl Pkt
data Pointer to the data to be written out
size Size of the block of data to be written

void endCtb void *  ctl  ) 
 

Function checking arguments used to end a contribution.

Parameters:
ctl Pkt

unsigned endDgm void *  ctl  ) 
 

Function checking arguments used to end a datagram.

Parameters:
ctl Pkt
Return values:
RIM_SUCCESS 

unsigned nextIndex void   ) 
 

Get the next expected index.

Returns:
the index or -1 if there are no more set bits in the map

unsigned startCtb void *  ctl,
size_t  size,
unsigned  type
 

Function checking arguments used to start a new contribution.

Parameters:
ctl Pkt
size Size of the contribution, either the size of the map type or the combined size of the data blocks
type Type ID of the contribution
Return values:
0 

void startDgm void *  ctl  ) 
 

Function checking arguments used to start a new datagram.

Parameters:
ctl Pkt

int t_record void *  param  ) 
 

Test of the RIM_record function.

Parameters:
param Pointer to the control structure (if any) used by this test function
Returns:
The line number of the first error, or 0 if the test passes


Generated on Fri Jun 15 02:07:51 2007 by  doxygen 1.4.4