GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LRA / V5-2-0 > lra / rad750


Interface   Data Structures   File List   Data Fields   Globals  

LRA_ctrl.c File Reference

Component control (dataless) operation routines. More...

#include "LRA_p.h"
#include "LRA/LRA_msgs.h"
#include "MSG/MSG_pubdefs.h"
#include "LEM/defs.h"
#include "LEM/encode.h"
#include "LEM/decode.h"
#include "LEM/list.h"
#include "LEM/list_macros.h"
#include "LCBD/LCBC.h"

Classes

struct  _LRA_cmptAddr

Typedefs

typedef struct
_LRA_cmptAddr 
LRA_cmptAddr

Functions

unsigned LRA_ctrl (const LRA_regSpec *rSpec)
 Perform a control operation.
unsigned LRA_doCtrl (LEM_micr *crl, const LRA_regSpec *rSpec)
 Internal routine to handle a control operation request.
unsigned LRA_lam (unsigned cmpnt, unsigned tem)
 Perform a look-at-me operation.
unsigned LRA_doLam (LEM_micr *crl, unsigned cmpnt, unsigned tem)
 Internal routine to handle a look-at-me request.
unsigned LRA_lamLcb (unsigned cmpnt, unsigned value, unsigned mask)
 Perform a look-at-me directed to an LCB.
unsigned LRA_doLamLcb (LEM_micr *crl, unsigned cmpnt, unsigned value, unsigned mask)
 Internal routine to handle a look-at-me request directed to an LCB.
unsigned LRA_latReset (void)
 Perform a LAT reset.

Variables

static LRA_cmptAddr lamTbl []
static LRA_cmptAddr lamLcbTbl []


Detailed Description

Component control (dataless) operation routines.

Author:
Owen H Saxton
$Id: LRA_ctrl.c,v 1.7 2009/07/31 22:06:00 saxton Exp $

Function Documentation

unsigned LRA_ctrl ( const LRA_regSpec rSpec  ) 

Perform a control operation.

The internal routine is called to carry out the specified control operation on the specified component.

Parameters:
rSpec The register specifier, specifying which instances of which component are to be operated on. It contains the component, the register block (EBM only), the TEM number, cable controller number, readout controller number, front-end number, and control function. The TEM, CC, RC and FE may be set individually to the value LRA_WILD to cause the operation to be performed on all instances.
Return values:
LRA_SUCCESS The operation was successful
LRA_INVCMPT Invalid component number
LRA_INVCNTRL Invalid control operation
LRA_INVTEM Invalid TEM number
LRA_INVCC Invalid cable controller number
LRA_INVRC Invalid readout controller number
LRA_INVFE Invalid front-end number
ITC_SENDTID Destination task (LRA) not started
LCBD_RTOERR Operation timed out

unsigned LRA_doCtrl ( LEM_micr *  crl,
const LRA_regSpec rSpec 
)

Internal routine to handle a control operation request.

The specified control operation is performed on the specified component.

Parameters:
crl The address of a multi-item command/response list to be used in the register operations.
rSpec The register specifier, specifying which instances of which component are to be operated on. It contains the component, the register block (EBM only), the TEM number, cable controller number, readout controller number, front-end number, and control function. The TEM, CC, RC and FE may be set individually to the value LRA_WILD to cause the operation to be performed on all instances.
Return values:
LRA_SUCCESS The operation was successful
LRA_INVCMPT Invalid component number
LRA_INVCNTRL Invalid control operation
LRA_INVTEM Invalid TEM number
LRA_INVCC Invalid cable controller number
LRA_INVRC Invalid readout controller number
LRA_INVFE Invalid front-end number
LCBD_RTOERR Operation timed out

unsigned LRA_doLam ( LEM_micr *  crl,
unsigned  cmpnt,
unsigned  tem 
)

Internal routine to handle a look-at-me request.

This routine sends a look-at-me to the specified component.

Parameters:
crl The address of a multi-item command/response list to be used in the register operations.
cmpnt The ID of the component to be sent a look-at-me
tem The TEM number to use if the component is TEM
Return values:
LRA_SUCCESS The operation was successful
LRA_INVCMPT Invalid component number
LRA_INVTEM Invalid TEM number
LCBD_RTOERR Operation timed out

unsigned LRA_doLamLcb ( LEM_micr *  crl,
unsigned  cmpnt,
unsigned  value,
unsigned  mask 
)

Internal routine to handle a look-at-me request directed to an LCB.

This routine sends a look-at-me to the specified LCB component.

Parameters:
crl The address of a multi-item command/response list to be used in the register operations.
cmpnt The ID of the LCB component to be sent a look-at-me
value The value to be sent
mask The mask specifying which bits of value to use
Return values:
LRA_SUCCESS The operation was successful
LRA_INVCMPT Invalid component number
LCBD_RTOERR Operation timed out

unsigned LRA_lam ( unsigned  cmpnt,
unsigned  tem 
)

Perform a look-at-me operation.

The internal routine is called to send a look-at-me to the specified component.

Parameters:
cmpnt The ID of the component to be sent a look-at-me
tem The TEM number to use if the component is TEM
Return values:
LRA_SUCCESS The operation was successful
LRA_INVCMPT Invalid component number
LRA_INVTEM Invalid TEM number
ITC_SENDTID Destination task (LRA) not started
LCBD_RTOERR Operation timed out

unsigned LRA_lamLcb ( unsigned  cmpnt,
unsigned  value,
unsigned  mask 
)

Perform a look-at-me directed to an LCB.

The internal routine is called to send a look-at-me to the specified LCB component.

Parameters:
cmpnt The ID of the LCB component to be sent a look-at-me
value The value to be sent
mask The mask specifying which bits of value to use
Return values:
LRA_SUCCESS The operation was successful
LRA_INVCMPT Invalid component number
ITC_SENDTID Destination task (LRA) not started
LCBD_RTOERR Operation timed out

unsigned LRA_latReset ( void   ) 

Perform a LAT reset.

The whole LAT is reset.

Return values:
LRA_SUCCESS Reset was successful
LCBD_RTOERR Operation timed out


Variable Documentation

LRA_cmptAddr lamLcbTbl[] [static]

Initial value:

 {{LRA_CPT_SIUE, LEM_ADDR_SIU_EXT},
                                   {LRA_CPT_SIU0, LEM_ADDR_SIU_0},
                                   {LRA_CPT_SIU1, LEM_ADDR_SIU_1},
                                   {LRA_CPT_EPU0, LEM_ADDR_EPU_0},
                                   {LRA_CPT_EPU1, LEM_ADDR_EPU_1},
                                   {LRA_CPT_EPU2, LEM_ADDR_EPU_2}, 
                                   {LRA_CPT_BCST, LEM_ADDR_MST_BCAST}}

LRA_cmptAddr lamTbl[] [static]

Initial value:

    {{LRA_CPT_GEM,  LEM_ADDR_GEM},
                                   {LRA_CPT_EBM,  LEM_ADDR_EBM},
                                   {LRA_CPT_PDU0, LEM_ADDR_PDU_0},
                                   {LRA_CPT_PDU1, LEM_ADDR_PDU_1},
                                   {LRA_CPT_CRU,  LEM_ADDR_CRU},
                                   {LRA_CPT_TEM,  LEM_ADDR_TEM_0}, 
                                   {LRA_CPT_AEM,  LEM_ADDR_AEM},
                                   {LRA_CPT_BCST, LEM_ADDR_SLV_BCAST}}


Generated on Fri Jul 31 15:37:09 2009 by  doxygen 1.5.3