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

Constituent: qssp     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QASC.h File Reference

Interface to the ACD Software Counters. More...

This graph shows which files directly or indirectly include this file:


Typedefs

typedef enum _QASC_STATUS QASC_STATUS
 Typedef for enum _QASC_STATUS.

Enumerations

enum  _QASC_STATUS {
  QASC_STATUS_SUCCESS = 0,
  QASC_STATUS_DGM_UNKNOWN_TYPEID = -2,
  QASC_STATUS_DGM_UNKNOWN_VER = -3,
  QASC_STATUS_CTB_UNKNOWN_VER = -4,
  QASC_STATUS_CTB_BAD_LEN32 = -5,
  QASC_STATUS_CTB_UNKNOWN_TYPEID = -6,
  QASC_STATUS_CTB_WRONG_TYPEID = -7,
  QASC_STATUS_CTB_INFLATE_FAIL = -8
}
 Enumerates the varios status codes. More...

Functions

QASCQASC_alloc (void *must_be_null)
 Allocates and constructs a QASC handle.
const LSF_contribution * QASC_updateAtDatagram (QASC *qstd, const LSF_datagram *dgm)
 Updates the context at datagram time.
int QASC_updateAtContribution (QASC *qstd, const LSF_contribution *ctb)
 Updates the context at datagram time.
int QASC_updateAtRecord (QASC *qstd, const LSF_record *rec)
 Updates the context at record time.
void QASC_destruct (QASC *qstd)
 The destructor for a QASC control structure.
const QASC_ctxQASC_ctxGet (const QASC *qstd)
 Locates the statistics context (meta-data).
int QASC_sizeof (void *must_be_null)
 Return the size, in bytes, of the buffer needed to handle a QASC datagram.
QASCQASC_construct (QASC *qstd, void *must_be_null)
 The constructor for a QASC control structure.
QASC_status QASC_expand (QASC *qasc, const LSF_contribution *ctb)
 Routine to check integrity and swap/uncompress input data into a 2nd buffer.
int QASC_idxGemGet (int group, int channel)
 Maps an ACD GEM group and channel into a universal index.
int QASC_idxAemGet (int board, int channel)
 Maps an ACD AEM board number and channel into a universal index.

Detailed Description

Interface to the ACD Software Counters.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: QASC.h,v 1.1 2008/06/10 22:28:38 russell Exp $

Enumeration Type Documentation

enum _QASC_STATUS
 

Enumerates the varios status codes.

Enumerator:
QASC_STATUS_SUCCESS  All is well
QASC_STATUS_DGM_UNKNOWN_TYPEID  LSF datagram header has typeid which is not in LSF/LSF_ids.h
QASC_STATUS_DGM_UNKNOWN_VER  LSF datagram header has an unknown version number
QASC_STATUS_CTB_UNKNOWN_VER  LSF contributor header has unknown version number
QASC_STATUS_CTB_BAD_LEN32  LSF contributor has an incorrect length for the packet
QASC_STATUS_CTB_UNKNOWN_TYPEID  LSF contributor header has typeid which is not in QASC_TYPEID
QASC_STATUS_CTB_WRONG_TYPEID  typeid of data does not match the QASC_xxxGetXxxx
QASC_STATUS_CTB_INFLATE_FAIL  Decompression step failed


Function Documentation

QASC * QASC_alloc void *  must_be_null  ) 
 

Allocates and constructs a QASC handle.

Returns:
Pointer to the allocated handle
Parameters:
must_be_null Reserved for future use.

QASC * QASC_construct QASC qasc,
void *  must_be_null
 

The constructor for a QASC control structure.

Returns:
Pointer to the QASC control structure
Parameters:
qasc The control structure to be constructed. If NULL, a control structure will be allocated
must_be_null Reserved for future use.

const QASC_ctx * QASC_ctxGet const QASC qasc  ) 
 

Locates the statistics context (meta-data).

Parameters:
qasc The statistics context

void QASC_destruct QASC qasc  ) 
 

The destructor for a QASC control structure.

Returns:
Pointer to the QSS control structure
Parameters:
qasc The control structure to be destructed.

QASC_STATUS QASC_expand QASC qasc,
const LSF_contribution *  ctb
 

Routine to check integrity and swap/uncompress input data into a 2nd buffer.

Return values:
QASC_STATUS_SUCCESS,if successful (0)
QASC_STATUS_CTB_BAD_LEN32,if the contributor length is inconsistent with the data.
QASC_STATUS_CTB_UNKNOWN_VER,if the encoding/data format version is unknown.
QASC_STATUS_CTB_INFLATE_FAIL,for compressed formats, indicates the failure to inflate the data
Parameters:
qasc The data access handle to be filled
ctb Input buffer
The check routine does integrity checks on the given LSF contributor packet and then decompress/swaps data into the output buffer. THe size of the output buffer is determined by QASC_sizeof(). The output buffer can then be used as input with the QASC_xxxxLocate routines.

This routine assumes the contributor has been byte-swapped.

QASC_idxAemGet int  board,
int  channel
 

Maps an ACD AEM board number and channel into a universal index.

Return values:
>=0,The universal index for the specifed ACD AEM board and channel
< 0, Invalid board or channel number
Parameters:
board This is a value between 0 and 11 corresponding to the the 12 AEM FREE board/cable numbers
  • 0 1LA, 1 1RB
  • 2 2LA, 3 2LB
  • 4 2RA, 5 2RB
  • 6 3LA, 7 3RB
  • 8 4LA, 9 4LB
  • 9 4RA, 10 4RB
channel The channel, 0-18, within each FREE board/cable.

QASC_idxGemGet int  group,
int  channel
 

Maps an ACD GEM group and channel into a universal index.

Return values:
>=0,The universal index for the specifed ACD group and channel
< 0, Invalid list or channel number
Parameters:
group This is a value between 0 and 3 corresponding to the 4 words in the GEM record -0 XZ plane -1 YZ plane -2 XY plane -3 RU plane
channel The channel, 0-31, within each list. The bits are numbered from least significant bit to most significant bit

int QASC_sizeof void *  must_be_null  ) 
 

Return the size, in bytes, of the buffer needed to handle a QASC datagram.

Return values:
The size, in bytes, of the buffer needed to handle a QASC datagram

int QASC_updateAtContribution QASC qasc,
const LSF_contribution *  ctb
 

Updates the context at datagram time.

Return values:
If have a statistics sample contribution, the number of records in the contribution.
>0,if have a record contributor
=0,if have the contribution context
-1,if unrecognized
Parameters:
qasc The statistics context to update.
ctb The statistics contribution

const LSF_contribution * QASC_updateAtDatagram QASC qasc,
const LSF_datagram *  dgm
 

Updates the context at datagram time.

Returns:
The contribution to resume processsing at
Parameters:
qasc The statistics context to update.
dgm The statistics datagram

int QASC_updateAtRecord QASC qasc,
const LSF_record *  rec
 

Updates the context at record time.

Return values:
Non-negative values indicate are one of the QASC_type's
Negative values indicate an unsuccessful update
Parameters:
qasc The statistics context to update.
rec The statistics record


Generated on Thu Jun 12 02:29:53 2008 by  doxygen 1.4.4