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

Constituent: pig_flying     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

pig.c File Reference

Implementation of the Power and the Initialisation of the GASU routines. More...

#include "PIG/PIG_msgs.h"
#include "PIG/power.h"
#include "taskDelay_p.h"
#include "pig_macro_p.h"
#include "MSG/MSG_pubdefs.h"
#include <string.h>

Include dependency graph for pig.c:


Functions

static unsigned change_order (unsigned *new_order, unsigned n, unsigned *old_order)
 Change the power-on order from the default to new_order.
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.
void delay_off (void)
 Delay the task for pig_off_delay 60ths of a second.
void delay_on (void)
 Delay the task for pig_on_delay 60ths of a second.
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 get_epu_id (unsigned index)
 Maps an index to an EPU id (part of the machinery that allows the specification of a power on order).
unsigned get_free_id (unsigned index)
 Maps an index to an FREE id (part of the machinery that allows the specification of a power on order).
unsigned get_tem_id (unsigned index)
 Maps an index to an TEM id (part of the machinery that allows the specification of a power on order).

Variables

static unsigned pig_off_delay = DEFAULT_OFF_DELAY
 Time to wait after powering off a component.
static unsigned pig_on_delay = DEFAULT_ON_DELAY
 Time to wait after powering on a component.
static unsigned tem_order [N_TEM] = {0x5,0x6,0x9,0xa,0xc,0xd,0xe,0x1,0x2,0x3,0x7,0xb,0xf,0x0,0x4,0x8}
 Specify the order in which to power on the tems.
static unsigned epu_order [N_EPU] = {0, 1, 2}
 Specify the order in which to power on the EPUs.
static unsigned free_order [N_FREE] = {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb}
 Specify the order in which to power the FREE boards.

Detailed Description

Implementation of the Power and the Initialisation of the GASU routines.

Author:
James Swain - jswain@slac.stanford.edu
history 08 Oct 2004: Prepare for first public release. Add history block 24 Oct 2004: Created seperate delays for powering on and powering off LAT components

Function Documentation

unsigned change_order unsigned *  new_order,
unsigned  n,
unsigned *  old_order
[inline, static]
 

Change the power-on order from the default to new_order.

Parameters:
new_order Array of IDs giving the new power on order
n Number of elements in the order arrays
old_order Array where the power on order is stored
Returns:
One of PIG_msg.

unsigned get_epu_id unsigned  index  ) 
 

Maps an index to an EPU id (part of the machinery that allows the specification of a power on order).

Parameters:
index Index into EPU order array
Returns:
0, 1 or 2

unsigned get_free_id unsigned  index  ) 
 

Maps an index to an FREE id (part of the machinery that allows the specification of a power on order).

Parameters:
index Index into FREE order array
Returns:
0, 1 or 2

unsigned get_tem_id unsigned  index  ) 
 

Maps an index to an TEM id (part of the machinery that allows the specification of a power on order).

Parameters:
index Index into TEM order array
Returns:
0, 1 or 2

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.

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


Generated on Wed Mar 15 23:39:57 2006 by  doxygen 1.4.4