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>
Functions | |
unsigned | LRA_read (const LRA_regSpec *rSpec, LRA_regData *data) |
Perform a register read operation. | |
unsigned | LRA_doRead (LEM_micr *crl, const LRA_regSpec *rSpec, LRA_regData *data) |
Internal routine to handle a register read request. |
$Id: LRA_read.c,v 1.12 2011/09/28 16:32:16 saxton Exp $
unsigned LRA_doRead | ( | LEM_micr * | crl, | |
const LRA_regSpec * | rSpec, | |||
LRA_regData * | data | |||
) |
Internal routine to handle a register read request.
This routine reads one or more instances of the specified register into the supplied data area.
crl | The address of a multi-item command/response list to be used in the register operations. | |
rSpec | The register specifier, specifying which register (or set of registers) is (are) to be read. This contains the component, the register block, the TEM number, cable controller number, readout controller number, front-end number, and register number. The latter five parameters may be set individually to the value LRA_WILD to cause all values to be used. | |
data | The address of an area to receive the read register values. This is a formatted block designed to be almost stand-alone. It contains the register specifier, counts of the number of values used for each of the last five parameters, the size of each register value, and the array of register values arranged with outer loop to inner loop ordered TEM, CC, RC, FE and register. |
LRA_SUCCESS | Read was successful | |
LRA_INVCMPT | Invalid component number | |
LRA_INVREG | Invalid register number | |
LRA_INVBLOCK | Invalid register block number | |
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_cmptDesc::bDesc, _LRA_regSpec::block, _LRA_regSpec::cc, _LRA_regSpec::cmpnt, _LRA_regSpec::fe, LRA_ACTIVE, LRA_check(), LRA_decodeAFE(), LRA_decodeARC(), LRA_decodeCFE(), LRA_decodeCRC(), LRA_decodeTDC(), LRA_decodeTFE(), LRA_decodeTRC(), LRA_FNC_READ, LRA_WILD, _LRA_cmptDesc::maxCc, _LRA_cmptDesc::maxFe, _LRA_cmptDesc::maxRc, _LRA_blkDesc::maxReg, _LRA_cmptDesc::maxTem, _LRA_cmptDesc::nBlock, _LRA_regData::nCc, _LRA_regData::nFe, _LRA_regData::nRc, _LRA_blkDesc::nReg, _LRA_regData::nReg, _LRA_regData::nTem, _LRA_regSpec::rc, _LRA_regSpec::reg, _LRA_blkDesc::regMask, _LRA_regData::rSpec, _LRA_blkDesc::rWidth, _LRA_regSpec::tem, _LRA_regData::tMask, _LRA_regData::value, and _LRA_regData::width.
Referenced by LRA_doSend(), and LRA_read().
unsigned LRA_read | ( | const LRA_regSpec * | rSpec, | |
LRA_regData * | data | |||
) |
Perform a register read operation.
The internal routine is called to read the specified registers into the supplied data area. This area is presumed to be big enough to hold the data, and the correct size may be determined in advance by calling the LRA_bufSize routine.
rSpec | The register specifier, specifying which register (or set of registers) is (are) to be read. This contains the component, the register block, the TEM number, cable controller number, readout controller number, front-end number, and register number. The latter five parameters may be set individually to the value LRA_WILD to cause all values to be used. | |
data | The address of an area to receive the read register values. This is a formatted block designed to be almost stand-alone. It contains the register specifier, counts of the number of values used for each of the last five parameters, the size of each register value, and the array of register values arranged with outer loop to inner loop ordered TEM, CC, RC, FE and register. |
LRA_SUCCESS | Read was successful | |
LRA_INVCMPT | Invalid component number | |
LRA_INVREG | Invalid register number | |
LRA_INVBLOCK | Invalid register block number | |
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_doRead().