\hypertarget{LRA_8h}{
\section{LRA.h File Reference}
\label{LRA_8h}\index{LRA.h@{LRA.h}}
}
Public definitions for the register access routines. 

{\tt \#include \char`\"{}PBS/WCT.h\char`\"{}}\par


Include dependency graph for LRA.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=101pt]{LRA_8h__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=166pt]{LRA_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__LRA__regSpec}{\_\-LRA\_\-reg\-Spec}
\begin{CompactList}\small\item\em Structure to specify a register, or set of registers. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__blkDesc}{\_\-LRA\_\-blk\-Desc}
\begin{CompactList}\small\item\em Structure for register block descriptor. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__cmptDesc}{\_\-LRA\_\-cmpt\-Desc}
\begin{CompactList}\small\item\em Structure for component descriptor. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__regData}{\_\-LRA\_\-reg\-Data}
\begin{CompactList}\small\item\em Structure to hold returned register data. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__esrData}{\_\-LRA\_\-esr\-Data}
\begin{CompactList}\small\item\em Structure to hold returned error and status register data. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__cmdStats}{\_\-LRA\_\-cmd\-Stats}
\begin{CompactList}\small\item\em Structure to hold command statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__rcvStats}{\_\-LRA\_\-rcv\-Stats}
\begin{CompactList}\small\item\em Structure to hold receive statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__xmtStats}{\_\-LRA\_\-xmt\-Stats}
\begin{CompactList}\small\item\em Structure to hold transmit/response statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__aemTrgStats}{\_\-LRA\_\-aem\-Trg\-Stats}
\begin{CompactList}\small\item\em Structure to hold AEM trigger statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__arcErrStats}{\_\-LRA\_\-arc\-Err\-Stats}
\begin{CompactList}\small\item\em Structure to hold ARC event error statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__fifoStats}{\_\-LRA\_\-fifo\-Stats}
\begin{CompactList}\small\item\em Structure to hold CC FIFO statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__cntrStats}{\_\-LRA\_\-cntr\-Stats}
\begin{CompactList}\small\item\em Structure to hold simple counter statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__gemStats}{\_\-LRA\_\-gem\-Stats}
\begin{CompactList}\small\item\em Structure to hold GEM statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__gemStats__V2}{\_\-LRA\_\-gem\-Stats\_\-V2}
\begin{CompactList}\small\item\em Structure to hold GEM statistics, version 2. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__gemStats__V1}{\_\-LRA\_\-gem\-Stats\_\-V1}
\begin{CompactList}\small\item\em Structure to hold GEM statistics, version 1. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__cruStats}{\_\-LRA\_\-cru\-Stats}
\begin{CompactList}\small\item\em Structure to hold CRU statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__pduStats}{\_\-LRA\_\-pdu\-Stats}
\begin{CompactList}\small\item\em Structure to hold PDU statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__ebmStats}{\_\-LRA\_\-ebm\-Stats}
\begin{CompactList}\small\item\em Structure to hold EBM statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__aemStats}{\_\-LRA\_\-aem\-Stats}
\begin{CompactList}\small\item\em Structure to hold AEM statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__temStats}{\_\-LRA\_\-tem\-Stats}
\begin{CompactList}\small\item\em Structure to hold TEM statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__ticStats}{\_\-LRA\_\-tic\-Stats}
\begin{CompactList}\small\item\em Structure to hold TIC statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__cccStats}{\_\-LRA\_\-ccc\-Stats}
\begin{CompactList}\small\item\em Structure to hold CCC statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__tccStats}{\_\-LRA\_\-tcc\-Stats}
\begin{CompactList}\small\item\em Structure to hold TCC statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__stats}{\_\-LRA\_\-stats}
\begin{CompactList}\small\item\em Structure to hold complete statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__stats__V2}{\_\-LRA\_\-stats\_\-V2}
\begin{CompactList}\small\item\em Structure to hold complete statistics, version 2. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__stats__V1}{\_\-LRA\_\-stats\_\-V1}
\begin{CompactList}\small\item\em Structure to hold complete statistics, version 1. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__ebmEventStats}{\_\-LRA\_\-ebm\-Event\-Stats}
\begin{CompactList}\small\item\em Structure to hold extracted EBM event statistics. \item\end{CompactList}\item 
struct \hyperlink{struct__LRA__gemCntrStats}{\_\-LRA\_\-gem\-Cntr\-Stats}
\begin{CompactList}\small\item\em Structure to hold extracted GEM counter statistics. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{LRA_8h_a0}{
typedef enum \hyperlink{LRA_8h_a97}{\_\-LRA\_\-misc} \hyperlink{LRA_8h_a0}{LRA\_\-misc}}
\label{LRA_8h_a0}

\begin{CompactList}\small\item\em Miscellaneous definitions. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a1}{
typedef enum \hyperlink{LRA_8h_a98}{\_\-LRA\_\-component} \hyperlink{LRA_8h_a1}{LRA\_\-component}}
\label{LRA_8h_a1}

\begin{CompactList}\small\item\em Component identifiers. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a2}{
typedef enum \hyperlink{LRA_8h_a99}{\_\-LRA\_\-counts} \hyperlink{LRA_8h_a2}{LRA\_\-counts}}
\label{LRA_8h_a2}

\begin{CompactList}\small\item\em Conponent counts. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a3}{
typedef enum \hyperlink{LRA_8h_a100}{\_\-LRA\_\-stats\-Version} \hyperlink{LRA_8h_a3}{LRA\_\-stats\-Version}}
\label{LRA_8h_a3}

\begin{CompactList}\small\item\em Statistics block version. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a4}{
typedef \hyperlink{struct__LRA__regSpec}{\_\-LRA\_\-reg\-Spec} \hyperlink{LRA_8h_a4}{LRA\_\-reg\-Spec}}
\label{LRA_8h_a4}

\begin{CompactList}\small\item\em Structure to specify a register, or set of registers. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a5}{
typedef \hyperlink{struct__LRA__blkDesc}{\_\-LRA\_\-blk\-Desc} \hyperlink{LRA_8h_a5}{LRA\_\-blk\-Desc}}
\label{LRA_8h_a5}

\begin{CompactList}\small\item\em Structure for register block descriptor. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a6}{
typedef \hyperlink{struct__LRA__cmptDesc}{\_\-LRA\_\-cmpt\-Desc} \hyperlink{LRA_8h_a6}{LRA\_\-cmpt\-Desc}}
\label{LRA_8h_a6}

\begin{CompactList}\small\item\em Structure for component descriptor. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a7}{
typedef \hyperlink{struct__LRA__regData}{\_\-LRA\_\-reg\-Data} \hyperlink{LRA_8h_a7}{LRA\_\-reg\-Data}}
\label{LRA_8h_a7}

\begin{CompactList}\small\item\em Structure to hold returned register data. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a8}{
typedef \hyperlink{struct__LRA__esrData}{\_\-LRA\_\-esr\-Data} \hyperlink{LRA_8h_a8}{LRA\_\-esr\-Data}}
\label{LRA_8h_a8}

\begin{CompactList}\small\item\em Structure to hold returned error and status register data. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a9}{
typedef \hyperlink{struct__LRA__cmdStats}{\_\-LRA\_\-cmd\-Stats} \hyperlink{LRA_8h_a9}{LRA\_\-cmd\-Stats}}
\label{LRA_8h_a9}

\begin{CompactList}\small\item\em Structure to hold command statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a10}{
typedef \hyperlink{struct__LRA__rcvStats}{\_\-LRA\_\-rcv\-Stats} \hyperlink{LRA_8h_a10}{LRA\_\-rcv\-Stats}}
\label{LRA_8h_a10}

\begin{CompactList}\small\item\em Structure to hold receive statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a11}{
typedef \hyperlink{struct__LRA__xmtStats}{\_\-LRA\_\-xmt\-Stats} \hyperlink{LRA_8h_a11}{LRA\_\-xmt\-Stats}}
\label{LRA_8h_a11}

\begin{CompactList}\small\item\em Structure to hold transmit/response statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a12}{
typedef \hyperlink{struct__LRA__aemTrgStats}{\_\-LRA\_\-aem\-Trg\-Stats} \hyperlink{LRA_8h_a12}{LRA\_\-aem\-Trg\-Stats}}
\label{LRA_8h_a12}

\begin{CompactList}\small\item\em Structure to hold AEM trigger statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a13}{
typedef \hyperlink{struct__LRA__arcErrStats}{\_\-LRA\_\-arc\-Err\-Stats} \hyperlink{LRA_8h_a13}{LRA\_\-arc\-Err\-Stats}}
\label{LRA_8h_a13}

\begin{CompactList}\small\item\em Structure to hold ARC event error statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a14}{
typedef \hyperlink{struct__LRA__fifoStats}{\_\-LRA\_\-fifo\-Stats} \hyperlink{LRA_8h_a14}{LRA\_\-fifo\-Stats}}
\label{LRA_8h_a14}

\begin{CompactList}\small\item\em Structure to hold CC FIFO statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a15}{
typedef \hyperlink{struct__LRA__cntrStats}{\_\-LRA\_\-cntr\-Stats} \hyperlink{LRA_8h_a15}{LRA\_\-cntr\-Stats}}
\label{LRA_8h_a15}

\begin{CompactList}\small\item\em Structure to hold simple counter statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a16}{
typedef \hyperlink{struct__LRA__gemStats}{\_\-LRA\_\-gem\-Stats} \hyperlink{LRA_8h_a16}{LRA\_\-gem\-Stats}}
\label{LRA_8h_a16}

\begin{CompactList}\small\item\em Structure to hold GEM statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a17}{
typedef \hyperlink{struct__LRA__gemStats__V2}{\_\-LRA\_\-gem\-Stats\_\-V2} \hyperlink{LRA_8h_a17}{LRA\_\-gem\-Stats\_\-V2}}
\label{LRA_8h_a17}

\begin{CompactList}\small\item\em Structure to hold GEM statistics, version 2. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a18}{
typedef \hyperlink{struct__LRA__gemStats__V1}{\_\-LRA\_\-gem\-Stats\_\-V1} \hyperlink{LRA_8h_a18}{LRA\_\-gem\-Stats\_\-V1}}
\label{LRA_8h_a18}

\begin{CompactList}\small\item\em Structure to hold GEM statistics, version 1. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a19}{
typedef \hyperlink{struct__LRA__cruStats}{\_\-LRA\_\-cru\-Stats} \hyperlink{LRA_8h_a19}{LRA\_\-cru\-Stats}}
\label{LRA_8h_a19}

\begin{CompactList}\small\item\em Structure to hold CRU statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a20}{
typedef \hyperlink{struct__LRA__pduStats}{\_\-LRA\_\-pdu\-Stats} \hyperlink{LRA_8h_a20}{LRA\_\-pdu\-Stats}}
\label{LRA_8h_a20}

\begin{CompactList}\small\item\em Structure to hold PDU statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a21}{
typedef \hyperlink{struct__LRA__ebmStats}{\_\-LRA\_\-ebm\-Stats} \hyperlink{LRA_8h_a21}{LRA\_\-ebm\-Stats}}
\label{LRA_8h_a21}

\begin{CompactList}\small\item\em Structure to hold EBM statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a22}{
typedef \hyperlink{struct__LRA__aemStats}{\_\-LRA\_\-aem\-Stats} \hyperlink{LRA_8h_a22}{LRA\_\-aem\-Stats}}
\label{LRA_8h_a22}

\begin{CompactList}\small\item\em Structure to hold AEM statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a23}{
typedef \hyperlink{struct__LRA__temStats}{\_\-LRA\_\-tem\-Stats} \hyperlink{LRA_8h_a23}{LRA\_\-tem\-Stats}}
\label{LRA_8h_a23}

\begin{CompactList}\small\item\em Structure to hold TEM statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a24}{
typedef \hyperlink{struct__LRA__ticStats}{\_\-LRA\_\-tic\-Stats} \hyperlink{LRA_8h_a24}{LRA\_\-tic\-Stats}}
\label{LRA_8h_a24}

\begin{CompactList}\small\item\em Structure to hold TIC statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a25}{
typedef \hyperlink{struct__LRA__cccStats}{\_\-LRA\_\-ccc\-Stats} \hyperlink{LRA_8h_a25}{LRA\_\-ccc\-Stats}}
\label{LRA_8h_a25}

\begin{CompactList}\small\item\em Structure to hold CCC statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a26}{
typedef \hyperlink{struct__LRA__tccStats}{\_\-LRA\_\-tcc\-Stats} \hyperlink{LRA_8h_a26}{LRA\_\-tcc\-Stats}}
\label{LRA_8h_a26}

\begin{CompactList}\small\item\em Structure to hold TCC statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a27}{
typedef \hyperlink{struct__LRA__stats}{\_\-LRA\_\-stats} \hyperlink{LRA_8h_a27}{LRA\_\-stats}}
\label{LRA_8h_a27}

\begin{CompactList}\small\item\em Structure to hold complete statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a28}{
typedef \hyperlink{struct__LRA__stats__V2}{\_\-LRA\_\-stats\_\-V2} \hyperlink{LRA_8h_a28}{LRA\_\-stats\_\-V2}}
\label{LRA_8h_a28}

\begin{CompactList}\small\item\em Structure to hold complete statistics, version 2. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a29}{
typedef \hyperlink{struct__LRA__stats__V1}{\_\-LRA\_\-stats\_\-V1} \hyperlink{LRA_8h_a29}{LRA\_\-stats\_\-V1}}
\label{LRA_8h_a29}

\begin{CompactList}\small\item\em Structure to hold complete statistics, version 1. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a30}{
typedef \hyperlink{struct__LRA__ebmEventStats}{\_\-LRA\_\-ebm\-Event\-Stats} \hyperlink{LRA_8h_a30}{LRA\_\-ebm\-Event\-Stats}}
\label{LRA_8h_a30}

\begin{CompactList}\small\item\em Structure to hold extracted EBM event statistics. \item\end{CompactList}\item 
\hypertarget{LRA_8h_a31}{
typedef \hyperlink{struct__LRA__gemCntrStats}{\_\-LRA\_\-gem\-Cntr\-Stats} \hyperlink{LRA_8h_a31}{LRA\_\-gem\-Cntr\-Stats}}
\label{LRA_8h_a31}

\begin{CompactList}\small\item\em Structure to hold extracted GEM counter statistics. \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{LRA_8h_a97}{\_\-LRA\_\-misc} \{ \par
\hyperlink{LRA_8h_a97a32}{LRA\_\-WILD} =  255, 
\par
\hyperlink{LRA_8h_a97a33}{LRA\_\-ACTIVE} =  254
 \}
\begin{CompactList}\small\item\em Miscellaneous definitions. \item\end{CompactList}\item 
enum \hyperlink{LRA_8h_a98}{\_\-LRA\_\-component} \{ \par
{\bf LRA\_\-CPT\_\-GEM} =  1, 
\par
{\bf LRA\_\-CPT\_\-EBM} =  2, 
\par
{\bf LRA\_\-CPT\_\-PDU0} =  3, 
\par
{\bf LRA\_\-CPT\_\-PDU1} =  4, 
\par
{\bf LRA\_\-CPT\_\-CRU} =  5, 
\par
{\bf LRA\_\-CPT\_\-TEM} =  6, 
\par
{\bf LRA\_\-CPT\_\-TIC} =  7, 
\par
{\bf LRA\_\-CPT\_\-CCC} =  8, 
\par
{\bf LRA\_\-CPT\_\-CRC} =  9, 
\par
{\bf LRA\_\-CPT\_\-CFE} =  10, 
\par
{\bf LRA\_\-CPT\_\-TCC} =  11, 
\par
{\bf LRA\_\-CPT\_\-TRC} =  12, 
\par
{\bf LRA\_\-CPT\_\-TFE} =  13, 
\par
{\bf LRA\_\-CPT\_\-AEM} =  14, 
\par
{\bf LRA\_\-CPT\_\-ARC} =  15, 
\par
{\bf LRA\_\-CPT\_\-AFE} =  16, 
\par
{\bf LRA\_\-CPT\_\-SIUE} =  33, 
\par
{\bf LRA\_\-CPT\_\-SIU0} =  34, 
\par
{\bf LRA\_\-CPT\_\-SIU1} =  35, 
\par
{\bf LRA\_\-CPT\_\-EPU0} =  36, 
\par
{\bf LRA\_\-CPT\_\-EPU1} =  37, 
\par
{\bf LRA\_\-CPT\_\-EPU2} =  38, 
\par
{\bf LRA\_\-CPT\_\-BCST} =  LRA\_\-WILD
 \}
\begin{CompactList}\small\item\em Component identifiers. \item\end{CompactList}\item 
enum \hyperlink{LRA_8h_a99}{\_\-LRA\_\-counts} \{ \par
\hyperlink{LRA_8h_a99a57}{LRA\_\-N\_\-TEM} =  16, 
\par
\hyperlink{LRA_8h_a99a58}{LRA\_\-N\_\-CCC} =  4, 
\par
\hyperlink{LRA_8h_a99a59}{LRA\_\-N\_\-TCC} =  8, 
\par
\hyperlink{LRA_8h_a99a60}{LRA\_\-N\_\-CRC} =  4, 
\par
\hyperlink{LRA_8h_a99a61}{LRA\_\-N\_\-TRC} =  9, 
\par
\hyperlink{LRA_8h_a99a62}{LRA\_\-N\_\-ARC} =  12, 
\par
\hyperlink{LRA_8h_a99a63}{LRA\_\-N\_\-CFE} =  12, 
\par
\hyperlink{LRA_8h_a99a64}{LRA\_\-N\_\-TFE} =  24, 
\par
\hyperlink{LRA_8h_a99a65}{LRA\_\-N\_\-AFE} =  18
 \}
\begin{CompactList}\small\item\em Conponent counts. \item\end{CompactList}\item 
enum \hyperlink{LRA_8h_a100}{\_\-LRA\_\-stats\-Version} \{ \par
\hyperlink{LRA_8h_a100a66}{LRA\_\-STATS\_\-MAJOR} =  3, 
\par
\hyperlink{LRA_8h_a100a67}{LRA\_\-STATS\_\-MINOR} =  0
 \}
\begin{CompactList}\small\item\em Statistics block version. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned \hyperlink{LRA_8h_a68}{LRA\_\-buf\-Size} (\hyperlink{struct__LRA__regSpec}{LRA\_\-reg\-Spec} $\ast$r\-Spec, unsigned $\ast$size)
\begin{CompactList}\small\item\em Get the size needed for the returned data buffer. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a69}{LRA\_\-clear\-Stats} (void)
\begin{CompactList}\small\item\em Clear the register statistics. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a70}{LRA\_\-ctrl} (\hyperlink{struct__LRA__regSpec}{LRA\_\-reg\-Spec} $\ast$r\-Spec)
\begin{CompactList}\small\item\em Perform a control operation. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a71}{LRA\_\-find\-Cmpt} (int cmpnt, int block, \hyperlink{struct__LRA__cmptDesc}{LRA\_\-cmpt\-Desc} $\ast$$\ast$desc)
\begin{CompactList}\small\item\em Find component in list. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a72}{LRA\_\-get\-Ebm\-Event\-Stats} (\hyperlink{struct__LRA__ebmEventStats}{LRA\_\-ebm\-Event\-Stats} $\ast$stats)
\begin{CompactList}\small\item\em Get a copy of the EBM event statistics. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a73}{LRA\_\-get\-Gem\-Cntr\-Stats} (\hyperlink{struct__LRA__gemCntrStats}{LRA\_\-gem\-Cntr\-Stats} $\ast$stats)
\begin{CompactList}\small\item\em Get a copy of the GEM counters. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a74}{LRA\_\-get\-Stats} (\hyperlink{struct__LRA__stats}{LRA\_\-stats} $\ast$stats)
\begin{CompactList}\small\item\em Get a copy of the register statistics. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a75}{LRA\_\-initialize} (unsigned period)
\begin{CompactList}\small\item\em Initialize the register access system. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a76}{LRA\_\-lam} (unsigned cmpt, unsigned tem)
\begin{CompactList}\small\item\em Perform a look-at-me operation. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a77}{LRA\_\-lam\-Lcb} (unsigned cmpt, unsigned value, unsigned mask)
\begin{CompactList}\small\item\em Perform a look-at-me directed to an LCB. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a78}{LRA\_\-lat\-Reset} (void)
\begin{CompactList}\small\item\em Perform a LAT reset. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a79}{LRA\_\-load} (\hyperlink{struct__LRA__regSpec}{LRA\_\-reg\-Spec} $\ast$r\-Spec, long long $\ast$value)
\begin{CompactList}\small\item\em Perform a register load operation. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a80}{LRA\_\-lookup\-Blk} (\hyperlink{struct__LRA__cmptDesc}{LRA\_\-cmpt\-Desc} $\ast$c\-Desc, char $\ast$b\-Name, int $\ast$block)
\begin{CompactList}\small\item\em Lookup register block in list. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a81}{LRA\_\-lookup\-Cmpt} (char $\ast$c\-Name, \hyperlink{struct__LRA__cmptDesc}{LRA\_\-cmpt\-Desc} $\ast$$\ast$desc)
\begin{CompactList}\small\item\em Lookup component in list. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a82}{LRA\_\-max\-Buf\-Size} (unsigned $\ast$size)
\begin{CompactList}\small\item\em Get the maximum size needed for the register data buffer. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a83}{LRA\_\-read} (\hyperlink{struct__LRA__regSpec}{LRA\_\-reg\-Spec} $\ast$r\-Spec, \hyperlink{struct__LRA__regData}{LRA\_\-reg\-Data} $\ast$data)
\begin{CompactList}\small\item\em Perform a register read operation. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a84}{LRA\_\-read\-Esr} (\hyperlink{struct__LRA__esrData}{LRA\_\-esr\-Data} $\ast$esr)
\begin{CompactList}\small\item\em Read the error and status registers. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a85}{LRA\_\-send} (\hyperlink{struct__LRA__regSpec}{LRA\_\-reg\-Spec} $\ast$r\-Spec)
\begin{CompactList}\small\item\em Send register values to the spacecraft. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a86}{LRA\_\-send\-Esr} (void)
\begin{CompactList}\small\item\em Send the error and status register values to the spacecraft. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a87}{LRA\_\-send\-Stats} (void)
\begin{CompactList}\small\item\em Send statistics data to the spacecraft. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a88}{LRA\_\-set\-Stats\-Period} (unsigned period)
\begin{CompactList}\small\item\em Set the statistics update period. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a89}{LRA\_\-sizeof\-Ebm\-Event\-Stats} (void)
\begin{CompactList}\small\item\em Get the size of the EBM event statistics block. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a90}{LRA\_\-sizeof\-Gem\-Cntr\-Stats} (void)
\begin{CompactList}\small\item\em Get the size of the GEM counters block. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a91}{LRA\_\-sizeof\-Stats} (void)
\begin{CompactList}\small\item\em Get the size of the LRA statistics block. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a92}{LRA\_\-start} (void)
\begin{CompactList}\small\item\em Start the register access task. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a93}{LRA\_\-start\-Stats} (void)
\begin{CompactList}\small\item\em Start register statistics acquisition. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a94}{LRA\_\-stop} (void)
\begin{CompactList}\small\item\em Stop the register access task. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a95}{LRA\_\-stop\-Stats} (void)
\begin{CompactList}\small\item\em Stop register statistics acquisition. \item\end{CompactList}\item 
unsigned \hyperlink{LRA_8h_a96}{LRA\_\-terminate} (void)
\begin{CompactList}\small\item\em Terminate register access. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Public definitions for the register access routines. 

\begin{Desc}
\item[Author:]Owen H Saxton\end{Desc}
\begin{Desc}
\item[Id]\hyperlink{LRA_8h}{LRA.h},v 1.12 2007/11/22 00:39:52 saxton Exp \end{Desc}


\subsection{Enumeration Type Documentation}
\hypertarget{LRA_8h_a99}{
\index{LRA.h@{LRA.h}!_LRA_counts@{\_\-LRA\_\-counts}}
\index{_LRA_counts@{\_\-LRA\_\-counts}!LRA.h@{LRA.h}}
\subsubsection[\_\-LRA\_\-counts]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{LRA_8h_a99}{\_\-LRA\_\-counts}}}
\label{LRA_8h_a99}


Conponent counts. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{LRA_N_TEM@{LRA\_\-N\_\-TEM}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_N_TEM@{LRA\_\-N\_\-TEM}}\item[{\em 
\hypertarget{LRA_8h_a99a57}{
LRA\_\-N\_\-TEM}
\label{LRA_8h_a99a57}
}]Number of TEMs. \index{LRA_N_CCC@{LRA\_\-N\_\-CCC}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_N_CCC@{LRA\_\-N\_\-CCC}}\item[{\em 
\hypertarget{LRA_8h_a99a58}{
LRA\_\-N\_\-CCC}
\label{LRA_8h_a99a58}
}]Number of CAL cable controllers. \index{LRA_N_TCC@{LRA\_\-N\_\-TCC}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_N_TCC@{LRA\_\-N\_\-TCC}}\item[{\em 
\hypertarget{LRA_8h_a99a59}{
LRA\_\-N\_\-TCC}
\label{LRA_8h_a99a59}
}]Number of TKR cable controllers. \index{LRA_N_CRC@{LRA\_\-N\_\-CRC}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_N_CRC@{LRA\_\-N\_\-CRC}}\item[{\em 
\hypertarget{LRA_8h_a99a60}{
LRA\_\-N\_\-CRC}
\label{LRA_8h_a99a60}
}]Number of CAL readout controllers. \index{LRA_N_TRC@{LRA\_\-N\_\-TRC}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_N_TRC@{LRA\_\-N\_\-TRC}}\item[{\em 
\hypertarget{LRA_8h_a99a61}{
LRA\_\-N\_\-TRC}
\label{LRA_8h_a99a61}
}]Number of TKR readout controllers. \index{LRA_N_ARC@{LRA\_\-N\_\-ARC}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_N_ARC@{LRA\_\-N\_\-ARC}}\item[{\em 
\hypertarget{LRA_8h_a99a62}{
LRA\_\-N\_\-ARC}
\label{LRA_8h_a99a62}
}]Number of ACD readout controllers. \index{LRA_N_CFE@{LRA\_\-N\_\-CFE}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_N_CFE@{LRA\_\-N\_\-CFE}}\item[{\em 
\hypertarget{LRA_8h_a99a63}{
LRA\_\-N\_\-CFE}
\label{LRA_8h_a99a63}
}]Number of CAL front-ends. \index{LRA_N_TFE@{LRA\_\-N\_\-TFE}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_N_TFE@{LRA\_\-N\_\-TFE}}\item[{\em 
\hypertarget{LRA_8h_a99a64}{
LRA\_\-N\_\-TFE}
\label{LRA_8h_a99a64}
}]Number of TKR front-ends. \index{LRA_N_AFE@{LRA\_\-N\_\-AFE}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_N_AFE@{LRA\_\-N\_\-AFE}}\item[{\em 
\hypertarget{LRA_8h_a99a65}{
LRA\_\-N\_\-AFE}
\label{LRA_8h_a99a65}
}]Number of ACD front-ends. \end{description}
\end{Desc}

\hypertarget{LRA_8h_a97}{
\index{LRA.h@{LRA.h}!_LRA_misc@{\_\-LRA\_\-misc}}
\index{_LRA_misc@{\_\-LRA\_\-misc}!LRA.h@{LRA.h}}
\subsubsection[\_\-LRA\_\-misc]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{LRA_8h_a97}{\_\-LRA\_\-misc}}}
\label{LRA_8h_a97}


Miscellaneous definitions. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{LRA_WILD@{LRA\_\-WILD}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_WILD@{LRA\_\-WILD}}\item[{\em 
\hypertarget{LRA_8h_a97a32}{
LRA\_\-WILD}
\label{LRA_8h_a97a32}
}]General purpose wild-card value. \index{LRA_ACTIVE@{LRA\_\-ACTIVE}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_ACTIVE@{LRA\_\-ACTIVE}}\item[{\em 
\hypertarget{LRA_8h_a97a33}{
LRA\_\-ACTIVE}
\label{LRA_8h_a97a33}
}]TEM or ARC specifier, active only. \end{description}
\end{Desc}

\hypertarget{LRA_8h_a100}{
\index{LRA.h@{LRA.h}!_LRA_statsVersion@{\_\-LRA\_\-statsVersion}}
\index{_LRA_statsVersion@{\_\-LRA\_\-statsVersion}!LRA.h@{LRA.h}}
\subsubsection[\_\-LRA\_\-statsVersion]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{LRA_8h_a100}{\_\-LRA\_\-stats\-Version}}}
\label{LRA_8h_a100}


Statistics block version. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{LRA_STATS_MAJOR@{LRA\_\-STATS\_\-MAJOR}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_STATS_MAJOR@{LRA\_\-STATS\_\-MAJOR}}\item[{\em 
\hypertarget{LRA_8h_a100a66}{
LRA\_\-STATS\_\-MAJOR}
\label{LRA_8h_a100a66}
}]Major version number. \index{LRA_STATS_MINOR@{LRA\_\-STATS\_\-MINOR}!LRA.h@{LRA.h}}\index{LRA.h@{LRA.h}!LRA_STATS_MINOR@{LRA\_\-STATS\_\-MINOR}}\item[{\em 
\hypertarget{LRA_8h_a100a67}{
LRA\_\-STATS\_\-MINOR}
\label{LRA_8h_a100a67}
}]Minor version number. \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{LRA_8h_a68}{
\index{LRA.h@{LRA.h}!LRA_bufSize@{LRA\_\-bufSize}}
\index{LRA_bufSize@{LRA\_\-bufSize}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-bufSize]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-buf\-Size (\hyperlink{struct__LRA__regSpec}{LRA\_\-reg\-Spec} $\ast$ {\em r\-Spec}, unsigned $\ast$ {\em size})}}
\label{LRA_8h_a68}


Get the size needed for the returned data buffer. 

This routine returns the size needed for the buffer used to hold the read register data.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em r\-Spec}]The specifier for the register(s) to be read\item[{\em size}]The address of the returned size, in bytes\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Register specifier is valid \item[{\em LRA\_\-INVCMPT}]Invalid component number \item[{\em LRA\_\-INVREG}]Invalid register number \item[{\em LRA\_\-INVBLOCK}]Invalid register block number \item[{\em LRA\_\-INVTEM}]Invalid TEM number \item[{\em LRA\_\-INVCC}]Invalid cable controller number \item[{\em LRA\_\-INVRC}]Invalid readout controller number \item[{\em LRA\_\-INVFE}]Invalid front-end number\end{description}
\end{Desc}
\hypertarget{LRA_8h_a69}{
\index{LRA.h@{LRA.h}!LRA_clearStats@{LRA\_\-clearStats}}
\index{LRA_clearStats@{LRA\_\-clearStats}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-clearStats]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-clear\-Stats (void)}}
\label{LRA_8h_a69}


Clear the register statistics. 

The register statistics are cleared, with controlled access.

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Success \item[{\em LRA\_\-NOTINIT}]LRA not initialized\end{description}
\end{Desc}
\hypertarget{LRA_8h_a70}{
\index{LRA.h@{LRA.h}!LRA_ctrl@{LRA\_\-ctrl}}
\index{LRA_ctrl@{LRA\_\-ctrl}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-ctrl]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-ctrl (\hyperlink{struct__LRA__regSpec}{LRA\_\-reg\-Spec} $\ast$ {\em r\-Spec})}}
\label{LRA_8h_a70}


Perform a control operation. 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em r\-Spec}]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.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]The operation was successful \item[{\em LRA\_\-INVCMPT}]Invalid component number \item[{\em LRA\_\-INVCNTRL}]Invalid control operation \item[{\em LRA\_\-INVTEM}]Invalid TEM number \item[{\em LRA\_\-INVCC}]Invalid cable controller number \item[{\em LRA\_\-INVRC}]Invalid readout controller number \item[{\em LRA\_\-INVFE}]Invalid front-end number \item[{\em ITC\_\-SENDTID}]Destination task (LRA) not started \item[{\em LCBD\_\-RTOERR}]Operation timed out\end{description}
\end{Desc}
\hypertarget{LRA_8h_a71}{
\index{LRA.h@{LRA.h}!LRA_findCmpt@{LRA\_\-findCmpt}}
\index{LRA_findCmpt@{LRA\_\-findCmpt}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-findCmpt]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-find\-Cmpt (int {\em cmpnt}, int {\em block}, \hyperlink{struct__LRA__cmptDesc}{LRA\_\-cmpt\-Desc} $\ast$$\ast$ {\em desc})}}
\label{LRA_8h_a71}


Find component in list. 

The component number is used to locate and return the matching component descriptor, and the block number is checked for validity.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmpnt}]The component number\item[{\em block}]The block number\item[{\em desc}]The address of a pointer to receive the address of the component descriptor.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Parameters are valid \item[{\em LRA\_\-INVCMPT}]Invalid component number \item[{\em LRA\_\-INVBLOCK}]Invalid register block number\end{description}
\end{Desc}
\hypertarget{LRA_8h_a72}{
\index{LRA.h@{LRA.h}!LRA_getEbmEventStats@{LRA\_\-getEbmEventStats}}
\index{LRA_getEbmEventStats@{LRA\_\-getEbmEventStats}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-getEbmEventStats]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-get\-Ebm\-Event\-Stats (\hyperlink{struct__LRA__ebmEventStats}{LRA\_\-ebm\-Event\-Stats} $\ast$ {\em stats})}}
\label{LRA_8h_a72}


Get a copy of the EBM event statistics. 

The EBM event statistics are copied, with controlled access. Only the operation counts are copied.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em stats}]The address of the area to which the statistics are to be copied\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Success \item[{\em LRA\_\-NOTINIT}]LRA not initialized\end{description}
\end{Desc}
\hypertarget{LRA_8h_a73}{
\index{LRA.h@{LRA.h}!LRA_getGemCntrStats@{LRA\_\-getGemCntrStats}}
\index{LRA_getGemCntrStats@{LRA\_\-getGemCntrStats}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-getGemCntrStats]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-get\-Gem\-Cntr\-Stats (\hyperlink{struct__LRA__gemCntrStats}{LRA\_\-gem\-Cntr\-Stats} $\ast$ {\em stats})}}
\label{LRA_8h_a73}


Get a copy of the GEM counters. 

The GEM extended counters are copied, with controlled access. Only the counter values are copied.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em stats}]The address of the area to which the counters are to be copied\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Success \item[{\em LRA\_\-NOTINIT}]LRA not initialized\end{description}
\end{Desc}
\hypertarget{LRA_8h_a74}{
\index{LRA.h@{LRA.h}!LRA_getStats@{LRA\_\-getStats}}
\index{LRA_getStats@{LRA\_\-getStats}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-getStats]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-get\-Stats (\hyperlink{struct__LRA__stats}{LRA\_\-stats} $\ast$ {\em stats})}}
\label{LRA_8h_a74}


Get a copy of the register statistics. 

The register statistics are copied, with controlled access.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em stats}]The address of the area to which the statistics are to be copied\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Success \item[{\em LRA\_\-NOTINIT}]LRA not initialized\end{description}
\end{Desc}
\hypertarget{LRA_8h_a75}{
\index{LRA.h@{LRA.h}!LRA_initialize@{LRA\_\-initialize}}
\index{LRA_initialize@{LRA\_\-initialize}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-initialize]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-initialize (unsigned {\em period})}}
\label{LRA_8h_a75}


Initialize the register access system. 

This routine sets up the apparatus needed by the register access system.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em period}]The time, in 1/100 seconds, to be used between successive updates of the register statistics. If zero, the default value is used.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Initialization was successful \item[{\em LRA\_\-ALRDINIT}]Already initialized \item[{\em LRA\_\-INSFMEM}]Insufficient memory for initialization \item[{\em LRA\_\-FPAFAIL}]FPA initialization failed \item[{\em LRA\_\-NOSEMS}]Unable to create semaphores \item[{\em LRA\_\-NOMUTEX}]Unable to create a mutex \item[{\em LRA\_\-NOTIMER}]Unable to create a timer \item[{\em RBM\_\-ALOCFAIL}]Memory allocation failure \item[{\em RBM\_\-FPAINIT}]FPA initialization failure \item[{\em RBM\_\-NOTINIT}]RBM system not initialized \item[{\em ITC\_\-ALOCFAIL}]Cannot allocate memory \item[{\em ITC\_\-NOTINIT}]ITC control block does not exist \item[{\em ITC\_\-TASKQUEU}]Cannot create task queues \item[{\em ITC\_\-CTLSTAT}]ITC control block not in state initialized \item[{\em ITC\_\-QUEUINIT}]Queue initialization failed \item[{\em ITC\_\-VARRNG}]Out of range variable detected \item[{\em ITC\_\-APIDDBL}]Table entry for this APID already in use\end{description}
\end{Desc}
\hypertarget{LRA_8h_a76}{
\index{LRA.h@{LRA.h}!LRA_lam@{LRA\_\-lam}}
\index{LRA_lam@{LRA\_\-lam}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-lam]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-lam (unsigned {\em cmpnt}, unsigned {\em tem})}}
\label{LRA_8h_a76}


Perform a look-at-me operation. 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmpnt}]The ID of the component to be sent a look-at-me\item[{\em tem}]The TEM number to use if the component is TEM\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]The operation was successful \item[{\em LRA\_\-INVCMPT}]Invalid component number \item[{\em LRA\_\-INVTEM}]Invalid TEM number \item[{\em ITC\_\-SENDTID}]Destination task (LRA) not started \item[{\em LCBD\_\-RTOERR}]Operation timed out\end{description}
\end{Desc}
\hypertarget{LRA_8h_a77}{
\index{LRA.h@{LRA.h}!LRA_lamLcb@{LRA\_\-lamLcb}}
\index{LRA_lamLcb@{LRA\_\-lamLcb}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-lamLcb]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-lam\-Lcb (unsigned {\em cmpnt}, unsigned {\em value}, unsigned {\em mask})}}
\label{LRA_8h_a77}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmpnt}]The ID of the LCB component to be sent a look-at-me\item[{\em value}]The value to be sent\item[{\em mask}]The mask specifying which bits of value to use\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]The operation was successful \item[{\em LRA\_\-INVCMPT}]Invalid component number \item[{\em ITC\_\-SENDTID}]Destination task (LRA) not started \item[{\em LCBD\_\-RTOERR}]Operation timed out\end{description}
\end{Desc}
\hypertarget{LRA_8h_a78}{
\index{LRA.h@{LRA.h}!LRA_latReset@{LRA\_\-latReset}}
\index{LRA_latReset@{LRA\_\-latReset}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-latReset]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-lat\-Reset (void)}}
\label{LRA_8h_a78}


Perform a LAT reset. 

The whole LAT is reset.

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Reset was successful \item[{\em LCBD\_\-RTOERR}]Operation timed out\end{description}
\end{Desc}
\hypertarget{LRA_8h_a79}{
\index{LRA.h@{LRA.h}!LRA_load@{LRA\_\-load}}
\index{LRA_load@{LRA\_\-load}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-load]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-load (\hyperlink{struct__LRA__regSpec}{LRA\_\-reg\-Spec} $\ast$ {\em r\-Spec}, long long $\ast$ {\em value})}}
\label{LRA_8h_a79}


Perform a register load operation. 

The internal routine is called to load the specified value into one or more instances of the specified register.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em r\-Spec}]The register specifier, specifying which register (or set of registers) is (are) to be loaded. This contains the device, the register block, the TEM number, cable controller number, readout controller number, front-end number, and register number. The four parameters tem, cc, rc and fe may be set individually to the value LRA\_\-WILD to cause the value to be loaded in all places.\item[{\em value}]The address of the value to be loaded into the specified instances of the register.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Load was successful \item[{\em LRA\_\-INVCMPT}]Invalid component number \item[{\em LRA\_\-INVREG}]Invalid register number \item[{\em LRA\_\-INVBLOCK}]Invalid register block number \item[{\em LRA\_\-INVTEM}]Invalid TEM number \item[{\em LRA\_\-INVCC}]Invalid cable controller number \item[{\em LRA\_\-INVRC}]Invalid readout controller number \item[{\em LRA\_\-INVFE}]Invalid front-end number \item[{\em ITC\_\-SENDTID}]Destination task (LRA) not started \item[{\em LCBD\_\-RTOERR}]Operation timed out\end{description}
\end{Desc}
\hypertarget{LRA_8h_a80}{
\index{LRA.h@{LRA.h}!LRA_lookupBlk@{LRA\_\-lookupBlk}}
\index{LRA_lookupBlk@{LRA\_\-lookupBlk}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-lookupBlk]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-lookup\-Blk (\hyperlink{struct__LRA__cmptDesc}{LRA\_\-cmpt\-Desc} $\ast$ {\em c\-Desc}, char $\ast$ {\em b\-Name}, int $\ast$ {\em block})}}
\label{LRA_8h_a80}


Lookup register block in list. 

The register block name is used to locate and return the matching block number in the list of valid blocks for the given component.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em c\-Desc}]The component descriptor.\item[{\em b\-Name}]The register block name.\item[{\em block}]The address of an integer to receive the register block number.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Success \item[{\em LRA\_\-INVBLOCK}]Invalid register block name\end{description}
\end{Desc}
\hypertarget{LRA_8h_a81}{
\index{LRA.h@{LRA.h}!LRA_lookupCmpt@{LRA\_\-lookupCmpt}}
\index{LRA_lookupCmpt@{LRA\_\-lookupCmpt}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-lookupCmpt]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-lookup\-Cmpt (char $\ast$ {\em c\-Name}, \hyperlink{struct__LRA__cmptDesc}{LRA\_\-cmpt\-Desc} $\ast$$\ast$ {\em desc})}}
\label{LRA_8h_a81}


Lookup component in list. 

The component name is used to locate and return the matching component descriptor from the list of valid components.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em c\-Name}]The component name.\item[{\em desc}]The address of a pointer to receive the address of the component descriptor.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Success \item[{\em LRA\_\-INVCMPT}]Invalid component name\end{description}
\end{Desc}
\hypertarget{LRA_8h_a82}{
\index{LRA.h@{LRA.h}!LRA_maxBufSize@{LRA\_\-maxBufSize}}
\index{LRA_maxBufSize@{LRA\_\-maxBufSize}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-maxBufSize]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-max\-Buf\-Size (unsigned $\ast$ {\em size})}}
\label{LRA_8h_a82}


Get the maximum size needed for the register data buffer. 

This routine returns the maximum size needed for the buffer used to hold the read register data. It assumes the maximum possible wild carding of the register description.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em size}]The address of the returned maximum size, in bytes\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Always success\end{description}
\end{Desc}
\hypertarget{LRA_8h_a83}{
\index{LRA.h@{LRA.h}!LRA_read@{LRA\_\-read}}
\index{LRA_read@{LRA\_\-read}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-read]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-read (\hyperlink{struct__LRA__regSpec}{LRA\_\-reg\-Spec} $\ast$ {\em r\-Spec}, \hyperlink{struct__LRA__regData}{LRA\_\-reg\-Data} $\ast$ {\em data})}}
\label{LRA_8h_a83}


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\_\-buf\-Size routine.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em r\-Spec}]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.\item[{\em 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.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Read was successful \item[{\em LRA\_\-INVCMPT}]Invalid component number \item[{\em LRA\_\-INVREG}]Invalid register number \item[{\em LRA\_\-INVBLOCK}]Invalid register block number \item[{\em LRA\_\-INVTEM}]Invalid TEM number \item[{\em LRA\_\-INVCC}]Invalid cable controller number \item[{\em LRA\_\-INVRC}]Invalid readout controller number \item[{\em LRA\_\-INVFE}]Invalid front-end number \item[{\em ITC\_\-SENDTID}]Destination task (LRA) not started \item[{\em LCBD\_\-RTOERR}]Operation timed out\end{description}
\end{Desc}
\hypertarget{LRA_8h_a84}{
\index{LRA.h@{LRA.h}!LRA_readEsr@{LRA\_\-readEsr}}
\index{LRA_readEsr@{LRA\_\-readEsr}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-readEsr]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-read\-Esr (\hyperlink{struct__LRA__esrData}{LRA\_\-esr\-Data} $\ast$ {\em esr})}}
\label{LRA_8h_a84}


Read the error and status registers. 

The internal routine is called to read and store the contents of a pre-determined set of LAT error and status registers. No error is reported if a read operation times out.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em esr}]The address of an area to receive the register values\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]The registers were read successfully \item[{\em ITC\_\-SENDTID}]Destination task (LRA) not started\end{description}
\end{Desc}
\hypertarget{LRA_8h_a85}{
\index{LRA.h@{LRA.h}!LRA_send@{LRA\_\-send}}
\index{LRA_send@{LRA\_\-send}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-send]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-send (\hyperlink{struct__LRA__regSpec}{LRA\_\-reg\-Spec} $\ast$ {\em r\-Spec})}}
\label{LRA_8h_a85}


Send register values to the spacecraft. 

A request is queued to the LRA task to read the specified registers and send them to the spacecraft via the SSR.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em r\-Spec}]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.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]The read and send were successful \item[{\em LRA\_\-INVCMPT}]Invalid component number \item[{\em LRA\_\-INVREG}]Invalid register number \item[{\em LRA\_\-INVBLOCK}]Invalid register block number \item[{\em LRA\_\-INVTEM}]Invalid TEM number \item[{\em LRA\_\-INVCC}]Invalid cable controller number \item[{\em LRA\_\-INVRC}]Invalid readout controller number \item[{\em LRA\_\-INVFE}]Invalid front-end number \item[{\em LCBD\_\-RTOERR}]Operation timed out \item[{\em ITC\_\-SENDNID}]Destination node not reachable \item[{\em ITC\_\-SENDPRX}]Proxy task for destination node not started \item[{\em ITC\_\-SENDQID}]Destination queue not available \item[{\em ITC\_\-SENDTID}]Destination task (LRA) not started\end{description}
\end{Desc}
\hypertarget{LRA_8h_a86}{
\index{LRA.h@{LRA.h}!LRA_sendEsr@{LRA\_\-sendEsr}}
\index{LRA_sendEsr@{LRA\_\-sendEsr}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-sendEsr]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-send\-Esr (void)}}
\label{LRA_8h_a86}


Send the error and status register values to the spacecraft. 

A request is queued to the LRA task to read the contents of a pre- determined set of LAT error and status registers and send them to the spacecraft via the SSR.

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]The read and send were successful \item[{\em ITC\_\-SENDNID}]Destination node not reachable \item[{\em ITC\_\-SENDPRX}]Proxy task for destination node not started \item[{\em ITC\_\-SENDQID}]Destination queue not available \item[{\em ITC\_\-SENDTID}]Destination task (LRA) not started\end{description}
\end{Desc}
\hypertarget{LRA_8h_a87}{
\index{LRA.h@{LRA.h}!LRA_sendStats@{LRA\_\-sendStats}}
\index{LRA_sendStats@{LRA\_\-sendStats}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-sendStats]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-send\-Stats (void)}}
\label{LRA_8h_a87}


Send statistics data to the spacecraft. 

A request is queued to the LRA task to send the statistics data block to the spacecraft via the SSR.

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]The statistics were sent successfully \item[{\em LRA\_\-NOTINIT}]LRA not initialized \item[{\em ITC\_\-SENDNID}]Destination node not reachable \item[{\em ITC\_\-SENDPRX}]Proxy task for destination node not started \item[{\em ITC\_\-SENDQID}]Destination queue not available \item[{\em ITC\_\-SENDTID}]Destination task not started\end{description}
\end{Desc}
\hypertarget{LRA_8h_a88}{
\index{LRA.h@{LRA.h}!LRA_setStatsPeriod@{LRA\_\-setStatsPeriod}}
\index{LRA_setStatsPeriod@{LRA\_\-setStatsPeriod}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-setStatsPeriod]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-set\-Stats\-Period (unsigned {\em period})}}
\label{LRA_8h_a88}


Set the statistics update period. 

This routine sets the statistics update period to a new value.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em period}]The time, in 1/100 seconds, to be used between successive updates of the register statistics. If zero, the default value is used.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Success \item[{\em LRA\_\-NOTINIT}]LRA not initialized\end{description}
\end{Desc}
\hypertarget{LRA_8h_a89}{
\index{LRA.h@{LRA.h}!LRA_sizeofEbmEventStats@{LRA\_\-sizeofEbmEventStats}}
\index{LRA_sizeofEbmEventStats@{LRA\_\-sizeofEbmEventStats}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-sizeofEbmEventStats]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-sizeof\-Ebm\-Event\-Stats (void)}}
\label{LRA_8h_a89}


Get the size of the EBM event statistics block. 

The size of the EBM event statistics block is returned.

\begin{Desc}
\item[Returns:]The size of the EBM event statistics block.\end{Desc}
\hypertarget{LRA_8h_a90}{
\index{LRA.h@{LRA.h}!LRA_sizeofGemCntrStats@{LRA\_\-sizeofGemCntrStats}}
\index{LRA_sizeofGemCntrStats@{LRA\_\-sizeofGemCntrStats}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-sizeofGemCntrStats]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-sizeof\-Gem\-Cntr\-Stats (void)}}
\label{LRA_8h_a90}


Get the size of the GEM counters block. 

The size of the GEM extended counters block is returned.

\begin{Desc}
\item[Returns:]The size of the GEM counters block.\end{Desc}
\hypertarget{LRA_8h_a91}{
\index{LRA.h@{LRA.h}!LRA_sizeofStats@{LRA\_\-sizeofStats}}
\index{LRA_sizeofStats@{LRA\_\-sizeofStats}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-sizeofStats]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-sizeof\-Stats (void)}}
\label{LRA_8h_a91}


Get the size of the LRA statistics block. 

The size of the whole LRA statistics block is returned.

\begin{Desc}
\item[Returns:]The size of the LRA statistics block.\end{Desc}
\hypertarget{LRA_8h_a92}{
\index{LRA.h@{LRA.h}!LRA_start@{LRA\_\-start}}
\index{LRA_start@{LRA\_\-start}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-start]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-start (void)}}
\label{LRA_8h_a92}


Start the register access task. 

This routine starts the register access task after checking that initialization has been successful.

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]The task was started successfully \item[{\em LRA\_\-NOTINIT}]LRA not initialized \item[{\em ITC\_\-ALOCFAIL}]Cannot allocate for fork control block \item[{\em ITC\_\-CTLSTAT}]ITC control block not in state initialized \item[{\em ITC\_\-FORKINIT}]Fork initialization failed \item[{\em ITC\_\-FORKQHND}]Cannot recover all fork queue handles (obscure) \item[{\em ITC\_\-NOTINIT}]ITC control block does not exist\end{description}
\end{Desc}
\hypertarget{LRA_8h_a93}{
\index{LRA.h@{LRA.h}!LRA_startStats@{LRA\_\-startStats}}
\index{LRA_startStats@{LRA\_\-startStats}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-startStats]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-start\-Stats (void)}}
\label{LRA_8h_a93}


Start register statistics acquisition. 

The periodic updating of the register statistics block is started after the registers and statistics are cleared.

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Success \item[{\em LRA\_\-NOTINIT}]LRA not initialized\end{description}
\end{Desc}
\hypertarget{LRA_8h_a94}{
\index{LRA.h@{LRA.h}!LRA_stop@{LRA\_\-stop}}
\index{LRA_stop@{LRA\_\-stop}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-stop]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-stop (void)}}
\label{LRA_8h_a94}


Stop the register access task. 

This routine stops the register access task.

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]The task was stopped successfully \item[{\em LRA\_\-NOTINIT}]LRA not initialized \item[{\em ITC\_\-CTLSTAT}]ITC control block not in state initialized \item[{\em ITC\_\-NOTINIT}]ITC control block does not exist \item[{\em ITC\_\-TASKHNDL}]Task handle is invalid \item[{\em ITC\_\-TASKSTAT}]Invalid task state for this operation\end{description}
\end{Desc}
\hypertarget{LRA_8h_a95}{
\index{LRA.h@{LRA.h}!LRA_stopStats@{LRA\_\-stopStats}}
\index{LRA_stopStats@{LRA\_\-stopStats}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-stopStats]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-stop\-Stats (void)}}
\label{LRA_8h_a95}


Stop register statistics acquisition. 

The periodic updating of the register statistics block is stopped.

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Success \item[{\em LRA\_\-NOTINIT}]LRA not initialized\end{description}
\end{Desc}
\hypertarget{LRA_8h_a96}{
\index{LRA.h@{LRA.h}!LRA_terminate@{LRA\_\-terminate}}
\index{LRA_terminate@{LRA\_\-terminate}!LRA.h@{LRA.h}}
\subsubsection[LRA\_\-terminate]{\setlength{\rightskip}{0pt plus 5cm}unsigned LRA\_\-terminate (void)}}
\label{LRA_8h_a96}


Terminate register access. 

This routine frees all resources used by the register access system.

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LRA\_\-SUCCESS}]Termination was successful \item[{\em LRA\_\-NOTINIT}]LRA not initialized\end{description}
\end{Desc}
