GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LDT / dev > encdec / rhel5-32
Classes | |
struct | _FCS_checksum |
Structure to hold the context needed when forming the checksum over multiple arrays of data. More... | |
Typedefs | |
typedef struct _FCS_checksum | FCS_checksum |
Typedef for struct _FCS_checksum. | |
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.h,v 1.1 2009/04/30 00:32:16 russell Exp $
FCS_checksum fcs; unsigned int checksum; FCS_checksumConstruct (&fcs); FCS_checksumUpdate32 (&fcs, array_1, 10); FCS_checksumUpdate32 (&fcs, array_2, 20); FCS_checksumUpdate16 (&fcs, array_3, 30); checksum = FCS_checksumGet (&fcs);
Typedef for struct _FCS_checksum.
The fields inside this data structure should never be manipulated by the user. The only reason it is provided as part of the public interface is so that the user may conveniently get an instance without doing an allocation.
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.