GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCS / dev > lcs / rhel5-32
#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>
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_Control * | LCS_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. |
CVS $Id: LCS_control.c,v 1.11 2011/03/28 22:49:56 apw Exp $
unsigned int completeLCB | ( | LCBD | lcbd | ) |
Complete the initialization of the LCB (SIU/EPU common).
lcbd | (in) LCB driver handle |
LCS_LCBFAIL | LCB initialization failed | |
LCS_SUCCESS | Success |
This routine does not bring the event fabric online
Referenced by LCS_completeEPU(), and LCS_completeSIU().
unsigned int enableEvent | ( | LCBD | lcbd | ) |
Enable the event fabric.
lcbd | (in) LCB driver handle |
LCS_SUCCESS | Success |
Referenced by LCS_completeEPU(), and LCS_enableEvent().
unsigned int LCS_completeEPU | ( | void | ) |
Complete the initialization of the LCB (EPU specific).
LCS_LCBFAIL | LCB initialization failed | |
LCS_SUCCESS | Success |
References completeLCB(), enableEvent(), LCB_CSR_K_SIU, LCB_CSR_M_SIU, LCB_CSR_T_SIU, LCB_CSR_V_SIU, LCS_getNodeID(), and LCS_setNodeAddressSIU().
unsigned int LCS_completeSIU | ( | unsigned int | latpAddr | ) |
Complete the initialization of the LCB (SIU specific).
latpAddr | (in) SIU's EBM hardware address |
LCS_NOTSIUND | Illegal SIU hardware address | |
LCS_SUCCESS | Success |
References completeLCB(), LCB_CSR_T_SIU, LCS_NIH_SIU0, LCS_NIH_SIU1, LCS_NIH_SIUE, and LCS_setNodeAddressSIU().
unsigned int LCS_enableEvent | ( | void | ) |
Enable the event fabric.
LCS_SUCCESS | Success |
References enableEvent().
unsigned int LCS_initialize | ( | LCS_NodeAddress | deprecated | ) |
Initialize the LCS master control block.
deprecated | (in) This parameter is no longer used (ignored) |
LCS_ALOCFAIL | Memory allocation failure | |
LCS_CTLSTAT | Invalid control state for this operation | |
LCS_MUALOCFL | Mutex allocation failure | |
LCS_SUCCESS | Success |
References LCS_CTL_INITIALIZED, LCS_CTL_UNINITIALIZED, LCS_K_HARDBASE, LCS_NIH_BCST, LCS_NIH_EPU0, LCS_NIH_EPU1, LCS_NIH_EPU2, LCS_NIH_EPU3, LCS_NIH_NONE, LCS_NIH_SDI, LCS_NIH_SIU0, LCS_NIH_SIU1, _LCS_Control::map, _LCS_Control::mtx, _LCS_Control::nto, _LCS_Control::rev, _LCS_Control::rwi, and _LCS_Control::state.
unsigned int LCS_shutdown | ( | void | ) |
Shut down the LCS master control block and release resources.
LCS_CTLSTAT | Invalid control state for this operation | |
LCS_NOTINT | Control block not initialized | |
LCS_SUCCESS | Success |
References LCS_CTL_INITIALIZED, LCS_CTL_UNINITIALIZED, _LCS_Control::mtx, and _LCS_Control::state.
const char* LCS_ctl_states[LCS_L_CTL_STATES] |
Initial value:
{ "uninitialized", "initialized" }
Referenced by checkState(), createService(), and LRX_createService().
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.
Referenced by checkState(), createService(), LCS_getControl(), LCS_getNodeAddress(), LCS_getNodeID(), LCS_getRxEngine(), LCS_getTxEngine(), LCS_setNodeAddressSIU(), LRX_createService(), LRX_deleteService(), LRX_process(), LRX_replyDispatch(), LRX_replySent(), LRX_reset(), LRX_setAlloc(), LRX_startService(), LRX_stopService(), LTX_deleteService(), LTX_resultList(), LTX_startService(), and LTX_stopService().
const char* LCS_svc_states[LCS_L_SVC_STATES] |
Initial value:
{ "uninitialized", "initialized", "started", "stopping" }
Referenced by checkState().