GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LDT / dev > encdec / rhel6-32
#include <LDT/FCS.h>
#include <dprintf.h>
#include <PBI/Unions.h>
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. |
CVS $Id: FCS.c,v 1.2 2011/03/25 23:57:13 russell Exp $
void FCS_accumulate16 | ( | FCS_checksum * | checksum, | |
const unsigned short int * | data, | |||
unsigned int | cnt | |||
) |
Updates the current Fletcher checksum.
checksum | The Fletcher checksum context. | |
data | The 16-bit data array to add to the current checksum | |
cnt | The count of elements in data |
References _FCS_checksum::left, _FCS_checksum::sum1, and _FCS_checksum::sum2.
void FCS_accumulate32 | ( | FCS_checksum * | checksum, | |
const unsigned int * | data, | |||
unsigned int | cnt | |||
) |
Updates the current Fletcher checksum.
checksum | The Fletcher checksum context. | |
data | The 32-bit data array to add to the current checksum | |
cnt | The count of elements in data |
References dprintf, _FCS_checksum::left, _FCS_checksum::sum1, and _FCS_checksum::sum2.
unsigned int FCS_calculate16 | ( | const unsigned short int * | data, | |
unsigned int | cnt | |||
) |
Calculates the 32-bit Fletcher checksum over the 16-bit data array.
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.
data | The 32-bit data array to checksum | |
cnt | The count of elements in data |
References dprintf.
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.
checksum | The Fletcher checksum context to be constructed. |
References _FCS_checksum::left, _FCS_checksum::sum1, and _FCS_checksum::sum2.
unsigned int FCS_get | ( | const FCS_checksum * | checksum | ) |
Processes the Fletcher checksum context, returning the current value of the checksum.
checksum | The Fletcher checksum context. |
References _FCS_checksum::left, _FCS_checksum::sum1, and _FCS_checksum::sum2.