GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSEC / V6-1-0 > lsec / sun-gcc
#include "LSEC/LSEC_msgs.h"
#include "compress_p.h"
#include "LDT/APM.h"
#include "PBS/MBA.h"
#include "MSG/MSG_pubdefs.h"
#include <string.h>
Functions | |
unsigned | LSEC_checkCompression (LSEC_compression *cpr) |
Check if there were errors during the histogram or encode operations. | |
void | LSEC_clearCompression (LSEC_compression *cpr) |
Clear the compression structrure of any data from a previous cycle. | |
void | LSEC_deleteCompression (LSEC_compression *cpr) |
Free the memory associated with the compression structure. | |
unsigned int | LSEC_getBin (LSEC_compression *cpr, unsigned int bin) |
Return the contents of one bin of the histogram. | |
unsigned int | LSEC_getCount (LSEC_compression *cpr) |
Return the number of non-zero bins in the histogram. | |
LSEC_compression * | LSEC_newCompression (unsigned int nbits, const char *name) |
Allocate and initialise a new compression structure. | |
unsigned * | LSEC_pack (LSEC_compression *cpr, unsigned *buffer) |
Pack the tables of a compression structure into a buffer. | |
size_t | LSEC_packedSize32 (LSEC_compression *cpr) |
Calculate the size of a packed compression structure. | |
unsigned | LSEC_process (LSEC_compression *cpr) |
Build the lookup, frequency and probability tables required by the APE. | |
void | LSEC_reportCompression (LSEC_compression *cmp, FILE *fp) |
Describe the contents of a compression structure. | |
void | LSEC_zeroBin (LSEC_compression *cpr, unsigned int bin) |
Set the selected bin of the histogram to zero. |
unsigned LSEC_checkCompression | ( | LSEC_compression * | cpr | ) |
Check if there were errors during the histogram or encode operations.
cpr | Pointer to a compression structure |
LSEC_SYMOOR | If any of the symbols histogrammed or encoded by this compression structure were out of range | |
LSEC_AWEFAIL | If there were any error during the encoding | |
LSEC_SUCCESS | If there were no errors |
void LSEC_clearCompression | ( | LSEC_compression * | cpr | ) |
Clear the compression structrure of any data from a previous cycle.
cpr | Pointer to an allocated, initialised, compression structure |
void LSEC_deleteCompression | ( | LSEC_compression * | cpr | ) |
Free the memory associated with the compression structure.
cpr | Pointer to an allocated compression structure |
unsigned int LSEC_getBin | ( | LSEC_compression * | cpr, | |
unsigned int | bin | |||
) |
Return the contents of one bin of the histogram.
cpr | Pointer to an allocated, initialised, populated, compression structure | |
bin | ID of one of the bins of the histogram |
unsigned int LSEC_getCount | ( | LSEC_compression * | cpr | ) |
Return the number of non-zero bins in the histogram.
cpr | Pointer to a compression structure |
LSEC_compression* LSEC_newCompression | ( | unsigned int | nbits, | |
const char * | name | |||
) |
Allocate and initialise a new compression structure.
name | String used in the reporting of error to identify a compression structure | |
nbits | Number of symbols in the complete range of possible symbols (including excluded internal sub-ranges), hence the number of bins in the histogram and frequency tables |
unsigned* LSEC_pack | ( | LSEC_compression * | cpr, | |
unsigned * | buffer | |||
) |
Pack the tables of a compression structure into a buffer.
This routine selects sufficient data from the tables of the compression structure to be able to recreate the tables required to decompress the data, and pack it into the consignment
buffer | Pointer to the start of the buffer to place the packed structure | |
cpr | Pointer to an initialised, populated and processed compression structure |
size_t LSEC_packedSize32 | ( | LSEC_compression * | cpr | ) |
Calculate the size of a packed compression structure.
This routine calculates the number of 32-bit words required to hold the packed compression structure
cpr | Pointer to a compression structure |
unsigned LSEC_process | ( | LSEC_compression * | cpr | ) |
Build the lookup, frequency and probability tables required by the APE.
cpr | Pointer to an allocated, initialised, populated, compression structure |
LSEC_SUCCESS | If the processing goes well |
void LSEC_reportCompression | ( | LSEC_compression * | cmp, | |
FILE * | fp | |||
) |
Describe the contents of a compression structure.
This routine formats the compression structure as ASCII text and writes it to the specified file
cmp | Pointer to the compression structure | |
fp | Pointer to the file used as the destination |
void LSEC_zeroBin | ( | LSEC_compression * | cpr, | |
unsigned int | bin | |||
) |
Set the selected bin of the histogram to zero.
This indicates that this symbol will be selectively removed from the uncompressed data stream before encoding
cpr | Pointer to an allocated, initialised, populated, compression structure | |
bin | ID of one of the bins of the histogram |