GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCS / V1-5-0

Constituent: lcs     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LCS_control.c File Reference

Management of the LCS master control block. More...

#include <string.h>
#include "PBS/MBA.h"
#include "MSG/MSG_pubdefs.h"
#include "LCBD/LCBC.h"
#include "LCBD/LCBD_drv.h"
#include "LCBD/LCBD_msgs.h"
#include "ITC/ITC_pubdefs.h"
#include "ITC/ITC_msgs.h"
#include "LCS/LCS_pubdefs.h"
#include "LCS/LCS_msgs.h"
#include "LCS_prvdefs.h"

Include dependency graph for LCS_control.c:


Defines

#define LCB_CSR_S_SIU   ( 3 )
 SIU's CPU ID field in LCBD's CSR user field: width (bits).
#define LCB_CSR_V_SIU   ( 17 )
 SIU's CPU ID field in LCBD's CSR user field: offset.
#define LCB_CSR_M_SIU   ((( 1 << LCB_CSR_S_SIU ) - 1) << LCB_CSR_V_SIU)
 SIU's CPU ID field in LCBD's CSR user field: in-place mask.
#define LCB_CSR_K_SIU   ( 0x20 )
 SIU's CPU ID field in LCBD's CSR user field: implied upper bits.
#define LCB_CSR_T_SIU   ( 500 )
 Timeout for accessing the LCBD's CSR register.

Functions

unsigned int completeLCB (LCBD lcbd)
 Complete the initialization of the LCB (SIU/EPU common).
unsigned int enableEvent (LCBD lcbd)
 Enable the event fabric.
unsigned int LCS_initialize (LCS_NodeAddress deprecated)
 Initialize the LCS master control block.
unsigned int LCS_completeEPU ()
 Complete the initialization of the LCB (EPU specific).
unsigned int LCS_completeSIU (unsigned int latpAddr)
 Complete the initialization of the LCB (SIU specific).
unsigned int LCS_enableEvent ()
 Enable the event fabric.
unsigned int LCS_shutdown ()
 Shut down the LCS master control block and release resources.

Variables

LCS_ControlLCS_lcb
 Master control block for the LCS system.
const char * LCS_ctl_states [LCS_L_CTL_STATES]
 String constants for LCS control block states.
const char * LCS_svc_states [LCS_L_SVC_STATES]
 String constants for LCS service block states.

Detailed Description

Management of the LCS master control block.

CVS $Id: LCS_control.c,v 1.10 2006/10/26 02:08:50 apw Exp $
Author:
A.P.Waite

Function Documentation

unsigned int completeLCB LCBD  lcbd  ) 
 

Complete the initialization of the LCB (SIU/EPU common).

Parameters:
lcbd (in) LCB driver handle
Return values:
LCS_LCBFAIL LCB initialization failed
LCS_SUCCESS Success
Warning:
This routine can block, waiting for the GASU 20 MHz clock

This routine does not bring the event fabric online

completeLCB() completes the part of the LCB initialization that requires the GASU 20 MHz clock. This routine will enable clock-on, clock-off interrupts, then wait for the appearance of the GASU clock. It should only be called if there's a reasonable expectation that the GASU clock is already available. This is not so hard to achieve because the SIU is in control of GASU power and thus knows when the clock turns on, and EPUs are always in the position that without the GASU clock, they couldn't have been booted.

unsigned int enableEvent LCBD  lcbd  ) 
 

Enable the event fabric.

Parameters:
lcbd (in) LCB driver handle
Return values:
LCS_SUCCESS Success
enableEvent() brings the event fabric online.

unsigned int LCS_completeEPU void   ) 
 

Complete the initialization of the LCB (EPU specific).

Return values:
LCS_LCBFAIL LCB initialization failed
LCS_SUCCESS Success
LRX_completeEPU() completes LCB initialization of an EPU LCB. This includes bringing the event fabric online.

unsigned int LCS_completeSIU unsigned int  latpAddr  ) 
 

Complete the initialization of the LCB (SIU specific).

Parameters:
latpAddr (in) SIU's EBM hardware address
Return values:
LCS_NOTSIUND Illegal SIU hardware address
LCS_SUCCESS Success
LCS_completeSIU() completes LCB initialization of an SIU LCB, with the exception that the event fabric is not brought online.

unsigned int LCS_enableEvent void   ) 
 

Enable the event fabric.

Return values:
LCS_SUCCESS Success
LCS_enableEvent() brings the event fabric online.

unsigned int LCS_initialize LCS_NodeAddress  deprecated  ) 
 

Initialize the LCS master control block.

Parameters:
deprecated (in) This parameter is no longer used (ignored)
Return values:
LCS_ALOCFAIL Memory allocation failure
LCS_CTLSTAT Invalid control state for this operation
LCS_MUALOCFL Mutex allocation failure
LCS_SUCCESS Success
LCS_initialize() initializes the LCS master control block.

unsigned int LCS_shutdown void   ) 
 

Shut down the LCS master control block and release resources.

Return values:
LCS_CTLSTAT Invalid control state for this operation
LCS_NOTINT Control block not initialized
LCS_SUCCESS Success
LCS_shutdown() shuts down the LCS master control block and releases assocoated resources


Variable Documentation

const char* LCS_ctl_states[LCS_L_CTL_STATES]
 

Initial value:

{
    "uninitialized",
    "initialized"
}
String constants for LCS control block states.

LCS_Control* LCS_lcb
 

Master control block for the LCS system.

Master control block for the LCS system. This is global, so care must be taken when writing elements of this block that the code is properly protected.

const char* LCS_svc_states[LCS_L_SVC_STATES]
 

Initial value:

{
    "uninitialized",
    "initialized",
    "started",
    "stopping"
}
String constants for LCS service block states.


Generated on Thu Oct 26 16:31:12 2006 by  doxygen 1.4.4