GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PIG / V10-1-0

Constituent: pig_flying     Tag: linux-gcc


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/const.h"
#include "PIG/structs.h"
#include "ITC/ITC_pubdefs.h"

Include dependency graph for pig.h:

This graph shows which files directly or indirectly include this file:


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.

Detailed Description

Interface to Power and the Initialisation of the GASU routines.

Author:
James Swain & Owen Saxton
Id
pig.h,v 1.32 2009/02/09 21:47:28 saxton Exp

Function Documentation

unsigned PIG_bias_ACD PIG_acd_bias bias  ) 
 

Load the ACD bias DAC registers.

Parameters:
bias Pointer to structure containing the bias voltage values
Return values:
PIG_INMUD Success
PIG_CRLSMALL Couldn't initialize C/R list
LEM_xxxxx Various LEM/LCBD errors

unsigned PIG_bias_ACD_off unsigned  mask  ) 
 

Turn off ACD bias voltages.

Parameters:
mask Mask specifying the FREE boards for which the bias voltage is to be turned off.
Return values:
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.

Parameters:
mask Mask specifying the FREE boards for which the bias voltage is to be turned on.
Return values:
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.

Parameters:
bias Pointer to structure containing the bias voltage values
Return 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.

Parameters:
mask Mask specifying the towers for which the CAL bias voltage is to be turned off.
Return values:
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.

Parameters:
mask Mask specifying the towers for which the CAL bias voltage is to be turned on.
Return values:
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.

Parameters:
bias Pointer to structure containing the bias voltage values
Return 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.

Parameters:
mask Mask specifying the towers for which the TKR bias voltage is to be turned off.
Return values:
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.

Parameters:
mask Mask specifying the towers for which the TKR bias voltage is to be turned on.
Return values:
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.

Return values:
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.

Return values:
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.

Parameters:
cfg Pointer to a PIG configuration structure
Return values:
PIG_INMUD Success
PIG_CRLSMALL Couldn't initialize C/R list
LEM_xxxxx Various LEM/LCBD errors

unsigned PIG_extract_evt PIG_evt_cfg cfg  ) 
 

Extract one or more nodes from the event fabric.

Parameters:
cfg Pointer to a PIG configuration structure
Return values:
PIG_INMUD Success
PIG_CRLSMALL Couldn't initialize C/R list
LEM_xxxxx Various LEM/LCBD errors

unsigned PIG_get_ebmState unsigned int *  inputs,
unsigned int *  contbs,
unsigned int *  destns
 

Return the EBM configuration masks.

Parameters:
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.
Return values:
PIG_INMUD Success

unsigned PIG_get_pdus void   ) 
 

Get PDUs present.

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

Returns:
PDU mask

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.

Parameters:
cfg Pointer to a PIG configuration structure
Return values:
PIG_INMUD Success
PIG_CRLSMALL Couldn't initialize C/R list
LEM_xxxxx Various LEM/LCBD errors

unsigned PIG_insert_evt PIG_evt_cfg cfg  ) 
 

Insert one or more nodes into the event fabric.

Parameters:
cfg Pointer to a PIG configuration structure
Return values:
PIG_INMUD Success
PIG_CRLSMALL Couldn't initialize C/R list
LEM_xxxxx Various LEM/LCBD errors

unsigned PIG_order_EPU unsigned  order[PIG_N_EPU]  ) 
 

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

Parameters:
order Array of EPU ids specifying the power on order
Return values:
PIG_INMUD Success
PIG_BADORD Array of IDs contains duplicate or out of range values

unsigned PIG_order_FREE unsigned  order[PIG_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
Return values:
PIG_INMUD Success
PIG_BADORD Array of IDs contains duplicate or out of range values

unsigned PIG_order_TEM unsigned  order[PIG_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
Return values:
PIG_INMUD Success
PIG_BADORD Array of IDs contains duplicate or out of range values

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

Parameters:
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

unsigned PIG_safe void   ) 
 

Power off all the LAT components.

Return values:
PIG_INMUD Success
PIG_CRLSMALL Couldn't initialize C/R list
LEM_xxxxx Various LEM/LCBD errors

void PIG_set_epu_delay unsigned  delay  ) 
 

Set the delay after EPU power on.

Parameters:
delay Time (in 100ths of a second) to wait after powering on an EPU

void PIG_set_off_delay unsigned  delay  ) 
 

Set the delay after power-off of a component.

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

void PIG_set_on_delay unsigned  delay  ) 
 

Set the delay after power-on of a component.

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

unsigned PIG_shed void   ) 
 

Shed the LAT power load.

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

Return values:
PIG_INMUD Success
PIG_CRLSMALL Couldn't initialize C/R list
LEM_xxxxx Various LEM/LCBD errors

unsigned PIG_siu_init PIG_siu_cfg  cfg  ) 
 

Configure the SIU in response to the MAIN_FEED_ON notification.

Parameters:
cfg SIU configuration structure
Returns:
One of the PIG_msgs

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.

Returns:
Size of a record in bytes

unsigned PIG_verify void   ) 
 

Verify the PIG state.

This routine reads all the PIG-controlled registers and compares their values with the cached ones.

Return values:
PIG_INMUD Register values all matched.
PIG_VERIFY0 A single-occurrence register value didn't match.
PIG_VERIFY1 A PDU, TEM or ARC register value didn't match.
PIG_VERIFY2 A CCC or TCC register value didn't match.


Generated on Thu Feb 12 01:13:23 2009 by  doxygen 1.4.4