GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LSEC / dev

Constituent: lsec     Tag: mcp750


Interface   Data Structures   File List   Data Fields   Globals  

compact.c File Reference

Compaction implementation. More...

#include "compact_p.h"
#include "encode.h"
#include "compress.ic"
#include "acdraw.h"
#include "gemraw.h"
#include "LSEC/LSEC_msgs.h"
#include "LSEC/LSEC_ctx.h"
#include "LDT/APE.h"
#include "LDT/APD.h"
#include "EDS/EBF_siv.h"
#include "EDS/EBF_cid.h"
#include "EDS/EBF_cal.h"
#include "EDS/FFS.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/MBA.h"
#include "PBS/WCT.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

Include dependency graph for compact.c:


Functions

void LSEC_calculateCalMeans (LSEC_compaction *cpc)
 Calculate the mean value for each CAL log end.
unsigned LSEC_checkCompaction (LSEC_compaction *cpc)
 Check the substructures for errors.
void LSEC_clearCompaction (LSEC_compaction *cpc)
 Clear away any context from a previous cycle.
unsigned int * LSEC_consignEvt (LSEC_compaction *cpc, unsigned int *buf)
 Copy a single encoded event into the datagram.
unsigned int * LSEC_consignUser (LSEC_compaction *cpc, unsigned int *buf)
 Pack the tables against which the events will be encoded into the buffer.
void LSEC_deleteCompaction (LSEC_compaction *cpc)
 Free memory previously allocated with a call to LSEC_newCompaction.
unsigned LSEC_encode (LSEC_compaction *cpc, EBF_dir *dir)
 Encode the next event from the collection.
unsigned LSEC_monitorCompaction (LSEC_compaction *cpc, unsigned mon)
 Set the monitoring level for the compaction.
LSEC_compactionLSEC_newCompaction (unsigned cap)
 Allocate memory for an LSEC_compaction structure and all the substructures.
unsigned LSEC_processAcd (LSEC_compaction *cpc)
 Process ACD compaction data.
unsigned LSEC_processCal (LSEC_compaction *cpc)
 Process the CAL compression structures.
unsigned LSEC_processTkr (LSEC_compaction *cpc)
 Process the TKR compression structures.
void LSEC_reportCompaction (LSEC_compaction *cpc, FILE *fp)
 Write formatted ASCII output to a file.
void LSEC_setFourRange (LSEC_compaction *cpc, unsigned range)
 Set the four-range value.
void LSEC_setMode (LSEC_compaction *cpc, unsigned mode)
 Set the calibration mode.
unsigned LSEC_sizeofUser32 (LSEC_compaction *cpc)
 Calculate the number of 32-bit words required to hold tables against which the events will be encoded.

Detailed Description

Compaction implementation.

Author:
James Swain & Owen Saxton
Id
compact.c,v 1.12 2008/07/16 21:08:20 saxton Exp

Function Documentation

void LSEC_calculateCalMeans LSEC_compaction cpc  ) 
 

Calculate the mean value for each CAL log end.

Parameters:
cpc Pointer to an LSEC_compaction structure

unsigned LSEC_checkCompaction LSEC_compaction cpc  ) 
 

Check the substructures for errors.

Parameters:
cpc Pointer to a compaction object
Returns:
The last error from the first substrcture to be found in error or LSEC_SUCCESS if there are no errors.

void LSEC_clearCompaction LSEC_compaction cpc  ) 
 

Clear away any context from a previous cycle.

Parameters:
cpc Pointer to a compaction object

unsigned int* LSEC_consignEvt LSEC_compaction cpc,
unsigned int *  buf
 

Copy a single encoded event into the datagram.

Parameters:
cpc Pointer to the compaction structure holding the encoded event
buf Pointer to the location to place the encoded event
Returns:
Pointer to the next output location

unsigned int* LSEC_consignUser LSEC_compaction cpc,
unsigned int *  buf
 

Pack the tables against which the events will be encoded into the buffer.

Parameters:
buf Pointer to the buffer where the context should be placed.
cpc Pointer to the structure containing the tables (a compaction)
Returns:
Pointer to the next output location to be filled.

void LSEC_deleteCompaction LSEC_compaction cpc  ) 
 

Free memory previously allocated with a call to LSEC_newCompaction.

Parameters:
cpc Pointer to a compaction structure previously created by a call to LSEC_newCompaction

unsigned LSEC_encode LSEC_compaction cpc,
EBF_dir *  dir
 

Encode the next event from the collection.

Parameters:
cpc Pointer to an LSEC_compaction structure
dir Pointer to the event to encode
Returns:
Size of the compressed event, or 0 if there is an error

unsigned LSEC_monitorCompaction LSEC_compaction cpc,
unsigned  mon
 

Set the monitoring level for the compaction.

Parameters:
cpc Pointer to an initialised compaction
mon Monitoring level to set
Returns:
The previous monitoring level.

LSEC_compaction* LSEC_newCompaction unsigned  cap  ) 
 

Allocate memory for an LSEC_compaction structure and all the substructures.

Parameters:
cap Capacity of the calibration task, the maximum number of events that can be collected each cycle
Returns:
Pointer to an allocated, initialise, LSEC_compaction structure

unsigned LSEC_processAcd LSEC_compaction cpc  ) 
 

Process ACD compaction data.

Parameters:
cpc Pointer to an LSEC_compaction structure

unsigned LSEC_processCal LSEC_compaction cpc  ) 
 

Process the CAL compression structures.

Parameters:
cpc Pointer to an LSEC_compaction structure

unsigned LSEC_processTkr LSEC_compaction cpc  ) 
 

Process the TKR compression structures.

Parameters:
cpc Pointer to an LSEC_compaction structure

void LSEC_reportCompaction LSEC_compaction cpc,
FILE *  fp
 

Write formatted ASCII output to a file.

Parameters:
cpc Pointer to a compaction object
fp Pointer to the destination file

void LSEC_setFourRange LSEC_compaction cpc,
unsigned  range
 

Set the four-range value.

Parameters:
cpc Pointer to a compaction structure
range Flag indicating 4-range or auto-range

void LSEC_setMode LSEC_compaction cpc,
unsigned  mode
 

Set the calibration mode.

Parameters:
cpc Pointer to a compaction structure
mode The calibration mode

unsigned LSEC_sizeofUser32 LSEC_compaction cpc  ) 
 

Calculate the number of 32-bit words required to hold tables against which the events will be encoded.

Parameters:
cpc Pointer to the compaction structure
Returns:
Number of 32-bit words required to hold the context information


Generated on Thu Jul 17 01:16:31 2008 by  doxygen 1.4.4