GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LRA / V5-2-4 > lra / sun-gcc
#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 [] |
$Id: LRA_ctrl.c,v 1.9 2011/03/28 16:18:25 saxton Exp $
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.
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. |
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 |
References LRA_doCtrl().
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.
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. |
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 |
References _LRA_regSpec::block, _LRA_regSpec::cc, _LRA_regSpec::cmpnt, _LRA_regSpec::fe, LRA_ACTIVE, LRA_check(), LRA_FNC_CONTROL, LRA_WILD, _LRA_cmptDesc::maxTem, _LRA_regSpec::rc, _LRA_regSpec::reg, and _LRA_regSpec::tem.
Referenced by LRA_CONTROL(), and LRA_ctrl().
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.
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 |
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.
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 |
LRA_SUCCESS | The operation was successful | |
LRA_INVCMPT | Invalid component number | |
LCBD_RTOERR | Operation timed out |
References NELEM.
Referenced by LRA_lamLcb(), and LRA_LAMLCB().
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.
cmpnt | The ID of the component to be sent a look-at-me | |
tem | The TEM number to use if the component is TEM |
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 |
References LRA_doLam().
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.
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 |
LRA_SUCCESS | The operation was successful | |
LRA_INVCMPT | Invalid component number | |
ITC_SENDTID | Destination task (LRA) not started | |
LCBD_RTOERR | Operation timed out |
References LRA_doLamLcb().
unsigned LRA_latReset | ( | void | ) |
Perform a LAT reset.
The whole LAT is reset.
LRA_SUCCESS | Reset was successful | |
LCBD_RTOERR | Operation timed out |
Referenced by LRA_LATRESET().
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}}