\hypertarget{latp_8h}{
\section{latp.h File Reference}
\label{latp_8h}\index{latp.h@{latp.h}}
}
LAT interaction functions. 

{\tt \#include \char`\"{}imm.h\char`\"{}}\par


Include dependency graph for latp.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=83pt]{latp_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=178pt]{latp_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{structLATC__di}{LATC\_\-di}
\begin{CompactList}\small\item\em Collection of data required to record errors. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{latp_8h_a0}{
\#define \hyperlink{latp_8h_a0}{DECODE\_\-SIZE}(n\_\-)~(n\_\- $\ast$ (sizeof(\hyperlink{structLATC__di}{LATC\_\-di})) )}
\label{latp_8h_a0}

\begin{CompactList}\small\item\em Size of the structure to hold the decode information (function and destination for each command item). \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned \hyperlink{latp_8h_a1}{LATC\_\-load} (LATC\_\-imm $\ast$imm, LEM\_\-micr $\ast$cr)
\begin{CompactList}\small\item\em Load the LAT with the configuration held in {\em imm\/}. \item\end{CompactList}\item 
unsigned \hyperlink{latp_8h_a2}{LATC\_\-read} (LATC\_\-imm $\ast$imm, LEM\_\-micr $\ast$cr, \hyperlink{structLATC__di}{LATC\_\-di} $\ast$di, const LATC\_\-map $\ast$ign)
\begin{CompactList}\small\item\em Read the current configuration of the LAT. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
LAT interaction functions. 

\begin{Desc}
\item[Author:]James Swain -- \href{mailto:jswain@slac.stanford.edu}{\tt jswain@slac.stanford.edu}\end{Desc}


\subsection{Function Documentation}
\hypertarget{latp_8h_a1}{
\index{latp.h@{latp.h}!LATC_load@{LATC\_\-load}}
\index{LATC_load@{LATC\_\-load}!latp.h@{latp.h}}
\subsubsection[LATC\_\-load]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-load (LATC\_\-imm $\ast$ {\em imm}, LEM\_\-micr $\ast$ {\em cr})}}
\label{latp_8h_a1}


Load the LAT with the configuration held in {\em imm\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em imm}]The IMM structure to use as the basis for the load commands sent to the LAT\item[{\em cr}]Pointer to structure holding multi-item command and response lists (plus some state information)\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]If the LAT is loaded successfully \item[{\em LEM\_\-$\ast$}]If there is an error arising from one of the load commands\end{description}
\end{Desc}
\hypertarget{latp_8h_a2}{
\index{latp.h@{latp.h}!LATC_read@{LATC\_\-read}}
\index{LATC_read@{LATC\_\-read}!latp.h@{latp.h}}
\subsubsection[LATC\_\-read]{\setlength{\rightskip}{0pt plus 5cm}unsigned LATC\_\-read (LATC\_\-imm $\ast$ {\em imm}, LEM\_\-micr $\ast$ {\em cr}, \hyperlink{structLATC__di}{LATC\_\-di} $\ast$ {\em di}, const LATC\_\-map $\ast$ {\em ign})}}
\label{latp_8h_a2}


Read the current configuration of the LAT. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em imm}]Pointer to the IMM structure to populate from the LAT\item[{\em cr}]Pointer to structure holding multi-item command and response lists (plus some state information)\item[{\em di}]Array of lem\_\-max\_\-ci latc\_\-di objects that capture read errors from the corresponding command items\item[{\em ign}]Map of the sections of the lat known to be bad or not present so can be ignored.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LATC\_\-SUCCESS}]If all goes well - note that individual register reads may fail but the operation as a whole still succeeds. \item[{\em LEM\_\-$\ast$}]An error concerning the queuing of the c/r list\begin{itemize}
\item individual read command failures are noted in the map associated with the IMM.\end{itemize}
\end{description}
\end{Desc}
