GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QPIG / V2-0-2 > qpig / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

state.h File Reference

Structures that make up the PIG datagram sent to the SSR by PIG_record. More...

#include <unistd.h>
#include <stdio.h>

Classes

struct  _QPIG_cruState_V0
 State of the CRU - version 0. More...
struct  _QPIG_pduState_V0
 State of the PDU - version 0. More...
struct  _QPIG_ebmState_V0
 Structure used to record the state of the EBM - version 0. More...
struct  QPIG_dbState_V0
 Structure holding registers configured by PIG_DB - version 0. More...
struct  _QPIG_pwrState_V0
 Structure holding the power registers - version 0. More...
struct  _QPIG_pwrState_V1
 Structure holding the power registers - version 1. More...
struct  _QPIG_cruState
 Structure holding the state of the CRU. More...
struct  _QPIG_pduState
 Structure holding the state of the PDU. More...
struct  _QPIG_ebmState
 Structure used to record the state of the EBM. More...
struct  QPIG_dbState
 Structure holding the registers configured by PIG_DB. More...
struct  _QPIG_pwrState
 Structure holding the power registers. More...
struct  _QPIG_state_V0
 Combination of structures encapsulating the current state of the registers manipulated by PIG - version 0. More...
struct  _QPIG_state_V1
 Combination of structures encapsulating the current state of the registers manipulated by PIG - version 1. More...
struct  _QPIG_state
 Combination of structures encapsulating the current state of the registers manipulated by PIG. More...

Typedefs

typedef struct _QPIG_cruState_V0 QPIG_cruState_V0
 State of the CRU - version 0.
typedef struct _QPIG_pduState_V0 QPIG_pduState_V0
 State of the PDU - version 0.
typedef struct _QPIG_ebmState_V0 QPIG_ebmState_V0
 Structure used to record the state of the EBM - version 0.
typedef struct _QPIG_pwrState_V0 QPIG_pwrState_V0
 Structure holding the power registers - version 0.
typedef struct _QPIG_pwrState_V1 QPIG_pwrState_V1
 Structure holding the power registers - version 1.
typedef struct _QPIG_cruState QPIG_cruState
 Structure holding the state of the CRU.
typedef struct _QPIG_pduState QPIG_pduState
 Structure holding the state of the PDU.
typedef struct _QPIG_ebmState QPIG_ebmState
 Structure used to record the state of the EBM.
typedef struct _QPIG_pwrState QPIG_pwrState
 Structure holding the power registers.
typedef struct _QPIG_state_V0 QPIG_state_V0
 Combination of structures encapsulating the current state of the registers manipulated by PIG - version 0.
typedef struct _QPIG_state_V1 QPIG_state_V1
 Combination of structures encapsulating the current state of the registers manipulated by PIG - version 1.
typedef struct _QPIG_state QPIG_state
 Combination of structures encapsulating the current state of the registers manipulated by PIG.

Enumerations

enum  {
  QPIG_N_PDU = 2,
  QPIG_N_TEM = 16,
  QPIG_N_CCC = 4,
  QPIG_N_TCC = 8,
  QPIG_N_FREE = 12
}
 Detector constants. More...
enum  { QPIG_CURR_VERSION = 2 }
 Current version of the register state data.

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

Structures that make up the PIG datagram sent to the SSR by PIG_record.

Author:
James Swain & Owen Saxton
Id
state.h,v 1.4 2009/02/27 19:26:00 saxton Exp

Enumeration Type Documentation

anonymous enum

Detector constants.

Enumerator:
QPIG_N_PDU  Number of PDUs.
QPIG_N_TEM  Number of TEMs.
QPIG_N_CCC  Number of CCCs.
QPIG_N_TCC  Number of TCCs.
QPIG_N_FREE  Number of FREE boards.


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 Nov 29 19:20:24 2011 by  doxygen 1.5.8