GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-0 > qse / sun-gcc
#include "QSE/QDF_acd.h"
#include "QSE/QDF_exc.h"
#include "QDF_acd_def.h"
#include "QDF_exc_def.h"
#include "EDS/EDA_acd.h"
#include "LDT/BFU.h"
#include "LDT/HUFF.h"
#include "LDT/HDD.h"
#include "LDT/BIT.h"
#include <string.h>
Typedefs | |
typedef enum _CDF_ACD_PED_STYLE_K | CDF_ACD_PED_STYLE_K |
Typedef for enum _CDF_ACD_PED_STYLE_K. | |
typedef BFU(* | Decoder )(QDF_acdCtx *ctx, QDF_acdEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Enumerations | |
enum | _CDF_ACD_PED_STYLE_K { CDF_ACD_PED_STYLE_K_COPY = 0, CDF_ACD_PED_STYLE_K_HUFFMAN = 1, CDF_ACD_PED_STYLE_K_RSVD_2 = 2, CDF_ACD_PED_STYLE_K_RSVD_3 = 3 } |
Enumerates the major format styles for ACD pedestal data. More... | |
Functions | |
static BFU | acd_ped_style_0 (QDF_acdCtx *ctx, QDF_acdEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the ACD when encoded as in style 0 format. This is format is almost a straight copy of the ACD data. | |
static BFU | acd_ped_style_1 (QDF_acdCtx *ctx, QDF_acdEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the ACD when encoded using in style 1. This format style uses a limited range huffman table. The limited means that only the central part of the pedestal subtracted data is encoded using a huffman table. Those value outside the central core are encoded in a look-aside exception list. | |
static BFU | acd_ped_style_2 (QDF_acdCtx *ctx, QDF_acdEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the ACD when encoded using a style 2. Currently there is no style 2, so any ACD data encoded in style 2 represents a serious error. | |
static BFU | acd_ped_style_3 (QDF_acdCtx *ctx, QDF_acdEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the ACD when encoded using a style 3. Currently there is no style 2, so any ACD data encoded in style 3 represents a serious error. | |
static BFU | aem_ped_unpack_cables (const unsigned int *src, unsigned int max, BFU bfu, unsigned short int *cables) |
Retrieves the list of missing or timed out cables. | |
static BFU | aem_ped_unpack_chnx (const unsigned int *src, unsigned int max, BFU bfu, QDF_acdPedEvt *aem) |
The channel exception address lists. | |
static BFU | aem_ped_unpack_phax (const unsigned int *src, unsigned int max, BFU bfu, QDF_acdPedEvt *aem) |
The channel exception address lists. | |
static __inline BFU | aem_ped_unpack_dadcs (const unsigned int *src, unsigned int max, BFU bfu, QDF_acdPedEvt *aem, QDF_acdCtx *ctx) |
Unpacks the pedestal subtracted ADC values. | |
BFU | QDF_acdPedDecode (QDF_acdCtx *ctx, QDF_acdEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the ACD. |
CVS $Id: QDF_acd_ped.c,v 1.4 2007/04/08 22:42:50 russell Exp $
enum _CDF_ACD_PED_STYLE_K |
static BFU acd_ped_style_0 | ( | QDF_acdCtx * | ctx, | |
QDF_acdEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the ACD when encoded as in style 0 format. This is format is almost a straight copy of the ACD data.
ctx | The compressed data decoding context | |
evt | The ACD event block to fill in | |
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer |
static BFU acd_ped_style_1 | ( | QDF_acdCtx * | ctx, | |
QDF_acdEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the ACD when encoded using in style 1. This format style uses a limited range huffman table. The limited means that only the central part of the pedestal subtracted data is encoded using a huffman table. Those value outside the central core are encoded in a look-aside exception list.
ctx | The compressed data decoding context | |
evt | The ACD event block to fill in | |
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer |
static BFU acd_ped_style_2 | ( | QDF_acdCtx * | ctx, | |
QDF_acdEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the ACD when encoded using a style 2. Currently there is no style 2, so any ACD data encoded in style 2 represents a serious error.
ctx | The compressed data decoding context | |
evt | The ACD event block to fill in | |
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer |
static BFU acd_ped_style_3 | ( | QDF_acdCtx * | ctx, | |
QDF_acdEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the ACD when encoded using a style 3. Currently there is no style 2, so any ACD data encoded in style 3 represents a serious error.
ctx | The compressed data decoding context | |
evt | The ACD event block to fill in | |
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer |
static BFU aem_ped_unpack_cables | ( | const unsigned int * | src, | |
unsigned int | max, | |||
BFU | bfu, | |||
unsigned short int * | cables | |||
) | [static] |
Retrieves the list of missing or timed out cables.
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer | |
cables | The bit mask of cables to pack away |
static BFU aem_ped_unpack_chnx | ( | const unsigned int * | src, | |
unsigned int | max, | |||
BFU | bfu, | |||
QDF_acdPedEvt * | aem | |||
) | [static] |
The channel exception address lists.
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer | |
aem | The data structure to receive the unpacked lists |
The collection of these condition form a 3-bit number. This number identiifies one of 8 lists which are encoded into the data stream. The list of addresses associated with each list is extracted from the stream and stored in the channel exception lists. The lists are stored this way to avoid duplicating address. That is, an channel with one or more exceptions is only emitted once. On this side, it would make sense to condense the lists at this time.
!!! THE ABOVE STEP NEEDS TO BE DONE
static __inline BFU aem_ped_unpack_dadcs | ( | const unsigned int * | src, | |
unsigned int | max, | |||
BFU | bfu, | |||
QDF_acdPedEvt * | aem, | |||
QDF_acdCtx * | ctx | |||
) | [static] |
Unpacks the pedestal subtracted ADC values.
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer | |
aem | The data structure to receive the unpacked lists | |
ctx | The compressed data decoding context |
static BFU aem_ped_unpack_phax | ( | const unsigned int * | src, | |
unsigned int | max, | |||
BFU | bfu, | |||
QDF_acdPedEvt * | aem | |||
) | [static] |
The channel exception address lists.
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer | |
aem | The data structure to receive the unpacked lists |
BFU QDF_acdPedDecode | ( | QDF_acdCtx * | ctx, | |
QDF_acdEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) |
Decodes the ACD.
ctx | The compressed data decoding context | |
evt | The ACD event block to fill in | |
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer |