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

Constituent: pig_rooting     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

cli.c File Reference

Extensions to the PIG interface. More...

#include "PIG/cli.h"
#include "PIG/power.h"
#include "PIG/PIG_msgs.h"
#include "LEM/list.h"
#include "LEM/msg_macros.h"
#include "PBS/MBA.h"
#include <string.h>

Include dependency graph for cli.c:


Functions

unsigned PIG_cmdRsp_init (PIG_MF_SELECT mf, PIG_PDU_SELECT pdu, PIG_DAB_SELECT dab)
 Complete the configuration of the cmdRsp fabric by closing the main feed and configuring the DAB.
unsigned PIG_tem_on (unsigned tem, PIG_PDU_SELECT pdu)
 Power on the tem using the specified PDU.
unsigned PIG_cal_on (unsigned twr)
 Power on the cal.
unsigned PIG_tkr_on (unsigned twr)
 Power on the tkr.
unsigned PIG_tem_off (unsigned tem)
 Power off the tem.
unsigned PIG_cal_off (unsigned twr)
 Power off the cal.
unsigned PIG_tkr_off (unsigned twr)
 Power off the tkr.
unsigned PIG_epu_on (unsigned epu, PIG_PDU_SELECT pdu)
 Power on an EPU using the specified PDU and power convertor.
unsigned PIG_epu_off (unsigned epu)
 Power off an EPU.
unsigned PIG_acd_on (PIG_PDU_SELECT pdu, unsigned use_sec_ps)
 Power on the ACD, specifying the power supply and convertor.
unsigned PIG_acd_off (void)
 Power off the ACD.
PIG_cfgPIG_new_cfg (void)
 Returns the size of the PIG_cfg structure.
void PIG_clear_cfg (PIG_cfg *cfg)
 Restore the structure to its virgin state.
void PIG_set_tem (PIG_cfg *cfg, unsigned sel_mask, unsigned pdu_mask)
 Set the sel and pdu fields of the tem substructure within the PIG_cfg structure.
void PIG_set_tkr (PIG_cfg *cfg, unsigned sel_mask)
 Set the tkr field of the tem substructure within the PIG_cg structure.
void PIG_set_cal (PIG_cfg *cfg, unsigned sel_mask)
 Set the cal field of the tem substructure within the PIG_cg structure.
void PIG_set_epu (PIG_cfg *cfg, unsigned sel_mask, unsigned pdu_mask)
 Set the fields of the epu substructure within the PIG_cfg structure.
void PIG_set_free (PIG_cfg *cfg, unsigned free)
 Set the free field of the acd substructure within the PIG_cfg structure.
void PIG_set_acd (PIG_cfg *cfg, PIG_PDU_SELECT pdu, unsigned sec_sup)
 Set the sel, sec_con and sec_sup fields of the ACD substructure within the PIG_cfg structure.
void PIG_clear_acd (PIG_cfg *cfg)
 Clear the fields of the ACD substructure within the PIG_cfg structure.
void PIG_set_all (PIG_cfg *cfg, PIG_PDU_SELECT pdu)
 Sets all the relevant bits in the the PIG_cfg structure to alter the power state of all components of the LAT, and configures all components of the LAT to be powered from the identified PDU.
void PIG_cb_NULL (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx)
 Completion call-back for use with PIG_record when working from the command line.

Detailed Description

Extensions to the PIG interface.

Author:
James Swain - jswain@slac.stanford.edu
history 08 Oct 2004: Prepare for first public release. Add history block 18 Dec 2004: Modified most of the fuctions to allocate C/R structure. 11 Jan 2005: Corrected PIG_links to allow both PDUs to be in the C/R fabric at once. 03 Feb 2005: Removed the use_secondary_converter argument from PIG_epu_on function, these no longer exist in hardware 22 Apr 2005: Removed PIG_switch PIG_links

Function Documentation

unsigned PIG_acd_off void   ) 
 

Power off the ACD.

Returns:
One of PIG_msgs

unsigned PIG_acd_on PIG_PDU_SELECT  pdu,
unsigned  use_sec_ps
 

Power on the ACD, specifying the power supply and convertor.

Parameters:
pdu PDU to use (0 | 1)
use_sec_ps Use the secondary power supply (0 no | 1 yes)
Returns:
One of PIG_msgs

unsigned PIG_cal_off unsigned  twr  ) 
 

Power off the cal.

Parameters:
twr ID of the twr to power off(1 ... f)
Returns:
one of PIG_msgs

unsigned PIG_cal_on unsigned  twr  ) 
 

Power on the cal.

Parameters:
twr ID of the twr to power on (1 ... f)

void PIG_cb_NULL ITC_QueueItem *  qitem,
unsigned int  status,
void *  prm0,
void *  prm1,
void *  prm2,
unsigned int  tx
 

Completion call-back for use with PIG_record when working from the command line.

Parameters:
qitem Queue item to be returned to the pool
status Success or failure of the ITC delivery
prm0 User defined parameter 0 (pointer to the FPM pool)
prm1 User defined (NULL)
prm2 User defined (NULL)
tx Transmission status

void PIG_clear_acd PIG_cfg cfg  ) 
 

Clear the fields of the ACD substructure within the PIG_cfg structure.

Parameters:
cfg Pointer to a PIG_cfg structure (allocate using PIG_sizeof_cfg())

void PIG_clear_cfg PIG_cfg cfg  ) 
 

Restore the structure to its virgin state.

Parameters:
cfg Pointer to a PIG_cfg structure (allocate using PIG_sizeof_cfg())

unsigned PIG_cmdRsp_init PIG_MF_SELECT  mf,
PIG_PDU_SELECT  pdu,
PIG_DAB_SELECT  dab
 

Complete the configuration of the cmdRsp fabric by closing the main feed and configuring the DAB.

Parameters:
mf Select main-feed (0 none | 1 primary | 2 secondary)
pdu Select pdu (0 none | 1 PDU_0 | 2 PDU_1 | 3 both)
dab Select dab (0 none | 1 primary | 2 secondary)
Returns:
Error code from call to PIG_siu_init

unsigned PIG_epu_off unsigned  epu  ) 
 

Power off an EPU.

Parameters:
epu EPU to power on (0 .. 3)
Returns:
One of PIG_msgs

unsigned PIG_epu_on unsigned  epu,
PIG_PDU_SELECT  pdu
 

Power on an EPU using the specified PDU and power convertor.

Parameters:
epu EPU to power on (0 .. 3)
pdu PDU to use (0 | 1)
Returns:
One of PIG_msgs

PIG_cfg* PIG_new_cfg void   ) 
 

Returns the size of the PIG_cfg structure.

Returns:
Pointer to a new, clear, PIG_cfg structure

void PIG_set_acd PIG_cfg cfg,
PIG_PDU_SELECT  pdu,
unsigned  sec_sup
 

Set the sel, sec_con and sec_sup fields of the ACD substructure within the PIG_cfg structure.

Parameters:
cfg Pointer to a PIG_cfg structure (allocate using PIG_sizeof_cfg())
pdu ID of the PDU to use to power the ACD
sec_sup 1 (Use secondary power supply) | 0 (do not use secondary power supply)

void PIG_set_all PIG_cfg cfg,
PIG_PDU_SELECT  pdu
 

Sets all the relevant bits in the the PIG_cfg structure to alter the power state of all components of the LAT, and configures all components of the LAT to be powered from the identified PDU.

Parameters:
cfg Pointer to a PIG_cfg structure (allocate using PIG_sizeof_cfg())
pdu ID of the PDU to use (ignored if cfg is passed into PIG_extract)

void PIG_set_cal PIG_cfg cfg,
unsigned  sel_mask
 

Set the cal field of the tem substructure within the PIG_cg structure.

Parameters:
cfg Pointer to a PIG_cfg structure (allocate using PIG_sizeof_cfg())
sel_mask Sixteen bit mask indicating the CAL towers whose power state should be altered

void PIG_set_epu PIG_cfg cfg,
unsigned  sel_mask,
unsigned  pdu_mask
 

Set the fields of the epu substructure within the PIG_cfg structure.

Parameters:
cfg Pointer to a PIG_cfg structure (allocate using PIG_sizeof_cfg())
sel_mask Three bit mask indicating the EPUs whose power state should be altered
pdu_mask Three single bits indicating which PDU should be used to power each EPU (ignored if cfg is passed into PIG_extract)

void PIG_set_free PIG_cfg cfg,
unsigned  free
 

Set the free field of the acd substructure within the PIG_cfg structure.

Parameters:
cfg Pointer to a PIG_cfg structure (allocate using PIG_sizeof_cfg())
free Twelve bit mask indicating the free boards whose power state should be altered

void PIG_set_tem PIG_cfg cfg,
unsigned  sel_mask,
unsigned  pdu_mask
 

Set the sel and pdu fields of the tem substructure within the PIG_cfg structure.

Parameters:
cfg Pointer to a PIG_cfg structure (allocate using PIG_sizeof_cfg())
sel_mask Sixteen bit mask indicating the TEMs whose power state should be altered
pdu_mask Sixteen single bits indicating which PDU should be used to power each TEM (ignored if the cfg is passed into PIG_extract)

void PIG_set_tkr PIG_cfg cfg,
unsigned  sel_mask
 

Set the tkr field of the tem substructure within the PIG_cg structure.

Parameters:
cfg Pointer to a PIG_cfg structure (allocate using PIG_sizeof_cfg())
sel_mask Sixteen bit mask indicating the TKR towers whose power state should be altered

unsigned PIG_tem_off unsigned  tem  ) 
 

Power off the tem.

Parameters:
tem ID of the tem to power off (1 .. f)
Returns:
On of PIG_msgs

unsigned PIG_tem_on unsigned  tem,
PIG_PDU_SELECT  pdu
 

Power on the tem using the specified PDU.

Parameters:
tem ID of the tem to power on (1 ... f)
pdu ID of the pdu to use (0 | 1)

unsigned PIG_tkr_off unsigned  twr  ) 
 

Power off the tkr.

Parameters:
twr ID of the twr to power off(1 ... f)
Returns:
One of PIG_msgs

unsigned PIG_tkr_on unsigned  twr  ) 
 

Power on the tkr.

Parameters:
twr ID of the twr to power on (1 ... f)


Generated on Thu Feb 22 04:36:10 2007 by  doxygen 1.4.4