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

Constituent: qpig     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

state.c File Reference

Functions used to retrieve the power and initialisation state. More...

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

Include dependency graph for state.c:


Enumerations

enum  {
  CRU_MASK_PDU_0 = 0x080000,
  CRU_MASK_PDU_1 = 0x100000
}

Functions

static void report_ebmState (const QPIG_ebmState *state, FILE *fp)
 Report the EBM state.
static void report_cruState (const QPIG_cruState *state, FILE *fp)
 Report the CRU state.
static void report_pduState (const QPIG_pduState *state, const QPIG_cruState *cru, FILE *fp)
 Report the PDU register state.
static void report_pdbState (const QPIG_dbState *state, FILE *fp)
 Report the state of the PIG_DB registers.
static void report_pwrState (const QPIG_pwrState *state, FILE *fp)
 Report the state of the power registers.
size_t QPIG_sizeofState (void)
 Return the size of the QPIG state structure.
QPIG_stateQPIG_constructState (void *buffer)
 Construct a QPIG_state structure in the memory provided.
QPIG_stateQPIG_allocState (void)
 Allocate memory for a QPIG_state structure and construct it as such.
void QPIG_destructState (QPIG_state *state)
 Release resources associated with the QPIG_state structure.
const unsigned int * QPIG_recoverState (QPIG_state *state, const unsigned int *buf)
 Copy the context information from the buffer.
void QPIG_reportState (const QPIG_state *state, FILE *fp)
 Write a formatted ASCII description of the contents of the context to the file fp.

Detailed Description

Functions used to retrieve the power and initialisation state.

Author:
James Swain -- jswain@slac.stanford.edu

Function Documentation

QPIG_state* QPIG_allocState void   ) 
 

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

Returns:
Allocated QPIG_state structure

QPIG_state* QPIG_constructState void *  buffer  ) 
 

Construct a QPIG_state structure in the memory provided.

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

void QPIG_destructState QPIG_state state  ) 
 

Release resources associated with the QPIG_state structure.

Parameters:
state Pointer to a QPIG_state structure created using QPIG_allocState()

const unsigned int* QPIG_recoverState QPIG_state state,
const unsigned int *  buf
 

Copy the context information from the buffer.

Parameters:
state Pointer to a state structure
buf Pointer to the context data
Returns:
Pointer to the next word in the contribution

void QPIG_reportState const QPIG_state state,
FILE *  fp
 

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

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

size_t QPIG_sizeofState void   ) 
 

Return the size of the QPIG state structure.

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

void report_cruState const QPIG_cruState state,
FILE *  fp
[inline, static]
 

Report the CRU state.

Parameters:
state Pointer to a structure for caching the state of the PDU/CRU registers
fp Pointer to file where the report will be written

void report_ebmState const QPIG_ebmState state,
FILE *  fp
[inline, static]
 

Report the EBM state.

Parameters:
state Pointer to a structure for caching the state of the EBM registers
fp Pointer to file where the report will be written

void report_pdbState const QPIG_dbState state,
FILE *  fp
[inline, static]
 

Report the state of the PIG_DB registers.

Parameters:
state Pointer to a structure for caching the state of the PIG_DB registers
fp Pointer to file where the report will be written

void report_pduState const QPIG_pduState state,
const QPIG_cruState cru,
FILE *  fp
[inline, static]
 

Report the PDU register state.

Parameters:
state Pointer to a structure for caching the state of the PDU registers
cru Pointer to a structure containing the state of the CRU
fp Pointer to file where the report will be written

void report_pwrState const QPIG_pwrState state,
FILE *  fp
[inline, static]
 

Report the state of the power registers.

Parameters:
state Pointer to a structure for caching the state of the power registers
fp Pointer to file where the report will be written


Generated on Wed Mar 28 01:39:58 2007 by  doxygen 1.4.4