GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PIG / V10-1-5 > pig_flying / rhel4-32
#include <PIG/const.h>
#include <PIG/structs.h>
#include <ITC/ITC_pubdefs.h>
Functions | |
unsigned | PIG_bias_ACD (PIG_acd_bias *bias) |
Load the ACD bias DAC registers. | |
unsigned | PIG_bias_ACD_off (unsigned mask) |
Turn off ACD bias voltages. | |
unsigned | PIG_bias_ACD_on (unsigned mask) |
Turn on ACD bias voltages. | |
unsigned | PIG_bias_CAL (PIG_cal_bias *bias) |
Load the CAL bias DAC registers. | |
unsigned | PIG_bias_CAL_off (unsigned mask) |
Turn off CAL bias voltages. | |
unsigned | PIG_bias_CAL_on (unsigned mask) |
Turn on CAL bias voltages. | |
unsigned | PIG_bias_TKR (PIG_tkr_bias *bias) |
Load the TKR bias DAC registers. | |
unsigned | PIG_bias_TKR_off (unsigned mask) |
Turn off TKR bias voltages. | |
unsigned | PIG_bias_TKR_on (unsigned mask) |
Turn on TKR bias voltages. | |
unsigned | PIG_enter_SAA (void) |
Write registers to place the LAT into SAA mode. | |
unsigned | PIG_exit_SAA (void) |
Write registers to pull the LAT out of SAA mode. | |
unsigned | PIG_extract (PIG_cfg *cfg) |
Extract one or more nodes from the C/R fabric, possibly powering off said node at the same time. | |
unsigned | PIG_extract_evt (PIG_evt_cfg *cfg) |
Extract one or more nodes from the event fabric. | |
unsigned | PIG_get_ebmState (unsigned int *inputs, unsigned int *contributors, unsigned int *destinations) |
Return the EBM configuration masks. | |
unsigned | PIG_get_pdus (void) |
Get PDUs present. | |
unsigned | PIG_insert (PIG_cfg *cfg) |
Insert one or more nodes into the C/R fabric, possibly powering on said node on at the same time. | |
unsigned | PIG_insert_evt (PIG_evt_cfg *cfg) |
Insert one or more nodes into the event fabric. | |
unsigned | PIG_order_EPU (unsigned order[PIG_N_EPU]) |
Change the power-on order of the EPUs from the default to order. | |
unsigned | PIG_order_FREE (unsigned order[PIG_N_FREE]) |
Change the power-on order of the FREE boards from the default to order. | |
unsigned | PIG_order_TEM (unsigned order[PIG_N_TEM]) |
Change the power-on order of the TEMs from the default to order. | |
unsigned | PIG_record (void *buf, ITC_cb_Completion *rtn, void *prm0, void *prm1, void *prm2) |
Record the PIG registers to the SSR. | |
unsigned | PIG_safe (void) |
Power off all the LAT components. | |
void | PIG_set_epu_delay (unsigned delay) |
Set the delay after EPU power on. | |
void | PIG_set_off_delay (unsigned delay) |
Set the delay after power-off of a component. | |
void | PIG_set_on_delay (unsigned delay) |
Set the delay after power-on of a component. | |
unsigned | PIG_shed (void) |
Shed the LAT power load. | |
unsigned | PIG_siu_init (PIG_siu_cfg cfg) |
Configure the SIU in response to the MAIN_FEED_ON notification. | |
size_t | PIG_sizeofRecord (void) |
Get the size of a PIG datagram. | |
unsigned | PIG_verify (void) |
Verify the PIG state. |
$Id: pig.h,v 1.34 2011/03/28 17:00:33 saxton Exp $
unsigned PIG_bias_ACD | ( | PIG_acd_bias * | bias | ) |
Load the ACD bias DAC registers.
bias | Pointer to structure containing the bias voltage values |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
References _PIG_pwrState::acd_hv, _PIG_pwrState::acd_mode, _PIG_pwrState::acd_on, _PIG_pwrState::acd_saa, _PIG_pwrState::aem, _PIG_acd_bias::arc, getPwrState(), _PIG_arc_bias::hv_bias, _PIG_arc_bias::hv_valid, _PIG_arc_bias::hvbs1, _PIG_arc_bias::hvbs2, PIG_ARC_HV1_MASK, PIG_ARC_HV2_MASK, PIG_ARC_HV_MASK, PIG_N_FREE, _PIG_arc_bias::saa_bias, _PIG_arc_bias::saa_valid, savePwrState(), _PIG_arc_bias::veto_en_a, and _PIG_arc_bias::veto_en_b.
unsigned PIG_bias_ACD_off | ( | unsigned | mask | ) |
Turn off ACD bias voltages.
mask | Mask specifying the FREE boards for which the bias voltage is to be turned off. |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
unsigned PIG_bias_ACD_on | ( | unsigned | mask | ) |
Turn on ACD bias voltages.
mask | Mask specifying the FREE boards for which the bias voltage is to be turned on. |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
unsigned PIG_bias_CAL | ( | PIG_cal_bias * | bias | ) |
Load the CAL bias DAC registers.
bias | Pointer to structure containing the bias voltage values |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
unsigned PIG_bias_CAL_off | ( | unsigned | mask | ) |
Turn off CAL bias voltages.
mask | Mask specifying the towers for which the CAL bias voltage is to be turned off. |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
unsigned PIG_bias_CAL_on | ( | unsigned | mask | ) |
Turn on CAL bias voltages.
mask | Mask specifying the towers for which the CAL bias voltage is to be turned on. |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
unsigned PIG_bias_TKR | ( | PIG_tkr_bias * | bias | ) |
Load the TKR bias DAC registers.
bias | Pointer to structure containing the bias voltage values |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
unsigned PIG_bias_TKR_off | ( | unsigned | mask | ) |
Turn off TKR bias voltages.
mask | Mask specifying the towers for which the TKR bias voltage is to be turned off. |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
unsigned PIG_bias_TKR_on | ( | unsigned | mask | ) |
Turn on TKR bias voltages.
mask | Mask specifying the towers for which the TKR bias voltage is to be turned on. |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
unsigned PIG_enter_SAA | ( | void | ) |
Write registers to place the LAT into SAA mode.
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
unsigned PIG_exit_SAA | ( | void | ) |
Write registers to pull the LAT out of SAA mode.
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
unsigned PIG_extract | ( | PIG_cfg * | cfg | ) |
Extract one or more nodes from the C/R fabric, possibly powering off said node at the same time.
cfg | Pointer to a PIG configuration structure |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
References _PIG_tem::cal, _PIG_state::cru, getState(), _PIG_state::pdu, readCruState(), readPduState(), saveState(), _PIG_cfg::tem, and _PIG_tem::tkr.
unsigned PIG_extract_evt | ( | PIG_evt_cfg * | cfg | ) |
Extract one or more nodes from the event fabric.
cfg | Pointer to a PIG configuration structure |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
References _PIG_ebmState::contributors, _PIG_ebmState::destinations, _PIG_ebmState::inputs, readEbmState(), and saveEbmState().
Referenced by PIG_shed().
unsigned PIG_get_ebmState | ( | unsigned int * | inputs, | |
unsigned int * | contbs, | |||
unsigned int * | destns | |||
) |
Return the EBM configuration masks.
inputs | Address of an integer to receive the source processor input enables, or NULL if this value is not wanted. | |
contbs | Address of an integer to receive the EBM scheduler contributor enables, or NULL if this value is not wanted. | |
destns | Address of an integer to receive the round-robin and broadcast masks, or NULL if this value is not wanted. |
PIG_INMUD | Success |
References _PIG_ebmState::contributors, _PIG_ebmState::destinations, _PIG_state::ebm, and _PIG_ebmState::inputs.
unsigned PIG_get_pdus | ( | void | ) |
Get PDUs present.
Returns a two bit mask indicating the PDU(s) present in the C/R fabric
References _PIG_cruState::command, readCruState(), and _PIG_cruState::response.
unsigned PIG_insert | ( | PIG_cfg * | cfg | ) |
Insert one or more nodes into the C/R fabric, possibly powering on said node on at the same time.
cfg | Pointer to a PIG configuration structure |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
References _PIG_tem::cal, _PIG_state::cru, getState(), _PIG_state::pdu, readCruState(), readPduState(), saveState(), _PIG_cfg::tem, and _PIG_tem::tkr.
unsigned PIG_insert_evt | ( | PIG_evt_cfg * | cfg | ) |
Insert one or more nodes into the event fabric.
cfg | Pointer to a PIG configuration structure |
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
References _PIG_ebmState::contributors, _PIG_ebmState::destinations, _PIG_ebmState::inputs, readEbmState(), and saveEbmState().
Referenced by PIG_siu_init().
unsigned PIG_order_EPU | ( | unsigned | order[PIG_N_EPU] | ) |
Change the power-on order of the EPUs from the default to order.
order | Array of EPU ids specifying the power on order |
PIG_INMUD | Success | |
PIG_BADORD | Array of IDs contains duplicate or out of range values |
References epu_order.
unsigned PIG_order_FREE | ( | unsigned | order[PIG_N_FREE] | ) |
Change the power-on order of the FREE boards from the default to order.
order | Array of FREE ids specifying the power on order |
PIG_INMUD | Success | |
PIG_BADORD | Array of IDs contains duplicate or out of range values |
References free_order.
unsigned PIG_order_TEM | ( | unsigned | order[PIG_N_TEM] | ) |
Change the power-on order of the TEMs from the default to order.
order | Array of TEM ids specifying the power on order |
PIG_INMUD | Success | |
PIG_BADORD | Array of IDs contains duplicate or out of range values |
References tem_order.
unsigned PIG_record | ( | void * | buf, | |
ITC_cb_Completion * | rtn, | |||
void * | prm0, | |||
void * | prm1, | |||
void * | prm2 | |||
) |
Record the PIG registers to the SSR.
Takes a snapshot of the registers controlled by PIG and sends the resulting record to the SSR
buf | Pointer to a buffer to use for the record | |
rtn | Completion routine | |
prm0 | Completion routine user parameter 0 | |
prm1 | Completion routine user parameter 1 | |
prm2 | Completion routine user parameter 2 |
References PIG_sizeofRecord(), and readState().
unsigned PIG_safe | ( | void | ) |
Power off all the LAT components.
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
References _PIG_pduState::acd, _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_cruState::command, _PIG_pduState::crates, _PIG_state::cru, epu_cru, getState(), _PIG_state::pdu, PIG_N_EPU, PIG_N_FREE, PIG_N_TEM, _PIG_state::pwr, readCruState(), readPduState(), _PIG_cruState::response, saveState(), _PIG_pwrState::tem, tem_cru, _PIG_pduState::tems, _PIG_pwrState::tkr, and _PIG_pwrState::tkr_on.
Referenced by PIG_shed().
void PIG_set_epu_delay | ( | unsigned | delay | ) |
Set the delay after EPU power on.
delay | Time (in 100ths of a second) to wait after powering on an EPU |
References pig_epu_delay.
void PIG_set_off_delay | ( | unsigned | delay | ) |
Set the delay after power-off of a component.
delay | Time (in 100ths of a second) to wait after powering off a component |
References pig_off_delay.
void PIG_set_on_delay | ( | unsigned | delay | ) |
Set the delay after power-on of a component.
delay | Time (in 100ths of a second) to wait after powering on a component |
References pig_on_delay.
unsigned PIG_shed | ( | void | ) |
Shed the LAT power load.
This routine powers down all the components of the LAT.
PIG_INMUD | Success | |
PIG_CRLSMALL | Couldn't initialize C/R list | |
LEM_xxxxx | Various LEM/LCBD errors |
References PIG_extract_evt(), and PIG_safe().
unsigned PIG_siu_init | ( | PIG_siu_cfg | cfg | ) |
Configure the SIU in response to the MAIN_FEED_ON notification.
cfg | SIU configuration structure |
References cmdrsp_init(), _PIG_siu_cfg::dab_s, getPwrState(), PIG_insert_evt(), savePwrState(), _PIG_pwrState::sib, SIB_query(), _PIG_evt_cfg::siu, and _PIG_siu_cfg::siu_i.
size_t PIG_sizeofRecord | ( | void | ) |
Get the size of a PIG datagram.
Calculates the space required to send a record of the registers controlled by PIG to the SSR.
Referenced by PIG_record().
unsigned PIG_verify | ( | void | ) |
Verify the PIG state.
This routine reads all the PIG-controlled registers and compares their values with the cached ones.
PIG_INMUD | Register values all matched. | |
PIG_VERFAIL0 | A single-occurrence register value didn't match. | |
PIG_VERFAIL1 | A PDU, TEM or ARC register value didn't match. | |
PIG_VERFAIL2 | A CCC or TCC register value didn't match. |
References _PIG_pduState::acd, _PIG_pwrState::acd_hv, _PIG_pwrState::acd_mode, _PIG_pwrState::acd_saa, _PIG_pwrState::aem, _PIG_dbState::aem_event_timeout, _PIG_dbState::aem_relocation, _PIG_dbState::aem_response_timeout, _PIG_ebmState::be_config, _PIG_pwrState::cal, _PIG_dbState::ccc_event_timeouts, _PIG_cruState::command, _PIG_pduState::config, _PIG_cruState::config, _PIG_ebmState::contributors, _PIG_pduState::crates, _PIG_state::cru, _PIG_ebmState::destinations, _PIG_state::ebm, _PIG_dbState::ebm_fe_config_a, _PIG_dbState::ebm_fe_config_b, _PIG_dbState::ebm_timeout, _PIG_ebmState::inputs, _PIG_state::pdb, _PIG_state::pdu, pdu_cru, PIG_ARC_HV_MASK, PIG_N_CCC, PIG_N_FREE, PIG_N_PDU, PIG_N_TCC, PIG_N_TEM, _PIG_state::pwr, readState(), _PIG_cruState::response, _PIG_pwrState::sib, _PIG_ebmState::ssr_header, _PIG_dbState::tcc_event_timeouts, _PIG_pwrState::tem, _PIG_dbState::tem_configuration, tem_cru, _PIG_pduState::tems, and _PIG_pwrState::tkr.