GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QLSM / V2-0-1 > qlsm_dump / rhel6-32


Interface   Data Structures   File List   Data Fields   Globals  

QLSM.h File Reference

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


Typedefs

typedef struct _LSF_datagram LSF_datagram
typedef struct _LSF_contribution LSF_contribution
typedef struct
_LSF_contribution_hdr 
LSF_contribution_hdr
typedef struct _QLSM_anc QLSM_anc
 Pointer to buff used by QLSM_ancXxxx(), size determined by QLSM_sizeof().
typedef struct _QLSM_att QLSM_att
 Pointer to buff used by QLSM_attXxxx(), size determined by QLSM_sizeof().
typedef struct _QLSM_tt QLSM_tt
 Pointer to buff used by QLSM_ttXxxx(), size determined by QLSM_sizeof().

Enumerations

enum  QLSM_TYPEID {
  QLSM_TYPEID_UNKNOWN = -1,
  QLSM_TYPEID_ATT = 1,
  QLSM_TYPEID_ANC = 2,
  QLSM_TYPEID_TT = 3
}
 type_id used in LSF contributor for QLSM, also returned from QLSM_typeof() More...
enum  QLSM_STATUS {
  QLSM_OK = 0,
  QLSM_ERR_UNKNOWN_DG_TYPEID = -2,
  QLSM_ERR_UNKNOWN_DG_VER = -3,
  QLSM_ERR_UNKNOWN_CTB_VER = -4,
  QLSM_ERR_BAD_CTB_LEN32 = -5,
  QLSM_ERR_UNKNOWN_CTB_TYPEID = -6,
  QLSM_ERR_WRONG_TYPEID = -7
}
 QLSM errors returned by QLSM_xxxExpand. More...

Functions

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


Detailed Description

Science defs for LSM (Lat Spacesraft Messages).

Author:
Ed Bacho -- ebacho@slac.stanford.edu

JJRussell -- russell@slac.stanford.edu This module handles the definitions of structures that are output as science data for the LSM package over the SSR.

   CVS $Id: QLSM.h,v 1.7 2008/09/20 00:46:31 russell Exp $
  

Enumeration Type Documentation

QLSM errors returned by QLSM_xxxExpand.

Enumerator:
QLSM_OK  Success
QLSM_ERR_UNKNOWN_DG_TYPEID  LSF datagram header has typeid which is not in LSF/LSF_ids.h
QLSM_ERR_UNKNOWN_DG_VER  LSF datagram header has an unknown version number
QLSM_ERR_UNKNOWN_CTB_VER  LSF contributor header has unknown version number
QLSM_ERR_BAD_CTB_LEN32  LSF contributor has an incorrect length for the packet
QLSM_ERR_UNKNOWN_CTB_TYPEID  LSF contributor header has typeid which is not in QLSM_TYPEID
QLSM_ERR_WRONG_TYPEID  Typeid of data does not match the QLSM_xxxGetXxx

type_id used in LSF contributor for QLSM, also returned from QLSM_typeof()

Enumerator:
QLSM_TYPEID_UNKNOWN  Unknown type
QLSM_TYPEID_ATT  Attitude record
QLSM_TYPEID_ANC  Ancillary record
QLSM_TYPEID_TT  Timetone record


Function Documentation

QLSM_STATUS QLSM_ancExpand ( QLSM_anc ancPtr,
const LSF_contribution *  ctbPtr 
)

Routine to check integrity and swap/uncompress input data into a second 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.

References QLSM_ERR_BAD_CTB_LEN32, QLSM_ERR_UNKNOWN_CTB_VER, QLSM_ERR_WRONG_TYPEID, QLSM_OK, QLSM_swapCtbHdr(), and QLSM_TYPEID_ANC.

Referenced by QLSM_printCtb().

unsiged int QLSM_ancGetFlags ( const QLSM_anc ancPtr  ) 

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

Return values:
If != 0, the "flags" field,
If == 0, unknown version (should have got err on QLSM_ancExpand())
Parameters:
ancPtr Output buffer from QLSM_ancExpand()

Referenced by QLSM_ancPrint().

unsiged int QLSM_ancGetMode ( const QLSM_anc ancPtr  ) 

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

Return values:
If != 0, "mode" field,
If == 0 if unknown version (should have got err on QLSM_ancExpand())
Parameters:
ancPtr Output buffer from QLSM_ancExpand()

Referenced by QLSM_ancPrint().

float QLSM_ancGetPos ( const QLSM_anc ancPtr  ) 

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

Return values:
If != 0, the "pos" field,
If == 0, if unknown version (should have got err on QLSM_ancExpand())
Parameters:
ancPtr Output buffer from QLSM_ancExpand

Referenced by QLSM_ancPrint().

unsigned int QLSM_ancGetSec ( const QLSM_anc ancPtr  ) 

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

Return values:
If != 0, the "sec" field,
If == 0, unknown version (should have got err on QLSM_ancExpand())
Parameters:
ancPtr Output buffer from QLSM_ancExpand()

Referenced by QLSM_ancPrint().

unsiged int QLSM_ancGetSsr ( const QLSM_anc ancPtr  ) 

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

Return values:
If !=0 The "ssr" field,
If ==0, unknown version (should have got err on QLSM_ancExpand())
Parameters:
ancPtr Output buffer from QLSM_ancExpand()

Referenced by QLSM_ancPrint().

unsigned int QLSM_ancGetSub ( const QLSM_anc ancPtr  ) 

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

Return values:
If != 0, "sub"-second field,
If == 0, unknown version (should have got err on QLSM_ancExpand())
Parameters:
ancPtr Output buffer from QLSM_ancExpand()

Referenced by QLSM_ancPrint().

float QLSM_ancGetVel ( const QLSM_anc ancPtr  ) 

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

Return values:
If != 0, the "vel" field,
If == 0 unknown version (should have got err on QLSM_ancExpand())
Parameters:
ancPtr Output buffer from QLSM_ancExpand()

Referenced by QLSM_ancPrint().

void QLSM_ancPrint ( const QLSM_anc ancPtr  ) 

Routine to print a ANC buffer.

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

References QLSM_ancGetFlags(), QLSM_ancGetMode(), QLSM_ancGetPos(), QLSM_ancGetSec(), QLSM_ancGetSsr(), QLSM_ancGetSub(), and QLSM_ancGetVel().

Referenced by QLSM_printCtb().

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.

References _QLSM_Attitude_SsrTlm_V1::avel, BSWP__loadDoubleb(), BSWP__loadFloatb(), QLSM_ERR_BAD_CTB_LEN32, QLSM_ERR_UNKNOWN_CTB_VER, QLSM_ERR_WRONG_TYPEID, QLSM_OK, QLSM_swapCtbHdr(), QLSM_TYPEID_ATT, _QLSM_Attitude_SsrTlm_V1::quat, _QLSM_Attitude_SsrTlm_V1::sec, and _QLSM_Attitude_SsrTlm_V1::sub.

Referenced by QLSM_printCtb().

float * QLSM_attGetAvel ( const QLSM_att attPtr  ) 

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

Return values:
If non-NULL, a pointer to the "avel" field
If NULL, unknown version (should have got err on QLSM_attExpand())
Parameters:
attPtr Output buffer from QLSM_attExpand()
----------------------------------------------------------------------

Referenced by QLSM_attPrint().

double * QLSM_attGetQuat ( const QLSM_att attPtr  ) 

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

Return values:
If non-NULL, pointer to "quat" field,
If NULL, unknown version (should have got err on QLSM_attExpand())
Parameters:
attPtr Output buffer from QLSM_attExpand()

Referenced by QLSM_attPrint().

unsiged int QLSM_attGetSec ( const QLSM_att attPtr  ) 

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

Return values:
If != 0, the "sec" field,
If == 0 unknown version (should have got err on QLSM_attExpand())
Parameters:
attPtr Output buffer from QLSM_attExpand()

Referenced by QLSM_attPrint().

unsiged int QLSM_attGetSub ( const QLSM_att attPtr  ) 

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

Return values:
If !=0, the "sub" field,
If ==0, unknown version (should have got err on QLSM_attExpand())
Parameters:
attPtr Output buffer from QLSM_attExpand()

Referenced by QLSM_attPrint().

void QLSM_attPrint ( const QLSM_att attPtr  ) 

Routine to print a ATT buffer.

Parameters:
attPtr Output buffer from QLSM_attExpand()

References QLSM_attGetAvel(), QLSM_attGetQuat(), QLSM_attGetSec(), and QLSM_attGetSub().

Referenced by QLSM_printCtb().

const char * QLSM_errToStr ( QLSM_STATUS  status  ) 

Convert error code to a string.

Returns:
The string corresponding to the error code
Parameters:
status One of the status codes QLSM_ERR_Xxxx
----------------------------------------------------------------------

References QLSM_ERR_BAD_CTB_LEN32, QLSM_ERR_UNKNOWN_CTB_TYPEID, QLSM_ERR_UNKNOWN_CTB_VER, QLSM_ERR_UNKNOWN_DG_TYPEID, QLSM_ERR_UNKNOWN_DG_VER, QLSM_ERR_WRONG_TYPEID, and QLSM_OK.

Referenced by QLSM_printCtb().

unsigned int QLSM_printCtb ( const LSF_contribution *  ctbPtr  ) 

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

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

References QLSM_ancExpand(), QLSM_ancPrint(), QLSM_attExpand(), QLSM_attPrint(), QLSM_errToStr(), QLSM_MAX_CTB_SIZE, QLSM_OK, QLSM_swapCtbHdr(), QLSM_ttExpand(), QLSM_ttPrint(), QLSM_TYPEID_ANC, QLSM_TYPEID_ATT, QLSM_TYPEID_TT, QLSM_TYPEID_UNKNOWN, and QLSM_typeof().

Referenced by QLSM_printDatagram().

unsigned int QLSM_printDatagram ( const LSF_datagram *  dgPtr  ) 

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

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

References QLSM_ERR_UNKNOWN_DG_TYPEID, QLSM_ERR_UNKNOWN_DG_VER, and QLSM_printCtb().

unsigned int QLSM_sizeof (  ) 

get size of buffer to receive uncompressed/swapped data

Returns:
Size of required destination buffer in bytes

References QLSM_MAX_CTB_SIZE.

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.

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

Referenced by QLSM_ancExpand(), QLSM_attExpand(), QLSM_printCtb(), QLSM_ttExpand(), and QLSM_typeof().

QLSM_STATUS QLSM_ttExpand ( QLSM_tt ttPtr,
const LSF_contribution *  ctbPtr 
)

Routine to check integrity and swap/uncompress input data into a second 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.

References QLSM_ERR_BAD_CTB_LEN32, QLSM_ERR_UNKNOWN_CTB_VER, QLSM_ERR_WRONG_TYPEID, QLSM_OK, QLSM_swapCtbHdr(), and QLSM_TYPEID_TT.

Referenced by QLSM_printCtb().

unsigned int QLSM_ttGetFlags ( const QLSM_tt ttPtr  ) 

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

Return values:
If != 0, the "flags" field,
If == 0 if unknown version (should have got err on QLSM_ttExpand())
Parameters:
ttPtr Output buffer from QLSM_ttExpand()

Referenced by QLSM_ttPrint().

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()) ----------------------------------------------------------------------

Referenced by QLSM_ttPrint().

void QLSM_ttPrint ( const QLSM_tt ttPtr  ) 

Routine to print a TT buffer.

Parameters:
ttPtr Output buffer from QLSM_ttExpand()

References QLSM_ttGetFlags(), and QLSM_ttGetTimetone().

Referenced by QLSM_printCtb().

QLSM_TYPEID QLSM_typeof ( const LSF_contribution *  ctbPtr  ) 

get type of given contribution

Returns:
type of record, one of the QLSM_TYPID enumerations
  • QLSM_TYPEID_ATT the attitude record
  • QLSM_TYPEID_TT, the timetone record
  • QLSM_TYPEID_ANC, the ancillary record
Return values:
QLSM_TYPEID_UNKNOWN,if typeid is not recognized
Parameters:
ctbPtr input buffer

References QLSM_swapCtbHdr(), QLSM_TYPEID_ANC, QLSM_TYPEID_ATT, QLSM_TYPEID_TT, and QLSM_TYPEID_UNKNOWN.

Referenced by QLSM_printCtb().


Generated on Tue Nov 29 17:30:44 2011 by  doxygen 1.5.8