GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PIG / V8-8-2

Constituent: pig_flying     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

pig.h File Reference

Interface to Power and the Initialisation of the GASU routines. More...

#include "PIG/structs.h"
#include "LEM/list_structs.h"
#include "ITC/ITC_pubdefs.h"

Functions

unsigned PIG_siu_init (LEM_micr *cr, PIG_siu_cfg cfg)
 Configure the SIU in response to the MAIN_FEED_ON notification.
unsigned PIG_epu_init (void)
 Complete the configuration of an EPU LCB.
unsigned PIG_cr_init (LEM_micr *cr, PIG_siu_cfg cfg)
 Initialise the C/R fabric by sending the CRU a LAM and then inserting the GEM, the EBM and any powered PDUs.
unsigned PIG_select_services (LEM_micr *cr, PIG_siu_cfg cfg)
 Sets bits in the GEM/CRU/EBM to select the P/R side of various SC provided services.
unsigned PIG_insert (LEM_micr *cr, 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_extract (LEM_micr *cr, PIG_cfg *cfg)
 Extract one or more nodes from the C/R fabric, possibly powering off said node at the same time.
unsigned PIG_insert_evt (LEM_micr *cr, PIG_evt_cfg *cfg)
 Insert one or more nodes into the event fabric.
unsigned PIG_extract_evt (LEM_micr *cr, PIG_evt_cfg *cfg)
 Extract one or more nodes from the event fabric.
unsigned PIG_verify_evt (LEM_micr *cr)
 This function is no longer supported, and returns an error.
void PIG_enter_SAA (LEM_micr *cr)
 Write registers to place the LAT into SAA mode.
void PIG_exit_SAA (LEM_micr *cr)
 Write registers to pull the LAT out of SAA mode.
void PIG_shed (LEM_micr *cr)
 Calls PIG_safe, then opens the LAT side of the main feed switch to reduce the load on the SC.
void PIG_safe (LEM_micr *cr)
 Powers off all the LAT components.
unsigned PIG_get_pdus (LEM_micr *cr)
 Returns a two bit mask indicating the PDU(s) present in the C/R fabric.
void PIG_set_on_delay (unsigned delay)
 Set the delay after power-on.
void PIG_set_off_delay (unsigned delay)
 Set the delay after power-off of a component.
unsigned PIG_order_EPU (unsigned order[N_EPU])
 Change the power-on order of the EPUs from the default to order.
unsigned PIG_order_TEM (unsigned order[N_TEM])
 Change the power-on order of the TEMs from the default to order.
unsigned PIG_order_FREE (unsigned order[N_FREE])
 Change the power-on order of the FREE boards from the default to order.
unsigned PIG_bias_ACD (LEM_micr *cr, PIG_acd_bias *bias)
unsigned PIG_bias_CAL (LEM_micr *cr, PIG_cal_bias *bias)
 Load the CAL bias DAC regsiters.
unsigned PIG_bias_TKR (LEM_micr *cr, PIG_tkr_bias *bias)
 Load the TKR bias DAC regsiters.
size_t PIG_sizeofRecord (void)
 Calculate the space required to send a record of the registers controlled by PIG to the SSR.
unsigned PIG_record (LEM_micr *cr, void *buf, ITC_cb_Completion *rtn, void *prm0, void *prm1, void *prm2)
 Take a snapshot of the registers controlled by PIG and send the resulting record to the SSR.


Detailed Description

Interface to Power and the Initialisation of the GASU routines.

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

Function Documentation

unsigned PIG_bias_ACD LEM_micr *  cmdRsp,
PIG_acd_bias bias
 

Parameters:
cmdRsp Pointer to a multi-item command response list
bias Pointer to structure containing the bias voltage values
Returns:
LEM error if there is an error with the command list, or PIG_INMUD if all goes well

unsigned PIG_bias_CAL LEM_micr *  cmdRsp,
PIG_cal_bias bias
 

Load the CAL bias DAC regsiters.

Parameters:
cmdRsp Pointer to a multi-item command response list
bias Pointer to structure containing the bias voltage values
Returns:
LEM error if there is an error with the command list, or PIG_INMUD if all goes well

unsigned PIG_bias_TKR LEM_micr *  cmdRsp,
PIG_tkr_bias bias
 

Load the TKR bias DAC regsiters.

Parameters:
cmdRsp Pointer to a multi-item command response list
bias Pointer to structure containing the bias voltage values
Returns:
LEM error if there is an error with the command list, or PIG_INMUD if all goes well

unsigned PIG_cr_init LEM_micr *  cmdRsp,
PIG_siu_cfg  cfg
 

Initialise the C/R fabric by sending the CRU a LAM and then inserting the GEM, the EBM and any powered PDUs.

Parameters:
cfg SIU configuration structure
cmdRsp Pointer to a structure holding correctly aligned mutli-item command and response lists
Returns:
One of the PIG_msgs

void PIG_enter_SAA LEM_micr *  cr  ) 
 

Write registers to place the LAT into SAA mode.

Parameters:
cr Pointer to a structure holding correctly aligned mutli-item command and response lists

unsigned PIG_epu_init void   ) 
 

Complete the configuration of an EPU LCB.

Returns:
One of the PIG_msgs

void PIG_exit_SAA LEM_micr *  cr  ) 
 

Write registers to pull the LAT out of SAA mode.

Parameters:
cr Pointer to a structure holding correctly aligned mutli-item command and response lists

unsigned PIG_extract LEM_micr *  cr,
PIG_cfg cfg
 

Extract one or more nodes from the C/R fabric, possibly powering off said node at the same time.

Parameters:
cfg Pointer to a PIG configuration structure
cr Pointer to a structure holding correctly aligned mutli-item command and response lists
Returns:
one of the PIG_msgs

unsigned PIG_extract_evt LEM_micr *  cr,
PIG_evt_cfg cfg
 

Extract one or more nodes from the event fabric.

Parameters:
cfg Pointer to a PIG configuration structure
cr Pointer to a structure holding correctly aligned mutli-item command and response lists
Returns:
one of the PIG_msgs

unsigned PIG_get_pdus LEM_micr *  cr  ) 
 

Returns a two bit mask indicating the PDU(s) present in the C/R fabric.

Return values:
PDU mask
Parameters:
cr Pointer to a structure holding correctly aligned mutli-item command and response lists

unsigned PIG_insert LEM_micr *  cr,
PIG_cfg cfg
 

Insert one or more nodes into the C/R fabric, possibly powering on said node on at the same time.

Parameters:
cfg Pointer to a PIG configuration structure
cr Pointer to a structure holding correctly aligned mutli-item command and response lists
Returns:
one of the PIG_msgs

unsigned PIG_insert_evt LEM_micr *  cr,
PIG_evt_cfg cfg
 

Insert one or more nodes into the event fabric.

Parameters:
cfg Pointer to a PIG configuration structure
cr Pointer to a structure holding correctly aligned mutli-item command and response lists
Returns:
one of the PIG_msgs

unsigned PIG_order_EPU unsigned  order[N_EPU]  ) 
 

Change the power-on order of the EPUs from the default to order.

Parameters:
order Array EPU ids specifying the power on order
Returns:
One of PIG_msg.

unsigned PIG_order_FREE unsigned  order[N_FREE]  ) 
 

Change the power-on order of the FREE boards from the default to order.

Parameters:
order Array of FREE ids specifying the power on order
Returns:
One of PIG_msgs.

unsigned PIG_order_TEM unsigned  order[N_TEM]  ) 
 

Change the power-on order of the TEMs from the default to order.

Parameters:
order Array of TEM ids specifying the power on order
Returns:
One of PIG_msgs.

unsigned PIG_record LEM_micr *  cr,
void *  buf,
ITC_cb_Completion *  rtn,
void *  prm0,
void *  prm1,
void *  prm2
 

Take a snapshot of the registers controlled by PIG and send the resulting record to the SSR.

Parameters:
cr Multi-item command response structure
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

void PIG_safe LEM_micr *  cr  ) 
 

Powers off all the LAT components.

Parameters:
cr Pointer to a structure holding correctly aligned mutli-item command and response lists

unsigned PIG_select_services LEM_micr *  cmdRsp,
PIG_siu_cfg  cfg
 

Sets bits in the GEM/CRU/EBM to select the P/R side of various SC provided services.

Parameters:
cfg Pointer to the a structure descrbing the configuration required
cmdRsp Pointer to a structure holding correctly aligned mutli-item command and response lists
Returns:
One of PIG_msgs

void PIG_set_off_delay unsigned  delay  ) 
 

Set the delay after power-off of a component.

Parameters:
delay Time (in 60ths of a second) to wait after powering on a component

void PIG_set_on_delay unsigned  delay  ) 
 

Set the delay after power-on.

Parameters:
delay Time (in 60ths of a second) to wait after powering on a component

void PIG_shed LEM_micr *  cr  ) 
 

Calls PIG_safe, then opens the LAT side of the main feed switch to reduce the load on the SC.

Parameters:
cr Pointer to a structure holding correctly aligned mutli-item command and response lists

unsigned PIG_siu_init LEM_micr *  cmdRsp,
PIG_siu_cfg  cfg
 

Configure the SIU in response to the MAIN_FEED_ON notification.

Parameters:
cfg SIU configuration structure
cmdRsp Pointer to a structure holding correctly aligned mutli-item command and response lists
Returns:
One of the PIG_msgs

size_t PIG_sizeofRecord void   ) 
 

Calculate the space required to send a record of the registers controlled by PIG to the SSR.

Returns:
Size of a record in bytes

unsigned PIG_verify_evt LEM_micr *  cr  ) 
 

This function is no longer supported, and returns an error.

Parameters:
cr Ignored
Returns:
PIG_NOSUP


Generated on Mon Mar 13 15:13:21 2006 by  doxygen 1.4.4