GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QLCM / V0-3-1

Constituent: qstats_dump     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QSTATS.c File Reference

Science defs for Stats from LCB, EBM, ... More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "LSF/LSF.h"
#include "LSF/LSF_ids.h"
#include "LSF/LSF_statsHdr.h"
#include "ZLIB/zlib.h"
#include "PBS/BSWP.h"
#include "PBS/BSWP.ih"
#include "QLCM/QSTATS.h"
#include "src/QSTATS_prvdefs.h"

Include dependency graph for QSTATS.c:


Functions

unsigned int QSTATS_printDatagram (const LSF_datagram *dgPtr, unsigned int optionMask)
 Print the QSTATS packet given the pointer to the whole LSF datagram.
unsigned int QSTATS_printCtb (const LSF_contribution *ctbPtrIn, unsigned int optionMask)
 Print the QSTATS packet given the pointer to the LSF contributor.
const char * QSTATS_errToStr (QSTATS_STATUS status)
 Convert error code to a string.
unsigned int QSTATS_sizeof ()
 get size of buffer to receive uncompressed/swapped data
LSF_contribution_hdr * QSTATS_swapCtbHdr (LSF_contribution_hdr *ctbPtrOut, const LSF_contribution *ctbPtrIn)
 Routine to pull/swap LSF contributor header from input to output buffer.
QSTATS_ID QSTATS_typeof (const LSF_contribution *ctbPtr)
 get type of given contribution
QSTATS_STATUS QSTATS_lcbExpand (QSTATS_lcb *lcbPtr, const LSF_contribution *ctbPtrIn)
 Routine to check integrity and swap/uncompress input data into a 2nd buffer.
long long QSTATS_lcbGetTimestamp (QSTATS_lcb *lcbPtr)
 Routine to return sample time timestamp from expanded buffer.
QLCBD_statsQSTATS_lcbGetStats (QSTATS_lcb *lcbPtr)
 Routine to return ptr of QLCBD stat struct from expanded buffer.
void QSTATS_lcbPrint (QSTATS_lcb *lcbPtr, unsigned int optionMask)
 Print the QSTATS lcb packet given the pointer to the swapped payload.
QSTATS_STATUS QSTATS_ebmExpand (QSTATS_ebm *ebmPtr, const LSF_contribution *ctbPtrIn)
 Routine to check integrity and swap/uncompress input data into a 2nd buffer.
long long QSTATS_ebmGetTimestamp (QSTATS_ebm *ebmPtr)
 Routine to return sample time timestamp from expanded buffer.
const unsigned int * QSTATS_ebmGetRecvCTB (QSTATS_ebm *ebmPtr)
 Routine to return array of EBM recv stats.
const unsigned int * QSTATS_ebmGetRecvSIU (QSTATS_ebm *ebmPtr)
 Routine to return array of SIU recv stats.
const unsigned int * QSTATS_ebmGetRecvEPU (QSTATS_ebm *ebmPtr)
 Routine to return array of EPU recv stats.
const unsigned int * QSTATS_ebmGetTransSIU (QSTATS_ebm *ebmPtr)
 Routine to return array of SIU transmit stats.
const unsigned int * QSTATS_ebmGetTransEPU (QSTATS_ebm *ebmPtr)
 Routine to return array of EPU transmit stats.
const unsigned int QSTATS_ebmGetTransSSR (QSTATS_ebm *ebmPtr)
 Routine to return SSR transmit stats.
void QSTATS_ebmPrint (QSTATS_ebm *ebmPtr, unsigned int optionMask)
 Print the QSTATS ebm packet given the pointer to the swapped payload.

Detailed Description

Science defs for Stats from LCB, EBM, ...

Author:
Ed Bacho -- ebacho@slac.stanford.edu
This package provides an API to expand and decode SMON science data from the science (SSR) interface.

Function Documentation

QSTATS_STATUS QSTATS_ebmExpand QSTATS_ebm ebmPtr,
const LSF_contribution *  ctbPtrIn
 

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

Parameters:
ebmPtr output buffer of size QSTATS_sizeof(), use as input for QSTATS_ebmGetXxx routines
ctbPtrIn input buffer
Returns:
status codes QSTATS_ERR_Xxxx, 0 if sucessfull
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 QSTATS_sizeof(). The output buffer can then be used as input with the QSTATS_ebmGetXxxx routines.

const unsigned int* QSTATS_ebmGetRecvCTB QSTATS_ebm ebmPtr  ) 
 

Routine to return array of EBM recv stats.

Parameters:
ebmPtr buff filled in by QSTATS_ebmExpand()
Returns:
int[4] for [GEM,AEM,TEMa,TEMb] ----------------------------------------------------------------------

const unsigned int* QSTATS_ebmGetRecvEPU QSTATS_ebm ebmPtr  ) 
 

Routine to return array of EPU recv stats.

Parameters:
ebmPtr buff filled in by QSTATS_ebmExpand()
Returns:
int[3] for [EPU0,EPU1,EPU2] ----------------------------------------------------------------------

const unsigned int* QSTATS_ebmGetRecvSIU QSTATS_ebm ebmPtr  ) 
 

Routine to return array of SIU recv stats.

Parameters:
ebmPtr buff filled in by QSTATS_ebmExpand()
Returns:
int[3] for [SIU0,SIU1,SIUX] ----------------------------------------------------------------------

long long QSTATS_ebmGetTimestamp QSTATS_ebm ebmPtr  ) 
 

Routine to return sample time timestamp from expanded buffer.

Parameters:
ebmPtr buff filed in by QSTATS_ebmExpand()
Returns:
timestamp of sample time in nanoSec since epoch ----------------------------------------------------------------------

const unsigned int* QSTATS_ebmGetTransEPU QSTATS_ebm ebmPtr  ) 
 

Routine to return array of EPU transmit stats.

Parameters:
ebmPtr buff filled in by QSTATS_ebmExpand()
Returns:
int[3] for [EPU0,EPU1,EPU2] ----------------------------------------------------------------------

const unsigned int* QSTATS_ebmGetTransSIU QSTATS_ebm ebmPtr  ) 
 

Routine to return array of SIU transmit stats.

Parameters:
ebmPtr buff filled in by QSTATS_ebmExpand()
Returns:
int[3] for [SIU0,SIU1,SIUX] ----------------------------------------------------------------------

const unsigned int QSTATS_ebmGetTransSSR QSTATS_ebm ebmPtr  ) 
 

Routine to return SSR transmit stats.

Parameters:
ebmPtr buff filled in by QSTATS_ebmExpand()
Returns:
int for SSR stats ----------------------------------------------------------------------

void QSTATS_ebmPrint QSTATS_ebm ebmPtr,
unsigned int  optionMask
 

Print the QSTATS ebm packet given the pointer to the swapped payload.

Parameters:
ebmPtr Pointer from QSTATS_ebmExpand
optionMask print options
Returns:
none ----------------------------------------------------------------------

const char* QSTATS_errToStr QSTATS_STATUS  status  ) 
 

Convert error code to a string.

Parameters:
status status codes QSTATS_ERR_Xxxx
Returns:
string of error code ----------------------------------------------------------------------

QSTATS_STATUS QSTATS_lcbExpand QSTATS_lcb lcbPtr,
const LSF_contribution *  ctbPtrIn
 

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

Parameters:
lcbPtr output buffer of size QSTATS_sizeof(), use as input for QSTATS_lcbGetXxx routines
ctbPtrIn input buffer
Returns:
status codes QSTATS_ERR_Xxxx, 0 if sucessfull
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 QSTATS_sizeof(). The output buffer can then be used as input with the QSTATS_lcbGetXxxx routines.

QLCBD_stats* QSTATS_lcbGetStats QSTATS_lcb lcbPtr  ) 
 

Routine to return ptr of QLCBD stat struct from expanded buffer.

Parameters:
lcbPtr buff filed in by QSTATS_lcbExpand()
Returns:
pointer to QLCBD statistics structure ----------------------------------------------------------------------

long long QSTATS_lcbGetTimestamp QSTATS_lcb lcbPtr  ) 
 

Routine to return sample time timestamp from expanded buffer.

Parameters:
lcbPtr buff filed in by QSTATS_lcbExpand()
Returns:
timestamp of sample time in nanoSec since epoch ----------------------------------------------------------------------

void QSTATS_lcbPrint QSTATS_lcb lcbPtr,
unsigned int  optionMask
 

Print the QSTATS lcb packet given the pointer to the swapped payload.

Parameters:
lcbPtr Pointer from QSTATS_lcbExpand
optionMask print options
Returns:
none ----------------------------------------------------------------------

unsigned int QSTATS_printCtb const LSF_contribution *  ctbPtrIn,
unsigned int  optionMask
 

Print the QSTATS packet given the pointer to the LSF contributor.

Parameters:
ctbPtrIn Pointer to start of raw LSF contributor (before QEMP_check())
optionMask print options
Returns:
status ----------------------------------------------------------------------

unsigned int QSTATS_printDatagram const LSF_datagram *  dgPtr,
unsigned int  optionMask
 

Print the QSTATS packet given the pointer to the whole LSF datagram.

Parameters:
dgPtr Pointer to start of raw LSF datagram (includes QSTATS_check())
optionMask print options
Returns:
status codes ----------------------------------------------------------------------

unsigned int QSTATS_sizeof  ) 
 

get size of buffer to receive uncompressed/swapped data

Returns:
Size of required destination buffer in bytes

LSF_contribution_hdr* QSTATS_swapCtbHdr LSF_contribution_hdr *  ctbPtrOut,
const LSF_contribution *  ctbPtrIn
 

Routine to pull/swap LSF contributor header from input to output buffer.

Parameters:
ctbPtrOut Output buffer to put LSF contributor header in
ctbPtrIn INput buffer with possibly swapped LSF contrib data
Returns:
----------------------------------------------------------------------

QSTATS_ID QSTATS_typeof const LSF_contribution *  ctbPtr  ) 
 

get type of given contribution

Parameters:
ctbPtr input buffer
Returns:
type of record --> QEMP_ID_ASC_NOCOMPRESS, or QEMP_ID_ASC_COMPRESS ----------------------------------------------------------------------


Generated on Tue Jun 20 21:19:23 2006 by  doxygen 1.4.4