GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QPIG / dev > qpig / linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

state.c File Reference

Functions for retrieving and displaying the state information. More...

#include <state_p.h>
#include <LEM/defs.h>
#include <PBS/WCT.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

Functions

QPIG_stateQPIG_allocState (void)
 Allocate memory for a QPIG_state structure and construct it as such.
QPIG_stateQPIG_constructState (void *buffer)
 Construct a QPIG_state structure in the memory provided.
void QPIG_destructState (QPIG_state *state)
 Release resources associated with the QPIG_state structure.
const unsigned int * QPIG_recoverState (QPIG_state *state, int version, const unsigned int *buf)
 Copy the state information from the buffer.
void QPIG_reportState (unsigned int secs, int version, const QPIG_state *state, FILE *fp)
 Write a formatted ASCII description of the state.
size_t QPIG_sizeofState (void)
 Return the size of the QPIG state structure.


Detailed Description

Functions for retrieving and displaying the state information.

Author:
James Swain & Owen Saxton
Id
state.c,v 1.5 2011/03/29 20:29:25 saxton Exp

Function Documentation

QPIG_state* QPIG_allocState ( void   ) 

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

Returns:
Allocated QPIG_state structure

References QPIG_constructState(), and QPIG_sizeofState().

QPIG_state* QPIG_constructState ( void *  buffer  ) 

Construct a QPIG_state structure in the memory provided.

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

References QPIG_sizeofState().

Referenced by QPIG_allocState(), and QPIG_construct().

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,
int  version,
const unsigned int *  buf 
)

Copy the state information from the buffer.

Parameters:
state Pointer to a state structure
version The version of the state data.
buf Pointer to the context data
Returns:
Pointer to the next word in the buffer

References _QPIG_pduState_V0::acd, _QPIG_pduState::acd, _QPIG_pwrState::acd_dac, _QPIG_pwrState_V0::acd_hv, _QPIG_pwrState::acd_hv, _QPIG_pwrState_V1::acd_on, _QPIG_pwrState::acd_on, _QPIG_pwrState_V0::acd_saa, _QPIG_pwrState::acd_saa, _QPIG_pwrState_V0::aem, _QPIG_pwrState::aem, QPIG_dbState_V0::aem_event_timeout, QPIG_dbState::aem_event_timeout, QPIG_dbState_V0::aem_response_timeout, QPIG_dbState::aem_response_timeout, _QPIG_pwrState_V0::cal, _QPIG_pwrState::cal, _QPIG_pwrState_V1::cal_on, _QPIG_pwrState::cal_on, QPIG_dbState_V0::ccc_event_timeouts, QPIG_dbState::ccc_event_timeouts, _QPIG_cruState_V0::command, _QPIG_cruState::command, _QPIG_ebmState_V0::contributors, _QPIG_ebmState::contributors, _QPIG_pduState_V0::crates, _QPIG_pduState::crates, _QPIG_state_V0::cru, _QPIG_state::cru, _QPIG_ebmState_V0::destinations, _QPIG_ebmState::destinations, _QPIG_state_V0::ebm, _QPIG_state::ebm, QPIG_dbState_V0::ebm_timeout, QPIG_dbState::ebm_timeout, _QPIG_ebmState_V0::inputs, _QPIG_ebmState::inputs, _QPIG_state_V0::pdb, _QPIG_state::pdb, _QPIG_state_V0::pdu, _QPIG_state::pdu, _QPIG_state_V0::pwr, _QPIG_state_V1::pwr, _QPIG_state::pwr, _QPIG_cruState_V0::response, _QPIG_cruState::response, _QPIG_pwrState_V0::sib, _QPIG_pwrState::sib, QPIG_dbState_V0::tcc_event_timeouts, QPIG_dbState::tcc_event_timeouts, _QPIG_pwrState_V0::tem, _QPIG_pwrState::tem, QPIG_dbState_V0::tem_configuration, QPIG_dbState::tem_configuration, _QPIG_pduState_V0::tems, _QPIG_pduState::tems, _QPIG_pwrState_V0::tkr, _QPIG_pwrState::tkr, _QPIG_pwrState_V1::tkr_on, and _QPIG_pwrState::tkr_on.

Referenced by QPIG_updateAtDatagram().

void QPIG_reportState ( unsigned int  secs,
int  version,
const QPIG_state state,
FILE *  fp 
)

Write a formatted ASCII description of the state.

Parameters:
secs The time the state was sent (spacecraft time)
version The version of the state data.
state Pointer to a state structure
fp Pointer to the output file

References _QPIG_state::cru, _QPIG_state::ebm, _QPIG_state::pdb, _QPIG_state::pdu, and _QPIG_state::pwr.

size_t QPIG_sizeofState ( void   ) 

Return the size of the QPIG state structure.

Returns:
Size of memory block required to hold the structure

Referenced by QPIG_allocState(), and QPIG_constructState().


Generated on Tue Mar 29 13:50:42 2011 by  doxygen 1.5.8