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

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 "pig_macro_p.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/TASK.h"
#include "PBS/TOV.h"
#include <string.h>

Include dependency graph for pig.c:


Functions

static __inline 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_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_order_EPU (unsigned order[N_EPU])
 Change the power-on order of the EPUs 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_order_TEM (unsigned order[N_TEM])
 Change the power-on order of the TEMs from the default to order.
void delay_epu (void)
 Delay the task for pig_epu_delay 100ths of a second.
void delay_off (void)
 Delay the task for pig_off_delay 100ths of a second.
void delay_on (void)
 Delay the task for pig_on_delay 100ths of a second.
unsigned get_epu_id (unsigned index)
 Map 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)
 Map 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)
 Map an index to an TEM id (part of the machinery that allows the specification of a power on order).

Variables

static unsigned pig_epu_delay = DEFAULT_EPU_DELAY
 Time to wait after powering up an EPU.
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]
 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]
 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 & Owen Saxton
Id
pig.c,v 1.25 2006/07/12 23:13:32 saxton Exp

Function Documentation

unsigned change_order unsigned *  new_order,
unsigned  n,
unsigned *  old_order
[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
Return values:
PIG_INMUD Success
PIG_BADORD Array of new IDs contains duplicate or out of range values

unsigned get_epu_id unsigned  index  ) 
 

Map 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:
Ordered EPU ID

unsigned get_free_id unsigned  index  ) 
 

Map 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:
Ordered FREE ID

unsigned get_tem_id unsigned  index  ) 
 

Map 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:
Ordered TEM ID

unsigned PIG_order_EPU unsigned  order[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[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[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

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


Variable Documentation

unsigned free_order[N_FREE] [static]
 

Initial value:

 {0x0, 0x1, 0x2, 0x3, 0x4, 0x5,
                                      0x6, 0x7, 0x8, 0x9, 0xa, 0xb}
Specify the order in which to power the FREE boards.

unsigned tem_order[N_TEM] [static]
 

Initial value:

 {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.


Generated on Thu Oct 26 13:56:40 2006 by  doxygen 1.4.4