GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PIG / V10-1-5 > pig_flying / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

pig_p.h File Reference

Private definitions for the PIG (Power and the Initialisation of the GASU) routines. More...

#include <PIG/state.h>
#include <LEM/list.h>

Functions

void getCruState (PIG_cruState *state)
 Get the saved copy of the contents of the CRU registers.
void getDbState (PIG_dbState *state)
 Get the saved copy of the contents of the database registers.
void getEbmState (PIG_ebmState *state)
 Get the saved copy of the contents of the EBM registers.
void getPduState (PIG_pduState *state)
 Get the saved copy of the contents of the PDU registers.
void getPwrState (PIG_pwrState *state)
 Get the saved copy of the contents of the power registers.
void getState (PIG_state *state)
 Get a copy of the state of all PIG registers.
unsigned readCruState (LEM_micr *cr, PIG_cruState *state)
 Take a snapshot of the state of the CRU.
unsigned readDbState (LEM_micr *cr, PIG_dbState *state)
 Take a snapshot of the current contents of the registers controlled by PIG_DB.
unsigned readEbmState (LEM_micr *cr, PIG_ebmState *state)
 Take a snapshot of the state of the EBM.
unsigned readPduState (LEM_micr *cr, PIG_pduState *state, const PIG_cruState *cru)
 Take a snapshot of the state of the PDU(s).
unsigned readPwrState (LEM_micr *cr, int all, PIG_pwrState *state)
 Take a snapshot of the current contents of the power registers.
unsigned readState (LEM_micr *cr, int all, PIG_state *state)
 Take a snapshot of the state of all PIG registers.
void saveCruState (const PIG_cruState *state)
 Save a copy of the contents of the CRU registers.
void saveDbState (const PIG_dbState *state)
 Save a copy of the contents of the database registers.
void saveEbmState (const PIG_ebmState *state)
 Save a copy of the contents of the EBM registers.
void savePduState (const PIG_pduState *state)
 Save a copy of the contents of the PDU registers.
void savePwrState (const PIG_pwrState *state)
 Save a copy of the contents of the power registers.
void saveState (const PIG_state *state)
 Save a copy of the state of all PIG registers.


Detailed Description

Private definitions for the PIG (Power and the Initialisation of the GASU) routines.

Author:
James Swain & Owen Saxton
$Id: pig_p.h,v 1.20 2011/03/28 17:15:49 saxton Exp $

Function Documentation

void getCruState ( PIG_cruState state  ) 

Get the saved copy of the contents of the CRU registers.

Parameters:
state Pointer to a structure to receive the state of the CRU registers

References _PIG_state::cru.

Referenced by getState().

void getDbState ( PIG_dbState state  ) 

Get the saved copy of the contents of the database registers.

Parameters:
state Pointer to a structure to receive the state of the database registers

References _PIG_state::pdb.

Referenced by getState(), and select_services().

void getEbmState ( PIG_ebmState state  ) 

Get the saved copy of the contents of the EBM registers.

Parameters:
state Pointer to a structure to receive the state of the EBM registers

References _PIG_state::ebm.

Referenced by getState(), and select_services().

void getPduState ( PIG_pduState state  ) 

Get the saved copy of the contents of the PDU registers.

Parameters:
state Pointer to a structure to receive the state of the PDU registers

References _PIG_state::pdu.

Referenced by getState().

void getPwrState ( PIG_pwrState state  ) 

Get the saved copy of the contents of the power registers.

Parameters:
state Pointer to a structure to receive the state of the power registers

References _PIG_state::pwr.

Referenced by getState(), PIG_bias_ACD(), and PIG_siu_init().

void getState ( PIG_state state  ) 

Get a copy of the state of all PIG registers.

Parameters:
state Pointer to a structure to receive the state of the PIG registers

References _PIG_state::cru, _PIG_state::ebm, getCruState(), getDbState(), getEbmState(), getPduState(), getPwrState(), _PIG_state::pdb, _PIG_state::pdu, and _PIG_state::pwr.

Referenced by cmdrsp_init(), PIG_extract(), PIG_insert(), and PIG_safe().

unsigned readCruState ( LEM_micr *  cr,
PIG_cruState state 
)

Take a snapshot of the state of the CRU.

Parameters:
cr Pointer to a multi-item command and response list
state Pointer to a structure to receive the state of the CRU registers

References _PIG_cruState::command, _PIG_cruState::config, PIG_CRU_CFG_MASK, and _PIG_cruState::response.

Referenced by cmdrsp_init(), PIG_extract(), PIG_get_pdus(), PIG_insert(), PIG_safe(), readState(), and select_services().

unsigned readDbState ( LEM_micr *  cr,
PIG_dbState state 
)

Take a snapshot of the current contents of the registers controlled by PIG_DB.

Parameters:
cr Pointer to a multi-item command and response list
state Pointer to a structure to receive the state of the PIG_DB controlled registers

References _PIG_dbState::aem_event_timeout, _PIG_dbState::aem_relocation, _PIG_dbState::aem_response_timeout, _PIG_dbState::ccc_event_timeouts, _PIG_dbState::ebm_fe_config_a, _PIG_dbState::ebm_fe_config_b, _PIG_dbState::ebm_timeout, PIG_EBM_CFG_MASK, PIG_N_CCC, PIG_N_TCC, PIG_N_TEM, _PIG_dbState::tcc_event_timeouts, tem_addr, and _PIG_dbState::tem_configuration.

Referenced by readState().

unsigned readEbmState ( LEM_micr *  cr,
PIG_ebmState state 
)

Take a snapshot of the state of the EBM.

Parameters:
cr Pointer to a multi-item command and response list
state Pointer to a structure to receive the state of the EBM registers

References _PIG_ebmState::be_config, _PIG_ebmState::contributors, _PIG_ebmState::destinations, _PIG_ebmState::inputs, PIG_EBM_CFG_MASK, and _PIG_ebmState::ssr_header.

Referenced by PIG_extract_evt(), PIG_insert_evt(), and readState().

unsigned readPduState ( LEM_micr *  cr,
PIG_pduState state,
const PIG_cruState cru 
)

Take a snapshot of the state of the PDU(s).

Parameters:
cr Pointer to a multi-item command and response list
state Pointer to a structure to receive the state of the PDU registers
cru Pointer to a structure holding the state of the CRU registers

References _PIG_pduState::acd, _PIG_cruState::command, _PIG_pduState::config, _PIG_pduState::crates, PIG_N_PDU, PIG_PDU_CFG_MASK, _PIG_cruState::response, and _PIG_pduState::tems.

Referenced by PIG_extract(), PIG_insert(), PIG_safe(), and readState().

unsigned readPwrState ( LEM_micr *  cr,
int  all,
PIG_pwrState state 
)

Take a snapshot of the current contents of the power registers.

Parameters:
cr Pointer to a multi-item command and response list
all If TRUE, read all the registers. Otherwise omit the reading of some sensitive registers.
state Pointer to a structure to receive the state of the power registers

References _PIG_pwrState::acd_dac, _PIG_pwrState::acd_hv, _PIG_pwrState::acd_mode, _PIG_pwrState::acd_on, _PIG_pwrState::acd_saa, _PIG_pwrState::acd_stat, _PIG_pwrState::aem, _PIG_pwrState::cal, _PIG_pwrState::cal_on, PIG_N_FREE, PIG_N_TEM, PIG_TIC_BIAS_MASK, _PIG_state::pwr, _PIG_pwrState::sib, _PIG_pwrState::tem, tem_addr, _PIG_pwrState::tkr, and _PIG_pwrState::tkr_on.

Referenced by readState().

unsigned readState ( LEM_micr *  cr,
int  all,
PIG_state state 
)

Take a snapshot of the state of all PIG registers.

Parameters:
cr Pointer to a multi-item command and response list
all If TRUE, read all the registers. Otherwise omit the reading of some sensitive registers.
state Pointer to a structure to receive the state of the PIG registers

References _PIG_state::cru, _PIG_state::ebm, _PIG_state::pdb, _PIG_state::pdu, _PIG_state::pwr, readCruState(), readDbState(), readEbmState(), readPduState(), and readPwrState().

Referenced by cmdrsp_init(), PIG_record(), and PIG_verify().

void saveCruState ( const PIG_cruState state  ) 

Save a copy of the contents of the CRU registers.

Parameters:
state Pointer to a structure containing the state of the CRU registers

References _PIG_state::cru.

Referenced by saveState(), and select_services().

void saveDbState ( const PIG_dbState state  ) 

Save a copy of the contents of the database registers.

Parameters:
state Pointer to a structure containing the state of the database registers

References _PIG_state::pdb.

Referenced by saveState(), and select_services().

void saveEbmState ( const PIG_ebmState state  ) 

Save a copy of the contents of the EBM registers.

Parameters:
state Pointer to a structure containing the state of the EBM registers

References _PIG_state::ebm.

Referenced by PIG_extract_evt(), PIG_insert_evt(), saveState(), and select_services().

void savePduState ( const PIG_pduState state  ) 

Save a copy of the contents of the PDU registers.

Parameters:
state Pointer to a structure containing the state of the PDU registers

References _PIG_state::pdu.

Referenced by saveState().

void savePwrState ( const PIG_pwrState state  ) 

Save a copy of the contents of the power registers.

Parameters:
state Pointer to a structure containing the state of the power registers

References _PIG_state::pwr.

Referenced by PIG_bias_ACD(), PIG_siu_init(), and saveState().

void saveState ( const PIG_state state  ) 

Save a copy of the state of all PIG registers.

Parameters:
state Pointer to a structure to receive the state of the PIG registers

References _PIG_state::cru, _PIG_state::ebm, _PIG_state::pdb, _PIG_state::pdu, _PIG_state::pwr, saveCruState(), saveDbState(), saveEbmState(), savePduState(), and savePwrState().

Referenced by cmdrsp_init(), PIG_extract(), PIG_insert(), and PIG_safe().


Generated on Tue Nov 29 18:55:56 2011 by  doxygen 1.5.8