GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSSP / V1-0-0

Constituent: qssp     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QSSP_span.c File Reference

Support functions for QSSP_span. More...

#include "QSSP/QSSP_span.h"
#include "QSSP/QSSP_point.h"
#include "QSSP_point_p.h"
#include "LSE/LSEW_ctxTim.h"
#include "EDS/EBF_gem.h"

Include dependency graph for QSSP_span.c:


Functions

__inline void QSSP_spanV0Complete (QSSP_spanV0 *span)
 Completes the derived values of the QSSP_spanV0 structure.
static const unsigned int * qssp_timetone_decode (QSD_timetone *timetone, const QSD_timetone *base, const unsigned int *dat, int flags)
 Decodes one timetone structure based on the differences.
static __inline const unsigned
int * 
qssp_timetones_decode (QSD_timetones *timetones, const QSD_timetones *base, const unsigned int *dat, unsigned int flags)
 Decodes the next set current timetone records into current.
const unsigned int * QSSP_spanV0DecodeTwo (unsigned int *diff_p, QSSP_spanV0 *cumulative, QSSP_spanV0 *current, const unsigned int *dat, unsigned char bridge)
 Decodes two headers that are just straight copies.
const unsigned int * QSSP_spanV0DecodeOne (unsigned int *diff_p, QSSP_spanV0 *cumulative, QSSP_spanV0 *current, const unsigned int *dat, unsigned char bridge)
 Decodes one header that is just a straight copy.
const unsigned int * QSSP_spanV0DecodeDiff (unsigned int *diff_p, QSSP_spanV0 *cumulative, QSSP_spanV0 *current, const unsigned int *dat, unsigned char bridge)
 Decodes the sample point information when it is encoded as a difference from the previous point to the current point.
void QSSP_spanV0Update (QSSP_spanV0 *dst, const QSSP_spanV0 *src)
 Logically combines the source span record with the destination span record.
__inline void QSSP_spanV1Complete (QSSP_spanV1 *span)
 Completes the derived values of the QSSP_spanV1 structure.
const unsigned int * QSSP_spanV1DecodeTwo (unsigned int *diff_p, QSSP_spanV1 *cumulative, QSSP_spanV1 *current, const unsigned int *dat, unsigned char bridge)
 Decodes two headers that are just straight copies.
const unsigned int * QSSP_spanV1DecodeOne (unsigned int *diff_p, QSSP_spanV1 *cumulative, QSSP_spanV1 *current, const unsigned int *dat, unsigned char bridge)
 Decodes one header that is just a straight copy.
const unsigned int * QSSP_spanV1DecodeDiff (unsigned int *diff_p, QSSP_spanV1 *cumulative, QSSP_spanV1 *current, const unsigned int *dat, unsigned char bridge)
 Decodes the sample point information when it is encoded as a difference from the previous point to the current point.
void QSSP_spanV1Update (QSSP_spanV1 *dst, const QSSP_spanV1 *src)
 Logically combines the source span record with the destination span record.

Detailed Description

Support functions for QSSP_span.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: QSSP_span.c,v 1.1 2008/06/10 22:30:00 russell Exp $

Function Documentation

__inline void QSSP_spanV0Complete QSSP_spanV0 span  ) 
 

Completes the derived values of the QSSP_spanV0 structure.

Parameters:
span The sample span structure to complete

const unsigned int * QSSP_spanV0DecodeDiff unsigned int *  diff_p,
QSSP_spanV0 cumulative,
QSSP_spanV0 current,
const unsigned int *  dat,
unsigned char  bridge
 

Decodes the sample point information when it is encoded as a difference from the previous point to the current point.

Returns:
The next location to continue the decoding
Parameters:
diff_p Pointer to the current sequence number difference
cumulative The cumulative span
current The current span
dat The input data to decode from
bridge The record's bridge word

static const unsigned int QSSP_spanV0DecodeOne unsigned int *  diff_p,
QSSP_spanV0 cumulative,
QSSP_spanV0 current,
const unsigned int *  dat,
unsigned char  bridge
 

Decodes one header that is just a straight copy.

Returns:
The next address to decode from
Parameters:
diff_p Pointer to the current sequence number difference
cumulative The cumulative span
current The current span
dat The input data to decode from
bridge The record's bridge word

const unsigned int * QSSP_spanV0DecodeTwo unsigned int *  diff_p,
QSSP_spanV0 cumulative,
QSSP_spanV0 current,
const unsigned int *  dat,
unsigned char  bridge
 

Decodes two headers that are just straight copies.

Returns:
The next address to decode from
Parameters:
diff_p Pointer to the current sequence number difference
cumulative The cumulative span
current The current span
dat The input data to decode from
bridge The record's bridge word

void QSSP_spanV0Update QSSP_spanV0 dst,
const QSSP_spanV0 src
 

Logically combines the source span record with the destination span record.

Parameters:
dst The destination span record
src The source span recode
Updatine a span record involves three operations
  • Replacing the end point in the destination span record with the end point in the source span record
  • Recalculating the delta time and delta sequence values
  • Adding the incremental fields. For V0 there are no such fields

__inline void QSSP_spanV1Complete QSSP_spanV1 span  ) 
 

Completes the derived values of the QSSP_spanV1 structure.

Parameters:
span The sample span structure to complete

const unsigned int * QSSP_spanV1DecodeDiff unsigned int *  diff_p,
QSSP_spanV1 cumulative,
QSSP_spanV1 current,
const unsigned int *  dat,
unsigned char  bridge
 

Decodes the sample point information when it is encoded as a difference from the previous point to the current point.

Returns:
The next location to continue the decoding
Parameters:
diff_p Pointer to the current sequence number difference
cumulative The cumulative span
current The current span
dat The input data to decode from
bridge The record's bridge word

static const unsigned int QSSP_spanV1DecodeOne unsigned int *  diff_p,
QSSP_spanV1 cumulative,
QSSP_spanV1 current,
const unsigned int *  dat,
unsigned char  bridge
 

Decodes one header that is just a straight copy.

Returns:
The next address to decode from
Parameters:
diff_p Pointer to the current sequence number difference
cumulative The cumulative span
current The current span
dat The input data to decode from
bridge The record's bridge word

const unsigned int * QSSP_spanV1DecodeTwo unsigned int *  diff_p,
QSSP_spanV1 cumulative,
QSSP_spanV1 current,
const unsigned int *  dat,
unsigned char  bridge
 

Decodes two headers that are just straight copies.

Returns:
The next address to decode from
Parameters:
diff_p Pointer to the current sequence number difference
cumulative The cumulative span
current The current span
dat The input data to decode from
bridge The record's bridge word

void QSSP_spanV1Update QSSP_spanV1 dst,
const QSSP_spanV1 src
 

Logically combines the source span record with the destination span record.

Parameters:
dst The destination span record
src The source span recode
Updatine a span record involves two operations
  • Replacing the end point in the destination span record with the end point in the source span record
  • Adding the incremental fields, such as the elapsed time and counts field

static const unsigned int * qssp_timetone_decode QSD_timetone *  timetone,
const QSD_timetone *  base,
const unsigned int *  dat,
int  flags
[static]
 

Decodes one timetone structure based on the differences.

Returns:
The next address to decode from
Parameters:
timetone The target timetone record
base The base timetone record. The decoded differences will be added to this structure
dat The data to be decoded
flags Flags used to interpret the data to be decoded
  • Bit 0 indicates the absolute Spectrum-Astro Epoch time in seconds is encoded in the the data
  • Bit 1 indicates the time actual timetone flags are stored in the data

static __inline const unsigned int * qssp_timetones_decode QSD_timetones *  timetones,
const QSD_timetones *  base,
const unsigned int *  dat,
unsigned int  flags
[static]
 

Decodes the next set current timetone records into current.

Returns:
A pointer to the next 32-bit word to decode
Parameters:
timetones The timetone structure to receive the decoded data
base The base timetone structure. This is needed because the timetones are stored in a differential format
dat The data stream
flags Two 2-bit decoding flags, stored left-justified, the first set for the previous timetone record and the second set for the current timetone record. See
See also:
qssp_timetone_decode for their meanings


Generated on Thu Jun 12 02:28:58 2008 by  doxygen 1.4.4