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

Constituent: qlsm_print     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QLSM.c File Reference

Science defs for LSM (Lat Spacesraft Messages). More...

#include <stdio.h>
#include "LSF/LSF.h"
#include "LSF/LSF_ids.h"
#include "QLSM/QLSM.h"
#include "src/QLSM_prvdefs.h"
#include "PBS/BSWP.h"
#include "PBS/BSWP.ih"

Include dependency graph for QLSM.c:


Functions

unsigned int QLSM_sizeof ()
 get size of buffer to receive uncompressed/swapped data
QLSM_TYPEID QLSM_typeof (const LSF_contribution *ctbPtr)
 get type of given contribution
QLSM_STATUS QLSM_attExpand (QLSM_att *attPtr, const LSF_contribution *ctbPtr)
 Routine to check integrity and swap/uncompress input data into a 2nd buffer.
QLSM_STATUS QLSM_ttExpand (QLSM_tt *ttPtr, const LSF_contribution *ctbPtr)
 Routine to check integrity and swap/uncompress input data into a 2nd buffer.
QLSM_STATUS QLSM_ancExpand (QLSM_anc *ancPtr, const LSF_contribution *ctbPtr)
 Routine to check integrity and swap/uncompress input data into a 2nd buffer.
LSF_contribution_hdr * QLSM_swapCtbHdr (LSF_contribution_hdr *ctbPtrOut, const LSF_contribution *ctbPtr)
 Routine to pull/swap LSF contributor header from input to output buffer.
unsigned int QLSM_ancGetSec (const QLSM_anc *ancPtr)
 Routine to pull "sec" field out of ANC packet after QLSM_ancExpand().
unsigned int QLSM_ancGetSub (const QLSM_anc *ancPtr)
 Routine to pull "sub" field out of ANC packet after QLSM_ancExpand().
const float * QLSM_ancGetPos (const QLSM_anc *ancPtr)
 Routine to pull "pos" field out of ANC packet after QLSM_ancExpand().
const float * QLSM_ancGetVel (const QLSM_anc *ancPtr)
 Routine to pull "vel" field out of ANC packet after QLSM_ancExpand().
unsigned int QLSM_ancGetMode (const QLSM_anc *ancPtr)
 Routine to pull "mode" field out of ANC packet after QLSM_ancExpand().
unsigned int QLSM_ancGetSsr (const QLSM_anc *ancPtr)
 Routine to pull "ssr" field out of ANC packet after QLSM_ancExpand().
unsigned int QLSM_ancGetFlags (const QLSM_anc *ancPtr)
 Routine to pull "flags" field out of ANC packet after QLSM_ancExpand().
unsigned int QLSM_attGetSec (const QLSM_att *attPtr)
 Routine to pull "sec" field out of ATT packet after QLSM_attExpand().
unsigned int QLSM_attGetSub (const QLSM_att *attPtr)
 Routine to pull "sub" field out of ATT packet after QLSM_attExpand().
const double * QLSM_attGetQuat (const QLSM_att *attPtr)
 Routine to pull "quat" field out of ATT packet after QLSM_attExpand().
const float * QLSM_attGetAvel (const QLSM_att *attPtr)
 Routine to pull "avel" field out of ATT packet after QLSM_attExpand().
unsigned int QLSM_ttGetTimetone (const QLSM_tt *ttPtr)
 Routine to pull "timetone" field out of TT packet after QLSM_ttExpand().
unsigned int QLSM_ttGetFlags (const QLSM_tt *ttPtr)
 Routine to pull "flags" field out of TT packet after QLSM_attExpand().
QLSM_STATUS QLSM_printDatagram (const LSF_datagram *dgPtr)
 Print the Magic7 packet given the pointer to the whole LSF datagram.
const char * QLSM_errToStr (QLSM_STATUS status)
 Convert error code to a string.
QLSM_STATUS QLSM_printCtb (const LSF_contribution *ctbPtr)
 Print the Magic7 packet given the pointer to the LSF contributor.
void QLSM_ttPrint (const QLSM_tt *ttPtr)
 Routine to print a TT buffer.
void QLSM_attPrint (const QLSM_att *attPtr)
 Routine to print a ATT buffer.
void QLSM_ancPrint (const QLSM_anc *ancPtr)
 Routine to print a ANC buffer.

Detailed Description

Science defs for LSM (Lat Spacesraft Messages).

Author:
Ed Bacho -- ebacho@slac.stanford.edu
This module handles the definitions of structures that are output as science data over the SSR.

Function Documentation

QLSM_STATUS QLSM_ancExpand QLSM_anc ancPtr,
const LSF_contribution *  ctbPtr
 

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

Parameters:
ancPtr output buffer of size QLSM_sizeof(), use as input for QLSM_ancGetXx routines
ctbPtr input buffer
Returns:
status codes QLSM_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 QLSM_sizeof(). The output buffer can then be used as input with the QLSM_ancGetXxxx routines.

unsigned int QLSM_ancGetFlags const QLSM_anc ancPtr  ) 
 

Routine to pull "flags" field out of ANC packet after QLSM_ancExpand().

Parameters:
ancPtr Output buffer from QLSM_ancExpand()
Returns:
returns "flags" field, 0 if unknown version (should have got err on QLSM_ancExpand()) ----------------------------------------------------------------------

unsigned int QLSM_ancGetMode const QLSM_anc ancPtr  ) 
 

Routine to pull "mode" field out of ANC packet after QLSM_ancExpand().

Parameters:
ancPtr Output buffer from QLSM_ancExpand()
Returns:
returns "mode" field, 0 if unknown version (should have got err on QLSM_ancExpand()) ----------------------------------------------------------------------

const float* QLSM_ancGetPos const QLSM_anc ancPtr  ) 
 

Routine to pull "pos" field out of ANC packet after QLSM_ancExpand().

Parameters:
ancPtr Output buffer from QLSM_ancExpand
Returns:
returns "pos" field, 0 if unknown version (should have got err on QLSM_ancExpand()) ----------------------------------------------------------------------

unsigned int QLSM_ancGetSec const QLSM_anc ancPtr  ) 
 

Routine to pull "sec" field out of ANC packet after QLSM_ancExpand().

Parameters:
ancPtr Output buffer from QLSM_ancExpand()
Returns:
returns "sec" field, 0 if unknown version (should have got err on QLSM_ancExpand()) ----------------------------------------------------------------------

unsigned int QLSM_ancGetSsr const QLSM_anc ancPtr  ) 
 

Routine to pull "ssr" field out of ANC packet after QLSM_ancExpand().

Parameters:
ancPtr Output buffer from QLSM_ancExpand()
Returns:
returns "ssr" field, 0 if unknown version (should have got err on QLSM_ancExpand()) ----------------------------------------------------------------------

unsigned int QLSM_ancGetSub const QLSM_anc ancPtr  ) 
 

Routine to pull "sub" field out of ANC packet after QLSM_ancExpand().

Parameters:
ancPtr Output buffer from QLSM_ancExpand()
Returns:
returns "sub" field, 0 if unknown version (should have got err on QLSM_ancExpand()) ----------------------------------------------------------------------

const float* QLSM_ancGetVel const QLSM_anc ancPtr  ) 
 

Routine to pull "vel" field out of ANC packet after QLSM_ancExpand().

Parameters:
ancPtr Output buffer from QLSM_ancExpand()
Returns:
returns "vel" field, 0 if unknown version (should have got err on QLSM_ancExpand()) ----------------------------------------------------------------------

void QLSM_ancPrint const QLSM_anc ancPtr  ) 
 

Routine to print a ANC buffer.

Parameters:
ancPtr Output buffer from QLSM_ancExpand() ----------------------------------------------------------------------

QLSM_STATUS QLSM_attExpand QLSM_att attPtr,
const LSF_contribution *  ctbPtr
 

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

Parameters:
attPtr output buffer of size QLSM_sizeof(), use as input for QLSM_attGetXxx routines
ctbPtr input buffer
Returns:
status codes QLSM_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 QLSM_sizeof(). The output buffer can then be used as input with the QLSM_attGetXxxx routines.

const float* QLSM_attGetAvel const QLSM_att attPtr  ) 
 

Routine to pull "avel" field out of ATT packet after QLSM_attExpand().

Parameters:
attPtr Output buffer from QLSM_attExpand()
Returns:
returns "avel" field, 0 if unknown version (should have got err on QLSM_attExpand()) ----------------------------------------------------------------------

const double* QLSM_attGetQuat const QLSM_att attPtr  ) 
 

Routine to pull "quat" field out of ATT packet after QLSM_attExpand().

Parameters:
attPtr Output buffer from QLSM_attExpand()
Returns:
returns "quat" field, 0 if unknown version (should have got err on QLSM_attExpand()) ----------------------------------------------------------------------

unsigned int QLSM_attGetSec const QLSM_att attPtr  ) 
 

Routine to pull "sec" field out of ATT packet after QLSM_attExpand().

Parameters:
attPtr Output buffer from QLSM_attExpand()
Returns:
returns "sec" field, 0 if unknown version (should have got err on QLSM_attExpand()) ----------------------------------------------------------------------

unsigned int QLSM_attGetSub const QLSM_att attPtr  ) 
 

Routine to pull "sub" field out of ATT packet after QLSM_attExpand().

Parameters:
attPtr Output buffer from QLSM_attExpand()
Returns:
returns "sub" field, 0 if unknown version (should have got err on QLSM_attExpand()) ----------------------------------------------------------------------

void QLSM_attPrint const QLSM_att attPtr  ) 
 

Routine to print a ATT buffer.

Parameters:
attPtr Output buffer from QLSM_attExpand() ----------------------------------------------------------------------

const char* QLSM_errToStr QLSM_STATUS  status  ) 
 

Convert error code to a string.

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

QLSM_STATUS QLSM_printCtb const LSF_contribution *  ctbPtr  ) 
 

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

Parameters:
ctbPtr Pointer to start of raw LSF contributor (before QLSM_expandXxxx())
Returns:
status codes QLSM_ERR_Xxxx, 0 if sucessfull ----------------------------------------------------------------------

QLSM_STATUS QLSM_printDatagram const LSF_datagram *  dgPtr  ) 
 

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

Parameters:
dgPtr Pointer to start of raw LSF datagram (before QLSM_expandXxx())
Returns:
status codes QLSM_ERR_Xxxx, 0 if sucessfull ----------------------------------------------------------------------

unsigned int QLSM_sizeof  ) 
 

get size of buffer to receive uncompressed/swapped data

Returns:
Size of required destination buffer in bytes

LSF_contribution_hdr* QLSM_swapCtbHdr LSF_contribution_hdr *  ctbPtrOut,
const LSF_contribution *  ctbPtr
 

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

Parameters:
ctbPtrOut Output buffer to put LSF contributor header in
ctbPtr INput buffer with possibly swapped LSF contrib data
Returns:
pointer to the given output buffer ----------------------------------------------------------------------

QLSM_STATUS QLSM_ttExpand QLSM_tt ttPtr,
const LSF_contribution *  ctbPtr
 

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

Parameters:
ttPtr output buffer of size QLSM_sizeof(), use as input for QLSM_ttGetXxx routines
ctbPtr input buffer
Returns:
status codes QLSM_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 QLSM_sizeof(). The output buffer can then be used as input with the QLSM_ttGetXxxx routines.

unsigned int QLSM_ttGetFlags const QLSM_tt ttPtr  ) 
 

Routine to pull "flags" field out of TT packet after QLSM_attExpand().

Parameters:
ttPtr Output buffer from QLSM_ttExpand()
Returns:
returns "flags" field, 0 if unknown version (should have got err on QLSM_ttExpand()) ----------------------------------------------------------------------

unsigned int QLSM_ttGetTimetone const QLSM_tt ttPtr  ) 
 

Routine to pull "timetone" field out of TT packet after QLSM_ttExpand().

Parameters:
ttPtr Output buffer from QLSM_ttExpand()
Returns:
returns "timetone" field, 0 if unknown version (should have got err on QLSM_ttExpand()) ----------------------------------------------------------------------

void QLSM_ttPrint const QLSM_tt ttPtr  ) 
 

Routine to print a TT buffer.

Parameters:
ttPtr Output buffer from QLSM_ttExpand() ----------------------------------------------------------------------

QLSM_TYPEID QLSM_typeof const LSF_contribution *  ctbPtr  ) 
 

get type of given contribution

Parameters:
ctbPtr input buffer
Returns:
type of record --> QLSM_TYPEID_ATT, QLSM_TYPEID_TT, or QLSM_TYPEID_ANC
Will return QLSM_TYPEID_UNKNOWN if typeid is not recognized


Generated on Tue Dec 6 21:03:13 2005 by  doxygen 1.4.4