GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSEC / V3-3-0 > qsec_wb / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QSEC_ctx.c File Reference

Functions used to retrieve the calibration context. More...

#include "QSEC_ctx_p.h"
#include <string.h>
#include <stdlib.h>

Functions

static void reportCtxAcd (const QSEC_ctx *ctx, FILE *fp)
 Write a formatted ASCII description of the contents of the context to the file fp.
static void reportCtxCal (const QSEC_ctx *ctx, FILE *fp)
 Write a formatted ASCII description of the contents of the context to the file fp.
static void reportCtxTkr (const QSEC_ctx *ctx, FILE *fp)
 Write a formatted ASCII description of the contents of the context to the file fp.
static void reportCtxGlobal (const QSEC_ctx *ctx, FILE *fp)
 Write a formatted ASCII description of the contents of the context to the file fp.
static void reportCtxSetting (FILE *fp, const char *string, unsigned short value)
 Print out a single context parameter.
static void reportCtxChannel (FILE *fp, const char *string, const QSEC_channel *chan)
 Print out channel information.
size_t QSEC_sizeofCtx (void)
 Return the size of the QSEC context structure.
QSEC_ctxQSEC_constructCtx (void *buffer)
 Construct a QSEC_ctx structure in the memory provided.
QSEC_ctxQSEC_allocCtx (void)
 Allocate memory for a QSEC_ctx structure and construct it as such.
void QSEC_destructCtx (QSEC_ctx *ctx)
 Release resources associated with the QSEC_ctx structure.
const unsigned int * QSEC_recoverCtx (QSEC_ctx *ctx, const unsigned int *buf)
 Copy the context information from the buffer.
void QSEC_reportCtx (const QSEC_ctx *ctx, FILE *fp)
 Write a formatted ASCII description of the contents of the context to the file fp.


Detailed Description

Functions used to retrieve the calibration context.

Author:
James Swain & Owen Saxton
Id

Function Documentation

QSEC_ctx* QSEC_allocCtx ( void   ) 

Allocate memory for a QSEC_ctx structure and construct it as such.

Returns:
Allocated QSEC_ctx structure

QSEC_ctx* QSEC_constructCtx ( void *  buffer  ) 

Construct a QSEC_ctx structure in the memory provided.

Parameters:
buffer block of memory to use for the QSEC_ctx structure
Returns:
Pointer to an initialised QSEC_ctx structure

void QSEC_destructCtx ( QSEC_ctx ctx  ) 

Release resources associated with the QSEC_ctx structure.

Parameters:
ctx Pointer to a QSEC_ctx structure created using QSEC_allocCtx()

const unsigned int* QSEC_recoverCtx ( QSEC_ctx ctx,
const unsigned int *  buf 
)

Copy the context information from the buffer.

This routine must be able to deal with previous versions of the context information and fill in any new fields appropriately.

Parameters:
ctx Pointer to a context structure
buf Pointer to the context data
Returns:
Pointer to the next word in the contribution, or NULL if the context version or mode is unrecognized

void QSEC_reportCtx ( const QSEC_ctx ctx,
FILE *  fp 
)

Write a formatted ASCII description of the contents of the context to the file fp.

Parameters:
ctx Pointer to a context structure
fp Pointer to the output file

size_t QSEC_sizeofCtx ( void   ) 

Return the size of the QSEC context structure.

Returns:
Size of memory block required to accomodate the QSEC_ctx structure

void reportCtxAcd ( const QSEC_ctx ctx,
FILE *  fp 
) [static]

Write a formatted ASCII description of the contents of the context to the file fp.

Parameters:
ctx Pointer to a context structure
fp Pointer to the output file

void reportCtxCal ( const QSEC_ctx ctx,
FILE *  fp 
) [static]

Write a formatted ASCII description of the contents of the context to the file fp.

Parameters:
ctx Pointer to a context structure
fp Pointer to the output file

void reportCtxChannel ( FILE *  fp,
const char *  string,
const QSEC_channel chan 
) [static]

Print out channel information.

Parameters:
fp Pointer to the destination file
string Parameter name
chan Pointer to channel information

void reportCtxGlobal ( const QSEC_ctx ctx,
FILE *  fp 
) [static]

Write a formatted ASCII description of the contents of the context to the file fp.

Parameters:
ctx Pointer to a context structure
fp Pointer to the output file

void reportCtxSetting ( FILE *  fp,
const char *  string,
unsigned short  value 
) [static]

Print out a single context parameter.

Parameters:
fp Pointer to the destination file
string Parameter name
value Context parameter

void reportCtxTkr ( const QSEC_ctx ctx,
FILE *  fp 
) [static]

Write a formatted ASCII description of the contents of the context to the file fp.

Parameters:
ctx Pointer to a context structure
fp Pointer to the output file


Generated on Mon Aug 23 10:48:59 2010 by  doxygen 1.5.3