GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LDT / V0-4-0

Constituent: encdec     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

FCS.c File Reference

Utilities to compute a Fletcher checksum. More...

#include "LDT/FCS.h"
#include "dprintf.h"
#include "PBI/Unions.h"

Include dependency graph for FCS.c:


Functions

unsigned int FCS_calculate16 (const unsigned short int *data, unsigned int cnt)
 Calculates the 32-bit Fletcher checksum over the 16-bit data array.
unsigned int FCS_calculate32 (const unsigned int *data, unsigned int cnt)
 Calculates the 32-bit Fletcher checksum over the 32-bit data array.
void FCS_construct (FCS_checksum *checksum)
 Constructs a Fletcher checksum context. This is used when the data to be checksummed is not in one contigious array.
void FCS_accumulate16 (FCS_checksum *checksum, const unsigned short int *data, unsigned int cnt)
 Updates the current Fletcher checksum.
void FCS_accumulate32 (FCS_checksum *checksum, const unsigned int *data, unsigned int cnt)
 Updates the current Fletcher checksum.
unsigned int FCS_get (const FCS_checksum *checksum)
 Processes the Fletcher checksum context, returning the current value of the checksum.

Detailed Description

Utilities to compute a Fletcher checksum.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: FCS.c,v 1.1 2009/04/30 00:32:16 russell Exp $

Function Documentation

void FCS_accumulate16 ( FCS_checksum checksum,
const unsigned short int *  data,
unsigned int  cnt 
)

Updates the current Fletcher checksum.

Parameters:
checksum The Fletcher checksum context.
data The 16-bit data array to add to the current checksum
cnt The count of elements in data

void FCS_accumulate32 ( FCS_checksum checksum,
const unsigned int *  data,
unsigned int  cnt 
)

Updates the current Fletcher checksum.

Parameters:
checksum The Fletcher checksum context.
data The 32-bit data array to add to the current checksum
cnt The count of elements in data

unsigned int FCS_calculate16 ( const unsigned short int *  data,
unsigned int  cnt 
)

Calculates the 32-bit Fletcher checksum over the 16-bit data array.

Returns:
The 32-bit Fletcher checksum
Parameters:
data The 16-bit data array to checksum
cnt The count of elements in data

unsigned int FCS_calculate32 ( const unsigned int *  data,
unsigned int  cnt 
)

Calculates the 32-bit Fletcher checksum over the 32-bit data array.

Returns:
The 32-bit Fletcher checksum
Parameters:
data The 32-bit data array to checksum
cnt The count of elements in data

void FCS_construct ( FCS_checksum checksum  ) 

Constructs a Fletcher checksum context. This is used when the data to be checksummed is not in one contigious array.

Parameters:
checksum The Fletcher checksum context to be constructed.

unsigned int FCS_get ( const FCS_checksum checksum  ) 

Processes the Fletcher checksum context, returning the current value of the checksum.

Returns:
The current value of the 32-bit Fletcher checksum
Parameters:
checksum The Fletcher checksum context.


Generated on Fri Jun 19 01:48:10 2009 by  doxygen 1.5.3