\hypertarget{LCBT_8h}{
\section{LCBT.h File Reference}
\label{LCBT_8h}\index{LCBT.h@{LCBT.h}}
}
Regression test for LCB LAT COmmunication boards.  


{\tt \#include \char`\"{}LCBT/LCBT\_\-init\-Board.h\char`\"{}}\par
{\tt \#include \char`\"{}src/RND.h\char`\"{}}\par
{\tt \#include \char`\"{}src/TDATA.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/WCT.h\char`\"{}}\par


Include dependency graph for LCBT.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=192pt]{LCBT_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=373pt]{LCBT_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{LCBT_8h_a0}{
\#define \hyperlink{LCBT_8h_a0}{x\-LCBx}\ LCB}
\label{LCBT_8h_a0}

\begin{CompactList}\small\item\em defines used to point to LCB on old driver and LCBD on new driver \item\end{CompactList}\item 
\hypertarget{LCBT_8h_a1}{
\#define \hyperlink{LCBT_8h_a1}{LCBT\_\-STALL}\ (0)}
\label{LCBT_8h_a1}

\begin{CompactList}\small\item\em standard stall value for register access, possible use in testing \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{LCBT_8h_a2}{
typedef enum \hyperlink{LCBT_8h_a70}{\_\-LCBT\_\-OPTION} \hyperlink{LCBT_8h_a2}{LCBT\_\-OPTION}}
\label{LCBT_8h_a2}

\begin{CompactList}\small\item\em Masks for test option mask. \item\end{CompactList}\item 
\hypertarget{LCBT_8h_a3}{
typedef enum \hyperlink{LCBT_8h_a71}{\_\-LCBT\_\-AVAIL} \hyperlink{LCBT_8h_a3}{LCBT\_\-AVAIL}}
\label{LCBT_8h_a3}

\begin{CompactList}\small\item\em defines used with s\-Hw\-Avail to determine what HW is connected for \hyperlink{LCBT__cmdExternal_8c_a6}{LCBT\_\-cmd\-External\-Test()} \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{LCBT_8h_a70}{\_\-LCBT\_\-OPTION} \{ \par
\hyperlink{LCBT_8h_a70a4}{LCBT\_\-OPTION\_\-BUSYPRINT} =  1, 
\par
\hyperlink{LCBT_8h_a70a5}{LCBT\_\-OPTION\_\-VERBOSE} =  2, 
\par
\hyperlink{LCBT_8h_a70a6}{LCBT\_\-OPTION\_\-FOREVER} =  4, 
\par
\hyperlink{LCBT_8h_a70a7}{LCBT\_\-OPTION\_\-INCTESTPARM} =  0x10, 
\par
\hyperlink{LCBT_8h_a70a8}{LCBT\_\-OPTION\_\-COMPARE\_\-FOR\_\-ECHO} =  0x20, 
\par
\hyperlink{LCBT_8h_a70a9}{LCBT\_\-OPTION\_\-RLCL\_\-ADDR} =  0x40
 \}
\item 
enum \hyperlink{LCBT_8h_a71}{\_\-LCBT\_\-AVAIL} \{ \par
{\bf LCBT\_\-TEM\_\-AVAIL} =  1, 
\par
\hyperlink{LCBT_8h_a71a11}{LCBT\_\-GASU\_\-AVAIL} =  2, 
\par
\hyperlink{LCBT_8h_a71a12}{LCBT\_\-MASK\_\-VALID} =  0x8000
 \}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{LCBT_8h_a13}{LCBT\_\-init} (int latp\-Addr, int use\-Redundant\-Path, x\-LCBx lcb)
\begin{CompactList}\small\item\em inits LCB driver and start 2 tasks associated with driver \item\end{CompactList}\item 
void \hyperlink{LCBT_8h_a14}{LCBT\_\-set\-Siu} (int idx)
\begin{CompactList}\small\item\em Set board\-ID in Csr to SIU addr. \item\end{CompactList}\item 
void \hyperlink{LCBT_8h_a15}{LCBT\_\-set\-Epu} (int idx)
\begin{CompactList}\small\item\em Set board\-ID in Csr to EPU addr. \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a16}{LCBT\_\-event\-Init} (int fork\-Pri)
\begin{CompactList}\small\item\em Setup to echo event data back to sender. \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a17}{LCBT\_\-test\-All} (int num, int n\-Loops, int latp\-Addr, int loopback\-Cable)
\begin{CompactList}\small\item\em overall test, does complete regression test of LCB \item\end{CompactList}\item 
void \hyperlink{LCBT_8h_a18}{LCBT\_\-set\-Option} (unsigned int option\-Mask)
\begin{CompactList}\small\item\em set test option mask, see \hyperlink{LCBT_8h}{LCBT.h} for values \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a19}{LCBT\_\-local\-Reg\-Test} (int num, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} test\-Type, unsigned int test\-Parm)
\begin{CompactList}\small\item\em Read/write/compare test on all PCI accessable registers on LCB board. \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a20}{LCBT\_\-cmd\-Local\-Test} (int num, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} test\-Type, unsigned int test\-Parm)
\begin{CompactList}\small\item\em read test on LCB local registers that require Cmd list DMA \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a21}{LCBT\_\-cmd\-Local\-Test2} (int num, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} test\-Type, unsigned int test\-Parm)
\begin{CompactList}\small\item\em 2 task read test on LCB local registers that require Cmd list DMA \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a22}{LCBT\_\-cmd\-Local\-Test3} (int num, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} test\-Type, unsigned int test\-Parm)
\begin{CompactList}\small\item\em 3 task read test on LCB local registers that require Cmd list DMA \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a23}{LCBT\_\-cmd\-External\-Test} (int num, int single\-Access, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} test\-Type, unsigned int test\-Parm)
\begin{CompactList}\small\item\em read test on LCB local registers that require Cmd list DMA \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a24}{LCBT\_\-event\-Test} (int num, int max\-Len, int latp\-Addr, int random\-Len, int ccsds, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} test\-Type, unsigned int test\-Parm)
\begin{CompactList}\small\item\em Test to send/recv/compare event data thru loopback on LCB board. \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a25}{LCBT\_\-event\-Test2} (int num, int max\-Len, int latp\-Addr, int random\-Len, int ccsds, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} test\-Type, unsigned int test\-Parm)
\begin{CompactList}\small\item\em 2 concurrent task test to send/recv/compare event data thru loopback on LCB board \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a26}{LCBT\_\-event\-Test3} (int num, int max\-Len, int latp\-Addr, int random\-Len, int ccsds, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} test\-Type, unsigned int test\-Parm)
\begin{CompactList}\small\item\em 3 concurrent task test to send/recv/compare event data thru loopback on LCB board \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a27}{LCBT\_\-event\-Test5} (int num, int max\-Len, int latp\-Addr, int random\-Len, int ccsds, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} test\-Type, unsigned int test\-Parm)
\begin{CompactList}\small\item\em 5 concurrent task test to send/recv/compare event data thru loopback on LCB board \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a28}{LCBT\_\-combo\-Test} (int num, int max\-Len, int latp\-Addr, int random\-Len, int ccsds, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} test\-Type, unsigned int test\-Parm)
\begin{CompactList}\small\item\em 2 concurrent tasks running event and local\-Cmd\-Reg test \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a29}{LCBT\_\-event\-Watermark\-Test} (int num, int latp\-Addr)
\begin{CompactList}\small\item\em Check for proper operation of watermarks on Event and Event\-Data queues. \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a30}{LCBT\_\-fill\-Queue\-Test} (int num\-Loop, int disable\-Result\-Int)
\begin{CompactList}\small\item\em Fill request\-Q with requests to make sure it handles it properly. \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a31}{LCBT\_\-event\-Fill\-Test} (int num, int latp\-Addr, int buff\-Size32, int print\-Info)
\begin{CompactList}\small\item\em Check for proper operation circular buff\-FUll interrupt. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a32}{LCBT\_\-determine\-Hw} ()
\begin{CompactList}\small\item\em get mask determined by \hyperlink{LCBT__cmdExternal_8c_a3}{LCBT\_\-determine\-Hw()} for use in LCBT\_\-determine\-Hw () determine which HW is connected to the LCB \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a33}{LCBT\_\-hw\-Avail} ()
\begin{CompactList}\small\item\em get mask determined by \hyperlink{LCBT__cmdExternal_8c_a3}{LCBT\_\-determine\-Hw()} for use in \hyperlink{LCBT__cmdExternal_8c_a6}{LCBT\_\-cmd\-External\-Test()} \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a34}{LCBT\_\-init\-Gasu} ()
\begin{CompactList}\small\item\em setup registers in GASU determine which HW is connected to the LCB \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a35}{LCBT\_\-set\-Cfg} (int have\-Gasu, int have\-Tem)
\begin{CompactList}\small\item\em get mask determined by \hyperlink{LCBT__cmdExternal_8c_a3}{LCBT\_\-determine\-Hw()} for use in \hyperlink{LCBT__cmdExternal_8c_a6}{LCBT\_\-cmd\-External\-Test()} \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a36}{LCBT\_\-lam} (int latp\-Addr)
\begin{CompactList}\small\item\em send LAM (look\-At\-Me) Send out LAM to specified addr \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a37}{LCBT\_\-clear\-Error\-Totals} ()
\begin{CompactList}\small\item\em clear the global error counts \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a38}{LCBT\_\-print\-Error\-Totals} (char $\ast$title)
\begin{CompactList}\small\item\em print the global error counts \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a39}{LCBT\_\-update\-Error\-Totals} (int access, int r\-Err, int w\-Err, int c\-Err)
\begin{CompactList}\small\item\em update the global error counts \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a40}{LCBT\_\-save\-Error\-For\-Deltas} ()
\begin{CompactList}\small\item\em stash global error counts to use with \hyperlink{LCBT_8h_a41}{LCBT\_\-print\-Error\-Deltas()} \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a41}{LCBT\_\-print\-Error\-Deltas} (char $\ast$title)
\begin{CompactList}\small\item\em print the delta error counts since \hyperlink{LCBT_8h_a40}{LCBT\_\-save\-Error\-For\-Deltas()} \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a42}{LCBT\_\-event\-Recv} (int num\-Recv, int ccsds)
\begin{CompactList}\small\item\em Setup to receive and compare data from \hyperlink{LCBT_8h_a43}{LCBT\_\-event\-Send()}. \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a43}{LCBT\_\-event\-Send} (int num\-Events, int max\-Evt\-Size, int latp\-Addr, int random\-Len, int ccsds, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} test\-Type, unsigned int test\-Parm)
\begin{CompactList}\small\item\em Send out test event data to be received by \hyperlink{LCBT_8h_a42}{LCBT\_\-event\-Recv()}. \item\end{CompactList}\item 
int \hyperlink{LCBT_8h_a44}{LCBT\_\-event\-Send\-Delay} (int delay\-Nanosec)
\begin{CompactList}\small\item\em Set delay between event sends, can be 0. \item\end{CompactList}\item 
void \hyperlink{LCBT_8h_a45}{LCBT\_\-regs} ()
\begin{CompactList}\small\item\em print vals of all registers in LCB \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a46}{LCBT\_\-read\-Csr} ()
\begin{CompactList}\small\item\em Read CSR register. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a47}{LCBT\_\-read\-Irq} ()
\begin{CompactList}\small\item\em Read IRQ register which has interrupt status. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a48}{LCBT\_\-read\-Event\-Base} ()
\begin{CompactList}\small\item\em Read Event Base register which is start of Event circular buffer. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a49}{LCBT\_\-read\-Event\-Free} ()
\begin{CompactList}\small\item\em Read Event Free register which is offset in Event circular buffer HW will write to. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a50}{LCBT\_\-read\-Event\-Q} ()
\begin{CompactList}\small\item\em Read event\-Queue NOTE this will pull value from queue and effect operation. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a51}{LCBT\_\-read\-Result\-Q} ()
\begin{CompactList}\small\item\em Read result\-Queue NOTE this will pull value from queue and effect operation. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a52}{LCBT\_\-read\-Request\-Q} ()
\begin{CompactList}\small\item\em Read request\-Queue, 0=not\-EMpty, not0=empty. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a53}{LCBT\_\-read\-Debug} ()
\begin{CompactList}\small\item\em Read debug register NOTE this will pull value from queue and effect operation. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a54}{LCBT\_\-read\-Latp\-Csr} ()
\begin{CompactList}\small\item\em read LATp CSR register (requires a DMA) \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a55}{LCBT\_\-read\-Fifo\-Fault} ()
\begin{CompactList}\small\item\em read Fifo Fault registers (requires a DMA) \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a56}{LCBT\_\-read\-Fabric\-Select} ()
\begin{CompactList}\small\item\em Read Fabric\-Select register which indicates primary or redundant. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a57}{LCBT\_\-read\-Stats} ()
\begin{CompactList}\small\item\em read stats register (requires a DMA) \item\end{CompactList}\item 
void \hyperlink{LCBT_8h_a58}{LCBT\_\-read\-Hw\-Info} ()
\begin{CompactList}\small\item\em Read hw\-Info register. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a59}{LCBT\_\-write\-Csr} (unsigned int data)
\begin{CompactList}\small\item\em Write given value to register. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a60}{LCBT\_\-write\-Irq} (unsigned int data)
\begin{CompactList}\small\item\em Write given value to register. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a61}{LCBT\_\-write\-Event\-Base} (unsigned int data)
\begin{CompactList}\small\item\em Write given value to register. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a62}{LCBT\_\-write\-Event\-Free} (unsigned int data)
\begin{CompactList}\small\item\em Write given value to register. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a63}{LCBT\_\-write\-Fabric\-Select} (unsigned int data)
\begin{CompactList}\small\item\em Write given value to register. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a64}{LCBT\_\-write\-Latp\-Csr} (unsigned int data, unsigned int mask)
\begin{CompactList}\small\item\em write LATp CSR register (requires a DMA) \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a65}{LCBT\_\-write\-Fifo\-Fault} (unsigned int data, unsigned int mask)
\begin{CompactList}\small\item\em write Fifo Fault register (requires a DMA) \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a66}{LCBT\_\-write\-Stats} (unsigned int data, unsigned int mask)
\begin{CompactList}\small\item\em write Fifo Fault register (requires a DMA) \item\end{CompactList}\item 
void \hyperlink{LCBT_8h_a67}{LCBT\_\-lat\-Reset} (unsigned int stall)
\begin{CompactList}\small\item\em sends LAT reset (requires a DMA) \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a68}{LCBT\_\-read\-Reg} (int latp\-Addr, int block, int reg, unsigned int $\ast$value)
\begin{CompactList}\small\item\em read a single register over the cmd\-Response fabric \item\end{CompactList}\item 
unsigned int \hyperlink{LCBT_8h_a69}{LCBT\_\-write\-Reg} (int latp\-Addr, int block, int reg, unsigned int value, int broadcast)
\begin{CompactList}\small\item\em write to single register over the cmd\-Response fabric \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Regression test for LCB LAT COmmunication boards. 

\begin{Desc}
\item[Author:]Ed Bacho - \href{mailto:ebacho@slac.stanford.edu}{\tt ebacho@slac.stanford.edu}\end{Desc}


\footnotesize\begin{verbatim}

    These are the main subroutines for running LCB regression tests. They
    are intended to be run on VxWorks through the WindSh or across the
    network via LTX.
   
    The subroutines are structured to be used thru the WindSh rather than
    be called by other progs. They assume a single LCB board.

   CVS $Id: LCBT.h,v 1.21 2004/11/05 17:55:49 ebacho Exp $
\end{verbatim}\normalsize


\subsection{Enumeration Type Documentation}
\hypertarget{LCBT_8h_a71}{
\index{LCBT.h@{LCBT.h}!_LCBT_AVAIL@{\_\-LCBT\_\-AVAIL}}
\index{_LCBT_AVAIL@{\_\-LCBT\_\-AVAIL}!LCBT.h@{LCBT.h}}
\subsubsection[\_\-LCBT\_\-AVAIL]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{LCBT_8h_a71}{\_\-LCBT\_\-AVAIL}}}
\label{LCBT_8h_a71}


\begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{LCBT_GASU_AVAIL@{LCBT\_\-GASU\_\-AVAIL}!LCBT.h@{LCBT.h}}\index{LCBT.h@{LCBT.h}!LCBT_GASU_AVAIL@{LCBT\_\-GASU\_\-AVAIL}}\item[{\em 
\hypertarget{LCBT_8h_a71a11}{
{\em LCBT\_\-GASU\_\-AVAIL}}
\label{LCBT_8h_a71a11}
}]TEM connected to LCB \index{LCBT_MASK_VALID@{LCBT\_\-MASK\_\-VALID}!LCBT.h@{LCBT.h}}\index{LCBT.h@{LCBT.h}!LCBT_MASK_VALID@{LCBT\_\-MASK\_\-VALID}}\item[{\em 
\hypertarget{LCBT_8h_a71a12}{
{\em LCBT\_\-MASK\_\-VALID}}
\label{LCBT_8h_a71a12}
}]GASU(EBM) connected to LCB \end{description}
\end{Desc}

\hypertarget{LCBT_8h_a70}{
\index{LCBT.h@{LCBT.h}!_LCBT_OPTION@{\_\-LCBT\_\-OPTION}}
\index{_LCBT_OPTION@{\_\-LCBT\_\-OPTION}!LCBT.h@{LCBT.h}}
\subsubsection[\_\-LCBT\_\-OPTION]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{LCBT_8h_a70}{\_\-LCBT\_\-OPTION}}}
\label{LCBT_8h_a70}


\begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{LCBT_OPTION_BUSYPRINT@{LCBT\_\-OPTION\_\-BUSYPRINT}!LCBT.h@{LCBT.h}}\index{LCBT.h@{LCBT.h}!LCBT_OPTION_BUSYPRINT@{LCBT\_\-OPTION\_\-BUSYPRINT}}\item[{\em 
\hypertarget{LCBT_8h_a70a4}{
{\em LCBT\_\-OPTION\_\-BUSYPRINT}}
\label{LCBT_8h_a70a4}
}]print count every 1000 accesses \index{LCBT_OPTION_VERBOSE@{LCBT\_\-OPTION\_\-VERBOSE}!LCBT.h@{LCBT.h}}\index{LCBT.h@{LCBT.h}!LCBT_OPTION_VERBOSE@{LCBT\_\-OPTION\_\-VERBOSE}}\item[{\em 
\hypertarget{LCBT_8h_a70a5}{
{\em LCBT\_\-OPTION\_\-VERBOSE}}
\label{LCBT_8h_a70a5}
}]lots of printouts \index{LCBT_OPTION_FOREVER@{LCBT\_\-OPTION\_\-FOREVER}!LCBT.h@{LCBT.h}}\index{LCBT.h@{LCBT.h}!LCBT_OPTION_FOREVER@{LCBT\_\-OPTION\_\-FOREVER}}\item[{\em 
\hypertarget{LCBT_8h_a70a6}{
{\em LCBT\_\-OPTION\_\-FOREVER}}
\label{LCBT_8h_a70a6}
}]ignore count and loop forever \index{LCBT_OPTION_INCTESTPARM@{LCBT\_\-OPTION\_\-INCTESTPARM}!LCBT.h@{LCBT.h}}\index{LCBT.h@{LCBT.h}!LCBT_OPTION_INCTESTPARM@{LCBT\_\-OPTION\_\-INCTESTPARM}}\item[{\em 
\hypertarget{LCBT_8h_a70a7}{
{\em LCBT\_\-OPTION\_\-INCTESTPARM}}
\label{LCBT_8h_a70a7}
}]increment test parm every loop \index{LCBT_OPTION_COMPARE_FOR_ECHO@{LCBT\_\-OPTION\_\-COMPARE\_\-FOR\_\-ECHO}!LCBT.h@{LCBT.h}}\index{LCBT.h@{LCBT.h}!LCBT_OPTION_COMPARE_FOR_ECHO@{LCBT\_\-OPTION\_\-COMPARE\_\-FOR\_\-ECHO}}\item[{\em 
\hypertarget{LCBT_8h_a70a8}{
{\em LCBT\_\-OPTION\_\-COMPARE\_\-FOR\_\-ECHO}}
\label{LCBT_8h_a70a8}
}]use compare server for echo server \index{LCBT_OPTION_RLCL_ADDR@{LCBT\_\-OPTION\_\-RLCL\_\-ADDR}!LCBT.h@{LCBT.h}}\index{LCBT.h@{LCBT.h}!LCBT_OPTION_RLCL_ADDR@{LCBT\_\-OPTION\_\-RLCL\_\-ADDR}}\item[{\em 
\hypertarget{LCBT_8h_a70a9}{
{\em LCBT\_\-OPTION\_\-RLCL\_\-ADDR}}
\label{LCBT_8h_a70a9}
}]print cmd and rst list pointers in event test \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{LCBT_8h_a37}{
\index{LCBT.h@{LCBT.h}!LCBT_clearErrorTotals@{LCBT\_\-clearErrorTotals}}
\index{LCBT_clearErrorTotals@{LCBT\_\-clearErrorTotals}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-clearErrorTotals]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-clear\-Error\-Totals ()}}
\label{LCBT_8h_a37}


clear the global error counts 

\begin{Desc}
\item[Returns:]total error count before clearing \end{Desc}
\hypertarget{LCBT_8h_a23}{
\index{LCBT.h@{LCBT.h}!LCBT_cmdExternalTest@{LCBT\_\-cmdExternalTest}}
\index{LCBT_cmdExternalTest@{LCBT\_\-cmdExternalTest}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-cmdExternalTest]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-cmd\-External\-Test (int {\em num}, int {\em single\-Access}, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} {\em test\-Type}, unsigned int {\em test\-Parm})}}
\label{LCBT_8h_a23}


read test on LCB local registers that require Cmd list DMA 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]Number of accesses to do in the test \item[{\em single\-Access}]1=single acess per DMA, all reg are access within single DMA \item[{\em test\-Type}]Specifies the data sequence for test \item[{\em test\-Parm}]Parm to use with test\-Type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]total errs \end{Desc}
This test excersizes LCB board and driver by write/read/compare to registers on the TEMP or EBM if HW is availible. The registers are NOT set to reasonable values and only those register where this is not problematic are used. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=182pt]{LCBT_8h_a23_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a20}{
\index{LCBT.h@{LCBT.h}!LCBT_cmdLocalTest@{LCBT\_\-cmdLocalTest}}
\index{LCBT_cmdLocalTest@{LCBT\_\-cmdLocalTest}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-cmdLocalTest]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-cmd\-Local\-Test (int {\em num}, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} {\em test\-Type}, unsigned int {\em test\-Parm})}}
\label{LCBT_8h_a20}


read test on LCB local registers that require Cmd list DMA 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]Number of accesses to do in the test \item[{\em test\-Type}]Specifies the data sequence for test \item[{\em test\-Parm}]Parm to use with test\-Type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]total errs \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=174pt]{LCBT_8h_a20_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a21}{
\index{LCBT.h@{LCBT.h}!LCBT_cmdLocalTest2@{LCBT\_\-cmdLocalTest2}}
\index{LCBT_cmdLocalTest2@{LCBT\_\-cmdLocalTest2}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-cmdLocalTest2]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-cmd\-Local\-Test2 (int {\em num}, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} {\em test\-Type}, unsigned int {\em test\-Parm})}}
\label{LCBT_8h_a21}


2 task read test on LCB local registers that require Cmd list DMA 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]Number of accesses to do in the test \item[{\em test\-Type}]Specifies the data sequence for test \item[{\em test\-Parm}]Parm to use with test\-Type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]total errs \end{Desc}
This is similar to LCBT\_\-cmd\-Local\-Test except that two tasks are spawned and do the test concurrently. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=177pt]{LCBT_8h_a21_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a22}{
\index{LCBT.h@{LCBT.h}!LCBT_cmdLocalTest3@{LCBT\_\-cmdLocalTest3}}
\index{LCBT_cmdLocalTest3@{LCBT\_\-cmdLocalTest3}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-cmdLocalTest3]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-cmd\-Local\-Test3 (int {\em num}, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} {\em test\-Type}, unsigned int {\em test\-Parm})}}
\label{LCBT_8h_a22}


3 task read test on LCB local registers that require Cmd list DMA 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]Number of accesses to do in the test \item[{\em test\-Type}]Specifies the data sequence for test \item[{\em test\-Parm}]Parm to use with test\-Type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]total errs \end{Desc}
This is similar to LCBT\_\-cmd\-Local\-Test except that three tasks are spawned and do the test concurrently. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=177pt]{LCBT_8h_a22_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a28}{
\index{LCBT.h@{LCBT.h}!LCBT_comboTest@{LCBT\_\-comboTest}}
\index{LCBT_comboTest@{LCBT\_\-comboTest}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-comboTest]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-combo\-Test (int {\em num}, int {\em max\-Len}, int {\em latp\-Addr}, int {\em random\-Len}, int {\em ccsds}, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} {\em test\-Type}, unsigned int {\em test\-Parm})}}
\label{LCBT_8h_a28}


2 concurrent tasks running event and local\-Cmd\-Reg test 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]number of events to send \item[{\em max\-Len}]max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767 \item[{\em latp\-Addr}]- LATp address of board to send to, 0=self \item[{\em random\-Len}]1=packet range from 4 to max\-Evt\-Size, 0=packets are max\-Evt\-Size \item[{\em ccsds}]1=put CCSDS header on data sent out as event \item[{\em test\-Type}]Specifies the data sequence for test \item[{\em test\-Parm}]Parm to use with test\-Type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
This test is intended to run only when loopback cable is attached to LCB board. Test combines local\-Cmd\-Reg test and event test to prove board properly handles this case. Both these tests use the Cmd list and send to the Request Queue. Num should be set to a high value to guarantee overlap of tests. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=307pt]{LCBT_8h_a28_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a32}{
\index{LCBT.h@{LCBT.h}!LCBT_determineHw@{LCBT\_\-determineHw}}
\index{LCBT_determineHw@{LCBT\_\-determineHw}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-determineHw]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBT\_\-determine\-Hw ()}}
\label{LCBT_8h_a32}


get mask determined by \hyperlink{LCBT__cmdExternal_8c_a3}{LCBT\_\-determine\-Hw()} for use in LCBT\_\-determine\-Hw () determine which HW is connected to the LCB 

This routine is used to determine what HW is connected to the LCB so that the \hyperlink{LCBT__cmdExternal_8c_a6}{LCBT\_\-cmd\-External\-Test()} can be run. The most likly configurations are: LCB to TEM (teststand) LCB to GASU (i.e. EBM) LCB to GASU to TEM (i.e. EBM and TEM) 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=223pt]{LCBT_8h_a32_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a31}{
\index{LCBT.h@{LCBT.h}!LCBT_eventFillTest@{LCBT\_\-eventFillTest}}
\index{LCBT_eventFillTest@{LCBT\_\-eventFillTest}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-eventFillTest]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-event\-Fill\-Test (int {\em num}, int {\em latp\-Addr}, int {\em buff\-Size32}, int {\em print\-Info})}}
\label{LCBT_8h_a31}


Check for proper operation circular buff\-FUll interrupt. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]Number of times to do the test \item[{\em latp\-Addr}]- LATp address of board to send to, 0=self \item[{\em print\-Info}]print itq and other info while processing \item[{\em buff\-Size32}]buff\-Size to send, must be multiple of 32 to match EBM, min is 128 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0=sucess, otherwise returns number of failed tests \end{Desc}
This tests the circ\-Evt\-Buff full interrupt by filling the event buffer but not freeing the buffer. It checks that the proper interrupt sequence occurs when the last event is added to cause it to go full.

NOTE: This test will not work with the old LCB (not LCBD) driver. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=276pt]{LCBT_8h_a31_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a16}{
\index{LCBT.h@{LCBT.h}!LCBT_eventInit@{LCBT\_\-eventInit}}
\index{LCBT_eventInit@{LCBT\_\-eventInit}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-eventInit]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-event\-Init (int {\em echo\-Fork\-Pri})}}
\label{LCBT_8h_a16}


Setup to echo event data back to sender. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em echo\-Fork\-Pri}]priority of forked task to send event data back \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
\hypertarget{LCBT_8h_a42}{
\index{LCBT.h@{LCBT.h}!LCBT_eventRecv@{LCBT\_\-eventRecv}}
\index{LCBT_eventRecv@{LCBT\_\-eventRecv}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-eventRecv]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-event\-Recv (int {\em num\-Recv}, int {\em ccsds})}}
\label{LCBT_8h_a42}


Setup to receive and compare data from \hyperlink{LCBT_8h_a43}{LCBT\_\-event\-Send()}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num\-Recv}]0=sets up and return, 1=waits for num\-Recv events \item[{\em ccsds}]1=expect CCSDS header on event data received \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
This test sets up the receive end for data from \hyperlink{LCBT_8h_a43}{LCBT\_\-event\-Send()}. The data received is self describing so compares can be dome on it. \hypertarget{LCBT_8h_a43}{
\index{LCBT.h@{LCBT.h}!LCBT_eventSend@{LCBT\_\-eventSend}}
\index{LCBT_eventSend@{LCBT\_\-eventSend}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-eventSend]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-event\-Send (int {\em num\-Events}, int {\em max\-Evt\-Size}, int {\em latp\-Addr}, int {\em random\-Len}, int {\em ccsds}, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} {\em test\-Type}, unsigned int {\em test\-Parm})}}
\label{LCBT_8h_a43}


Send out test event data to be received by \hyperlink{LCBT_8h_a42}{LCBT\_\-event\-Recv()}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num\-Events}]number of events to send \item[{\em max\-Evt\-Size}]max event size in int32 (4 to 120), 0 will set to maximum size for loopback which is 767 \item[{\em latp\-Addr}]- LATp address of board to send to, 0=self \item[{\em random\-Len}]1=packet range from 4 to max\-Evt\-Size, 0=packets are max\-Evt\-Size \item[{\em ccsds}]1=put CCSDS header on data sent out as event \item[{\em test\-Type}]Specifies the data sequence for test \item[{\em test\-Parm}]Parm to use with test\-Type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
This test creates and send self-describing test data over the event fabric. THe len of the event packet is random over legal values. \hyperlink{LCBT_8h_a42}{LCBT\_\-event\-Recv()} sets up LCB to receive and interpret the data packets sent by \hyperlink{LCBT_8h_a43}{LCBT\_\-event\-Send()} 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=202pt]{LCBT_8h_a43_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a44}{
\index{LCBT.h@{LCBT.h}!LCBT_eventSendDelay@{LCBT\_\-eventSendDelay}}
\index{LCBT_eventSendDelay@{LCBT\_\-eventSendDelay}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-eventSendDelay]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-event\-Send\-Delay (int {\em delay\-Nanosec})}}
\label{LCBT_8h_a44}


Set delay between event sends, can be 0. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em delay\-Nanosec}]delay in nano\-Sec \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]previous setting of delay \end{Desc}
\hypertarget{LCBT_8h_a24}{
\index{LCBT.h@{LCBT.h}!LCBT_eventTest@{LCBT\_\-eventTest}}
\index{LCBT_eventTest@{LCBT\_\-eventTest}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-eventTest]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-event\-Test (int {\em num}, int {\em max\-Len}, int {\em latp\-Addr}, int {\em random\-Len}, int {\em ccsds}, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} {\em test\-Type}, unsigned int {\em test\-Parm})}}
\label{LCBT_8h_a24}


Test to send/recv/compare event data thru loopback on LCB board. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]number of events to send \item[{\em max\-Len}]max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767 \item[{\em latp\-Addr}]- LATp address of board to send to, 0=self \item[{\em random\-Len}]1=packet range from 4 to max\-Evt\-Size, 0=packets are max\-Evt\-Size \item[{\em ccsds}]1=put CCSDS header on data sent out as event \item[{\em test\-Type}]Specifies the data sequence for test \item[{\em test\-Parm}]Parm to use with test\-Type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
This test is intended to run only when loopback cable is attached to LCB board. Events are sent in random legal sizes. \hyperlink{LCBT_8h_a42}{LCBT\_\-event\-Recv()} and \hyperlink{LCBT_8h_a43}{LCBT\_\-event\-Send()} can be used for testing between LCB boards. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=269pt]{LCBT_8h_a24_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a25}{
\index{LCBT.h@{LCBT.h}!LCBT_eventTest2@{LCBT\_\-eventTest2}}
\index{LCBT_eventTest2@{LCBT\_\-eventTest2}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-eventTest2]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-event\-Test2 (int {\em num}, int {\em max\-Len}, int {\em latp\-Addr}, int {\em random\-Len}, int {\em ccsds}, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} {\em test\-Type}, unsigned int {\em test\-Parm})}}
\label{LCBT_8h_a25}


2 concurrent task test to send/recv/compare event data thru loopback on LCB board 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]number of events to send \item[{\em max\-Len}]max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767 \item[{\em latp\-Addr}]- LATp address of board to send to, 0=self \item[{\em random\-Len}]1=packet range from 4 to max\-Evt\-Size, 0=packets are max\-Evt\-Size \item[{\em ccsds}]1=put CCSDS header on data sent out as event \item[{\em test\-Type}]Specifies the data sequence for test \item[{\em test\-Parm}]Parm to use with test\-Type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
This test is intended to run only when loopback cable is attached to LCB board. \hyperlink{LCBT_8h_a42}{LCBT\_\-event\-Recv()} and \hyperlink{LCBT_8h_a43}{LCBT\_\-event\-Send()} can be used for testing between LCB boards. Test is similar to LCBT\_\-event\-Test except two tasks are spawned to do the same test. Num should be set to a high value to guarantee overlap of tests. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=272pt]{LCBT_8h_a25_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a26}{
\index{LCBT.h@{LCBT.h}!LCBT_eventTest3@{LCBT\_\-eventTest3}}
\index{LCBT_eventTest3@{LCBT\_\-eventTest3}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-eventTest3]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-event\-Test3 (int {\em num}, int {\em max\-Len}, int {\em latp\-Addr}, int {\em random\-Len}, int {\em ccsds}, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} {\em test\-Type}, unsigned int {\em test\-Parm})}}
\label{LCBT_8h_a26}


3 concurrent task test to send/recv/compare event data thru loopback on LCB board 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]number of events to send \item[{\em max\-Len}]max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767 \item[{\em latp\-Addr}]- LATp address of board to send to, 0=self \item[{\em random\-Len}]1=packet range from 4 to max\-Evt\-Size, 0=packets are max\-Evt\-Size \item[{\em ccsds}]1=put CCSDS header on data sent out as event \item[{\em test\-Type}]Specifies the data sequence for test \item[{\em test\-Parm}]Parm to use with test\-Type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
This test is intended to run only when loopback cable is attached to LCB board. \hyperlink{LCBT_8h_a42}{LCBT\_\-event\-Recv()} and \hyperlink{LCBT_8h_a43}{LCBT\_\-event\-Send()} can be used for testing between LCB boards. Test is similar to LCBT\_\-event\-Test except three tasks are spawned to do the same test. Num should be set to a high value to guarantee overlap of tests. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=271pt]{LCBT_8h_a26_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a27}{
\index{LCBT.h@{LCBT.h}!LCBT_eventTest5@{LCBT\_\-eventTest5}}
\index{LCBT_eventTest5@{LCBT\_\-eventTest5}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-eventTest5]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-event\-Test5 (int {\em num}, int {\em max\-Len}, int {\em latp\-Addr}, int {\em random\-Len}, int {\em ccsds}, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} {\em test\-Type}, unsigned int {\em test\-Parm})}}
\label{LCBT_8h_a27}


5 concurrent task test to send/recv/compare event data thru loopback on LCB board 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]number of events to send \item[{\em max\-Len}]max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767 \item[{\em latp\-Addr}]- LATp address of board to send to, 0=self \item[{\em random\-Len}]1=packet range from 4 to max\-Evt\-Size, 0=packets are max\-Evt\-Size \item[{\em ccsds}]1=put CCSDS header on data sent out as event \item[{\em test\-Type}]Specifies the data sequence for test \item[{\em test\-Parm}]Parm to use with test\-Type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
This test is intended to run only when loopback cable is attached to LCB board. \hyperlink{LCBT_8h_a42}{LCBT\_\-event\-Recv()} and \hyperlink{LCBT_8h_a43}{LCBT\_\-event\-Send()} can be used for testing between LCB boards. Test is similar to LCBT\_\-event\-Test except three tasks are spawned to do the same test. Num should be set to a high value to guarantee overlap of tests. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=271pt]{LCBT_8h_a27_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a29}{
\index{LCBT.h@{LCBT.h}!LCBT_eventWatermarkTest@{LCBT\_\-eventWatermarkTest}}
\index{LCBT_eventWatermarkTest@{LCBT\_\-eventWatermarkTest}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-eventWatermarkTest]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-event\-Watermark\-Test (int {\em num}, int {\em latp\-Addr})}}
\label{LCBT_8h_a29}


Check for proper operation of watermarks on Event and Event\-Data queues. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]Number of times to do the test \item[{\em latp\-Addr}]- LATp address of board to send to, 0=self \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0=sucess, otherwise returns number of failed tests \end{Desc}
This test checks that the watermark event come when expected given the settings of the watermarks on the queues.

NOTE: This test will not work with the old LCB (not LCBD) driver. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=171pt]{LCBT_8h_a29_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a30}{
\index{LCBT.h@{LCBT.h}!LCBT_fillQueueTest@{LCBT\_\-fillQueueTest}}
\index{LCBT_fillQueueTest@{LCBT\_\-fillQueueTest}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-fillQueueTest]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-fill\-Queue\-Test (int {\em num\-Loop}, int {\em disable\-Result})}}
\label{LCBT_8h_a30}


Fill request\-Q with requests to make sure it handles it properly. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num\-Loop}]Number of times to do in the test \item[{\em disable\-Result}]fill up all queues by disabling result queue \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]total errs \end{Desc}
This test is used to test the HW and driver to make sure it can handle the request\-Q filling. In this case the driver should put the requests on a list and submit to the HW as the HW finishes other requests. The two test cases are: disable\-Result=0 THis should fill up Request queue and all queues before the transfer engine. disable\-Result=1 THis should fill up Request queue all queues before and after the transfer engine, and the result queue \hypertarget{LCBT_8h_a33}{
\index{LCBT.h@{LCBT.h}!LCBT_hwAvail@{LCBT\_\-hwAvail}}
\index{LCBT_hwAvail@{LCBT\_\-hwAvail}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-hwAvail]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBT\_\-hw\-Avail ()}}
\label{LCBT_8h_a33}


get mask determined by \hyperlink{LCBT__cmdExternal_8c_a3}{LCBT\_\-determine\-Hw()} for use in \hyperlink{LCBT__cmdExternal_8c_a6}{LCBT\_\-cmd\-External\-Test()} 

\begin{Desc}
\item[Returns:]mask of HW connected to LCB \end{Desc}
\hypertarget{LCBT_8h_a13}{
\index{LCBT.h@{LCBT.h}!LCBT_init@{LCBT\_\-init}}
\index{LCBT_init@{LCBT\_\-init}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-init]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-init (int {\em latp\-Addr}, int {\em use\-Redundant\-Path}, x\-LCBx {\em lcb})}}
\label{LCBT_8h_a13}


inits LCB driver and start 2 tasks associated with driver 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em latp\-Addr}]LATp addr to assign to this board \item[{\em use\-Redundant\-Path}]0=normal path, 1=redundant path \item[{\em lcb}]lcbd driver handle is driver is already init (use LCBD\_\-get()), if 0 will load driver \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0=sucess else indicates errors in init \end{Desc}
This routine inits the LCBT module and optionaly load the LCBD driver. It must be called once after boot to setup the LCB driver for tests. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=123pt]{LCBT_8h_a13_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a34}{
\index{LCBT.h@{LCBT.h}!LCBT_initGasu@{LCBT\_\-initGasu}}
\index{LCBT_initGasu@{LCBT\_\-initGasu}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-initGasu]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBT\_\-init\-Gasu ()}}
\label{LCBT_8h_a34}


setup registers in GASU determine which HW is connected to the LCB 

This routine is used as an alternative to PIG to init the GASU. DO NOT use if you are using PIG to setup the HW. 

Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=286pt]{LCBT_8h_a34_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a36}{
\index{LCBT.h@{LCBT.h}!LCBT_lam@{LCBT\_\-lam}}
\index{LCBT_lam@{LCBT\_\-lam}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-lam]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBT\_\-lam (int {\em latp\-Addr})}}
\label{LCBT_8h_a36}


send LAM (look\-At\-Me) Send out LAM to specified addr 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em latp\-Addr}]addr to send LAM to \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]status \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=124pt]{LCBT_8h_a36_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a67}{
\index{LCBT.h@{LCBT.h}!LCBT_latReset@{LCBT\_\-latReset}}
\index{LCBT_latReset@{LCBT\_\-latReset}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-latReset]{\setlength{\rightskip}{0pt plus 5cm}void LCBT\_\-lat\-Reset (unsigned int {\em stall})}}
\label{LCBT_8h_a67}


sends LAT reset (requires a DMA) 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em stall}]stall after reset in 50 n\-Sec tics \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]status \end{Desc}
To be used with great discretion, i.e. in case of emergency break glass. \hypertarget{LCBT_8h_a19}{
\index{LCBT.h@{LCBT.h}!LCBT_localRegTest@{LCBT\_\-localRegTest}}
\index{LCBT_localRegTest@{LCBT\_\-localRegTest}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-localRegTest]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-local\-Reg\-Test (int {\em num}, \hyperlink{TDATA_8h_a0}{TDATA\_\-DTEST} {\em test\-Type}, unsigned int {\em test\-Parm})}}
\label{LCBT_8h_a19}


Read/write/compare test on all PCI accessable registers on LCB board. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]Number of events to do in the test \item[{\em test\-Type}]Specified the data sequence used for test data \item[{\em test\-Parm}]Parm to use with test\-Type \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=185pt]{LCBT_8h_a19_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a41}{
\index{LCBT.h@{LCBT.h}!LCBT_printErrorDeltas@{LCBT\_\-printErrorDeltas}}
\index{LCBT_printErrorDeltas@{LCBT\_\-printErrorDeltas}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-printErrorDeltas]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-print\-Error\-Deltas (char $\ast$ {\em title})}}
\label{LCBT_8h_a41}


print the delta error counts since \hyperlink{LCBT_8h_a40}{LCBT\_\-save\-Error\-For\-Deltas()} 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em title}]title to print before totals \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]total error count \end{Desc}
\hypertarget{LCBT_8h_a38}{
\index{LCBT.h@{LCBT.h}!LCBT_printErrorTotals@{LCBT\_\-printErrorTotals}}
\index{LCBT_printErrorTotals@{LCBT\_\-printErrorTotals}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-printErrorTotals]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-print\-Error\-Totals (char $\ast$ {\em title})}}
\label{LCBT_8h_a38}


print the global error counts 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em title}]title to print before totals \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]total error count \end{Desc}
\hypertarget{LCBT_8h_a46}{
\index{LCBT.h@{LCBT.h}!LCBT_readCsr@{LCBT\_\-readCsr}}
\index{LCBT_readCsr@{LCBT\_\-readCsr}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readCsr]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-read\-Csr ()}}
\label{LCBT_8h_a46}


Read CSR register. 

\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a53}{
\index{LCBT.h@{LCBT.h}!LCBT_readDebug@{LCBT\_\-readDebug}}
\index{LCBT_readDebug@{LCBT\_\-readDebug}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readDebug]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-read\-Debug ()}}
\label{LCBT_8h_a53}


Read debug register NOTE this will pull value from queue and effect operation. 

\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a48}{
\index{LCBT.h@{LCBT.h}!LCBT_readEventBase@{LCBT\_\-readEventBase}}
\index{LCBT_readEventBase@{LCBT\_\-readEventBase}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readEventBase]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-read\-Event\-Base ()}}
\label{LCBT_8h_a48}


Read Event Base register which is start of Event circular buffer. 

\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a49}{
\index{LCBT.h@{LCBT.h}!LCBT_readEventFree@{LCBT\_\-readEventFree}}
\index{LCBT_readEventFree@{LCBT\_\-readEventFree}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readEventFree]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-read\-Event\-Free ()}}
\label{LCBT_8h_a49}


Read Event Free register which is offset in Event circular buffer HW will write to. 

\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a50}{
\index{LCBT.h@{LCBT.h}!LCBT_readEventQ@{LCBT\_\-readEventQ}}
\index{LCBT_readEventQ@{LCBT\_\-readEventQ}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readEventQ]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-read\-Event\-Q ()}}
\label{LCBT_8h_a50}


Read event\-Queue NOTE this will pull value from queue and effect operation. 

\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a56}{
\index{LCBT.h@{LCBT.h}!LCBT_readFabricSelect@{LCBT\_\-readFabricSelect}}
\index{LCBT_readFabricSelect@{LCBT\_\-readFabricSelect}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readFabricSelect]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-read\-Fabric\-Select ()}}
\label{LCBT_8h_a56}


Read Fabric\-Select register which indicates primary or redundant. 

\begin{Desc}
\item[Returns:]Value of register, 0=promary, 1=redundant \end{Desc}
\hypertarget{LCBT_8h_a55}{
\index{LCBT.h@{LCBT.h}!LCBT_readFifoFault@{LCBT\_\-readFifoFault}}
\index{LCBT_readFifoFault@{LCBT\_\-readFifoFault}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readFifoFault]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-read\-Fifo\-Fault ()}}
\label{LCBT_8h_a55}


read Fifo Fault registers (requires a DMA) 

\begin{Desc}
\item[Returns:]value in register \end{Desc}
\hypertarget{LCBT_8h_a58}{
\index{LCBT.h@{LCBT.h}!LCBT_readHwInfo@{LCBT\_\-readHwInfo}}
\index{LCBT_readHwInfo@{LCBT\_\-readHwInfo}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readHwInfo]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-read\-Hw\-Info ()}}
\label{LCBT_8h_a58}


Read hw\-Info register. 

\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a47}{
\index{LCBT.h@{LCBT.h}!LCBT_readIrq@{LCBT\_\-readIrq}}
\index{LCBT_readIrq@{LCBT\_\-readIrq}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readIrq]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-read\-Irq ()}}
\label{LCBT_8h_a47}


Read IRQ register which has interrupt status. 

\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a54}{
\index{LCBT.h@{LCBT.h}!LCBT_readLatpCsr@{LCBT\_\-readLatpCsr}}
\index{LCBT_readLatpCsr@{LCBT\_\-readLatpCsr}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readLatpCsr]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-read\-Latp\-Csr ()}}
\label{LCBT_8h_a54}


read LATp CSR register (requires a DMA) 

\begin{Desc}
\item[Returns:]value in register \end{Desc}
\hypertarget{LCBT_8h_a68}{
\index{LCBT.h@{LCBT.h}!LCBT_readReg@{LCBT\_\-readReg}}
\index{LCBT_readReg@{LCBT\_\-readReg}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readReg]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBT\_\-read\-Reg (int {\em latp\-Addr}, int {\em block}, int {\em reg}, unsigned int $\ast$ {\em value})}}
\label{LCBT_8h_a68}


read a single register over the cmd\-Response fabric 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em latp\-Addr}]LCB address to access, HW type is inferred from addr \item[{\em block}]Register block to access \item[{\em reg}]Register number to access \item[{\em value}]value to return, if 0 it will printf() value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]status \end{Desc}
This routine does a syncronous read from a single register on HW connected thru LCB. Format of message is determined from latp\-Addr (so expectes standard assignments). \hypertarget{LCBT_8h_a52}{
\index{LCBT.h@{LCBT.h}!LCBT_readRequestQ@{LCBT\_\-readRequestQ}}
\index{LCBT_readRequestQ@{LCBT\_\-readRequestQ}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readRequestQ]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-read\-Request\-Q ()}}
\label{LCBT_8h_a52}


Read request\-Queue, 0=not\-EMpty, not0=empty. 

\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a51}{
\index{LCBT.h@{LCBT.h}!LCBT_readResultQ@{LCBT\_\-readResultQ}}
\index{LCBT_readResultQ@{LCBT\_\-readResultQ}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readResultQ]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-read\-Result\-Q ()}}
\label{LCBT_8h_a51}


Read result\-Queue NOTE this will pull value from queue and effect operation. 

\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a57}{
\index{LCBT.h@{LCBT.h}!LCBT_readStats@{LCBT\_\-readStats}}
\index{LCBT_readStats@{LCBT\_\-readStats}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-readStats]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-read\-Stats ()}}
\label{LCBT_8h_a57}


read stats register (requires a DMA) 

\begin{Desc}
\item[Returns:]value in register \end{Desc}
\hypertarget{LCBT_8h_a45}{
\index{LCBT.h@{LCBT.h}!LCBT_regs@{LCBT\_\-regs}}
\index{LCBT_regs@{LCBT\_\-regs}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-regs]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-regs ()}}
\label{LCBT_8h_a45}


print vals of all registers in LCB 

\begin{Desc}
\item[Returns:]none \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=142pt]{LCBT_8h_a45_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a40}{
\index{LCBT.h@{LCBT.h}!LCBT_saveErrorForDeltas@{LCBT\_\-saveErrorForDeltas}}
\index{LCBT_saveErrorForDeltas@{LCBT\_\-saveErrorForDeltas}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-saveErrorForDeltas]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-save\-Error\-For\-Deltas ()}}
\label{LCBT_8h_a40}


stash global error counts to use with \hyperlink{LCBT_8h_a41}{LCBT\_\-print\-Error\-Deltas()} 

\begin{Desc}
\item[Returns:]total error count \end{Desc}
\hypertarget{LCBT_8h_a35}{
\index{LCBT.h@{LCBT.h}!LCBT_setCfg@{LCBT\_\-setCfg}}
\index{LCBT_setCfg@{LCBT\_\-setCfg}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-setCfg]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBT\_\-set\-Cfg (int {\em have\-Gasu}, int {\em have\-Tem})}}
\label{LCBT_8h_a35}


get mask determined by \hyperlink{LCBT__cmdExternal_8c_a3}{LCBT\_\-determine\-Hw()} for use in \hyperlink{LCBT__cmdExternal_8c_a6}{LCBT\_\-cmd\-External\-Test()} 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em have\-Gasu}]1=have GASU/EBM \item[{\em have\-Tem}]1=have TEM either thru GASU or Transition Board \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]mask of HW connected to LCB \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=141pt]{LCBT_8h_a35_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a15}{
\index{LCBT.h@{LCBT.h}!LCBT_setEpu@{LCBT\_\-setEpu}}
\index{LCBT_setEpu@{LCBT\_\-setEpu}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-setEpu]{\setlength{\rightskip}{0pt plus 5cm}void LCBT\_\-set\-Epu (int {\em idx})}}
\label{LCBT_8h_a15}


Set board\-ID in Csr to EPU addr. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em idx}]which EPU,0=EPU0,1=EPU1,2=EPU3 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=142pt]{LCBT_8h_a15_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a18}{
\index{LCBT.h@{LCBT.h}!LCBT_setOption@{LCBT\_\-setOption}}
\index{LCBT_setOption@{LCBT\_\-setOption}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-setOption]{\setlength{\rightskip}{0pt plus 5cm}void LCBT\_\-set\-Option (unsigned int {\em mask})}}
\label{LCBT_8h_a18}


set test option mask, see \hyperlink{LCBT_8h}{LCBT.h} for values 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mask}]mask of tests options \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
\hypertarget{LCBT_8h_a14}{
\index{LCBT.h@{LCBT.h}!LCBT_setSiu@{LCBT\_\-setSiu}}
\index{LCBT_setSiu@{LCBT\_\-setSiu}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-setSiu]{\setlength{\rightskip}{0pt plus 5cm}void LCBT\_\-set\-Siu (int {\em idx})}}
\label{LCBT_8h_a14}


Set board\-ID in Csr to SIU addr. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em idx}]which SIU,0=SIU0,1=SIU1 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=139pt]{LCBT_8h_a14_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a17}{
\index{LCBT.h@{LCBT.h}!LCBT_testAll@{LCBT\_\-testAll}}
\index{LCBT_testAll@{LCBT\_\-testAll}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-testAll]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-test\-All (int {\em num}, int {\em n\-Loops}, int {\em latp\-Addr}, int {\em loopback\-Cable})}}
\label{LCBT_8h_a17}


overall test, does complete regression test of LCB 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]number of accesses to board per test \item[{\em n\-Loops}]number of times thru all tests test \item[{\em latp\-Addr}]0=route event tests back to self, else route event test to echo server at this addr \item[{\em loopback\-Cable}]1=loopback cable present and will run event test, 0=no cable so run event tests only if GASU availible \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0=success, else indicates errors detected \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=355pt]{LCBT_8h_a17_cgraph}
\end{center}
\end{figure}
\hypertarget{LCBT_8h_a39}{
\index{LCBT.h@{LCBT.h}!LCBT_updateErrorTotals@{LCBT\_\-updateErrorTotals}}
\index{LCBT_updateErrorTotals@{LCBT\_\-updateErrorTotals}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-updateErrorTotals]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-update\-Error\-Totals (int {\em num\-Access}, int {\em r\-Err}, int {\em w\-Err}, int {\em c\-Err})}}
\label{LCBT_8h_a39}


update the global error counts 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num\-Access}]Number of R/W/Compare ops \item[{\em r\-Err}]number of read errors \item[{\em w\-Err}]number of write errors \item[{\em c\-Err}]number of compare errors \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]total error count g \end{Desc}
\hypertarget{LCBT_8h_a59}{
\index{LCBT.h@{LCBT.h}!LCBT_writeCsr@{LCBT\_\-writeCsr}}
\index{LCBT_writeCsr@{LCBT\_\-writeCsr}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-writeCsr]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-write\-Csr (unsigned int {\em data})}}
\label{LCBT_8h_a59}


Write given value to register. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]value to write to register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a61}{
\index{LCBT.h@{LCBT.h}!LCBT_writeEventBase@{LCBT\_\-writeEventBase}}
\index{LCBT_writeEventBase@{LCBT\_\-writeEventBase}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-writeEventBase]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-write\-Event\-Base (unsigned int {\em data})}}
\label{LCBT_8h_a61}


Write given value to register. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]value to write to register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a62}{
\index{LCBT.h@{LCBT.h}!LCBT_writeEventFree@{LCBT\_\-writeEventFree}}
\index{LCBT_writeEventFree@{LCBT\_\-writeEventFree}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-writeEventFree]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-write\-Event\-Free (unsigned int {\em data})}}
\label{LCBT_8h_a62}


Write given value to register. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]value to write to register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a63}{
\index{LCBT.h@{LCBT.h}!LCBT_writeFabricSelect@{LCBT\_\-writeFabricSelect}}
\index{LCBT_writeFabricSelect@{LCBT\_\-writeFabricSelect}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-writeFabricSelect]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-write\-Fabric\-Select (unsigned int {\em data})}}
\label{LCBT_8h_a63}


Write given value to register. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]value to write to register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a65}{
\index{LCBT.h@{LCBT.h}!LCBT_writeFifoFault@{LCBT\_\-writeFifoFault}}
\index{LCBT_writeFifoFault@{LCBT\_\-writeFifoFault}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-writeFifoFault]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-write\-Fifo\-Fault (unsigned int {\em data}, unsigned int {\em mask})}}
\label{LCBT_8h_a65}


write Fifo Fault register (requires a DMA) 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]value to write to register \item[{\em mask}]mask of bits to write, if 0 will default to full register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]value in register \end{Desc}
\hypertarget{LCBT_8h_a60}{
\index{LCBT.h@{LCBT.h}!LCBT_writeIrq@{LCBT\_\-writeIrq}}
\index{LCBT_writeIrq@{LCBT\_\-writeIrq}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-writeIrq]{\setlength{\rightskip}{0pt plus 5cm}LCBT\_\-write\-Irq (unsigned int {\em data})}}
\label{LCBT_8h_a60}


Write given value to register. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]value to write to register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Value of register \end{Desc}
\hypertarget{LCBT_8h_a64}{
\index{LCBT.h@{LCBT.h}!LCBT_writeLatpCsr@{LCBT\_\-writeLatpCsr}}
\index{LCBT_writeLatpCsr@{LCBT\_\-writeLatpCsr}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-writeLatpCsr]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-write\-Latp\-Csr (unsigned int {\em data}, unsigned int {\em mask})}}
\label{LCBT_8h_a64}


write LATp CSR register (requires a DMA) 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]value to write to register \item[{\em mask}]mask of bits to write, if 0 will default to full register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]value in register \end{Desc}
\hypertarget{LCBT_8h_a69}{
\index{LCBT.h@{LCBT.h}!LCBT_writeReg@{LCBT\_\-writeReg}}
\index{LCBT_writeReg@{LCBT\_\-writeReg}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-writeReg]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBT\_\-write\-Reg (int {\em latp\-Addr}, int {\em block}, int {\em reg}, unsigned int {\em value}, int {\em broadcast})}}
\label{LCBT_8h_a69}


write to single register over the cmd\-Response fabric 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em latp\-Addr}]LCB address to access, HW type is inferred from addr \item[{\em block}]Register block to access \item[{\em reg}]Register number to access \item[{\em value}]value to write to register \item[{\em broadcast}]broadcast to all address \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]status \end{Desc}
This routine does a syncronous write to a single register on HW connected thru LCB. Format of message is determined from latp\-Addr (so expectes standard assignments). \hypertarget{LCBT_8h_a66}{
\index{LCBT.h@{LCBT.h}!LCBT_writeStats@{LCBT\_\-writeStats}}
\index{LCBT_writeStats@{LCBT\_\-writeStats}!LCBT.h@{LCBT.h}}
\subsubsection[LCBT\_\-writeStats]{\setlength{\rightskip}{0pt plus 5cm}int LCBT\_\-write\-Stats (unsigned int {\em data}, unsigned int {\em mask})}}
\label{LCBT_8h_a66}


write Fifo Fault register (requires a DMA) 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]value to write to register \item[{\em mask}]mask of bits to write, if 0 will default to full register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]value in register \end{Desc}
