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


Interface   Data Structures   File List   Data Fields   Globals  

LRA_read.c File Reference

Register reading 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"

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.


Detailed Description

Register reading routines.

Author:
Owen H Saxton
$Id: LRA_read.c,v 1.9 2009/07/31 22:07:18 saxton Exp $

Function Documentation

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.

Parameters:
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.
Return values:
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

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.

Parameters:
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.
Return values:
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


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