\hypertarget{gGTRC_8h}{
\section{g\-GTRC.h File Reference}
\label{gGTRC_8h}\index{gGTRC.h@{gGTRC.h}}
}
command/response methods for the GTRC  


\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{gGTRC_8h_a0}{g\-GTRCcmd} (\hyperlink{struct__gtem}{gtem\-Handle} gt, unsigned short tem\-Addr, unsigned short gtcc\-Addr, unsigned short gtrc\-Addr, unsigned short opcode)
\begin{CompactList}\small\item\em Sends a dataless command to the destination. \item\end{CompactList}\item 
int \hyperlink{gGTRC_8h_a1}{g\-GTRCload} (\hyperlink{struct__gtem}{gtem\-Handle} gt, unsigned short tem\-Addr, unsigned short gtcc\-Addr, unsigned short gtrc\-Addr, unsigned short reg\-Id, unsigned long long val)
\begin{CompactList}\small\item\em Loads a register with value. \item\end{CompactList}\item 
int \hyperlink{gGTRC_8h_a2}{g\-GTRCread} (\hyperlink{struct__gtem}{gtem\-Handle} gt, unsigned short tem\-Addr, unsigned short gtcc\-Addr, unsigned short gtrc\-Addr, unsigned short reg\-Id, unsigned long long $\ast$val)
\begin{CompactList}\small\item\em Reads a register returing value in {\em val\/}. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
command/response methods for the GTRC 

\begin{Desc}
\item[Author:]Curt Brune -- \href{mailto:curt@slac.stanford.edu}{\tt curt@slac.stanford.edu}\end{Desc}


\subsection{Function Documentation}
\hypertarget{gGTRC_8h_a0}{
\index{gGTRC.h@{g\-GTRC.h}!gGTRCcmd@{gGTRCcmd}}
\index{gGTRCcmd@{gGTRCcmd}!gGTRC.h@{g\-GTRC.h}}
\subsubsection[gGTRCcmd]{\setlength{\rightskip}{0pt plus 5cm}int g\-GTRCcmd (\hyperlink{struct__gtem}{gtem\-Handle} {\em gt}, unsigned short {\em tem\-Addr}, unsigned short {\em gtcc\-Addr}, unsigned short {\em gtrc\-Addr}, unsigned short {\em opcode})}}
\label{gGTRC_8h_a0}


Sends a dataless command to the destination. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gt}]gtem\-Handle for TEM \item[{\em tem\-Addr}]TEM address \item[{\em gtcc\-Addr}]GTCC address \item[{\em gtrc\-Addr}]GTRC address \item[{\em opcode}]opcode of command to send \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success \end{Desc}
\hypertarget{gGTRC_8h_a1}{
\index{gGTRC.h@{g\-GTRC.h}!gGTRCload@{gGTRCload}}
\index{gGTRCload@{gGTRCload}!gGTRC.h@{g\-GTRC.h}}
\subsubsection[gGTRCload]{\setlength{\rightskip}{0pt plus 5cm}int g\-GTRCload (\hyperlink{struct__gtem}{gtem\-Handle} {\em gt}, unsigned short {\em tem\-Addr}, unsigned short {\em gtcc\-Addr}, unsigned short {\em gtrc\-Addr}, unsigned short {\em reg}, unsigned long long {\em value})}}
\label{gGTRC_8h_a1}


Loads a register with value. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gt}]gtem\-Handle for TEM \item[{\em tem\-Addr}]TEM address \item[{\em gtcc\-Addr}]GTCC address \item[{\em gtrc\-Addr}]GTRC address \item[{\em reg}]register of GTRC to load \item[{\em value}]16-bit value to load into GTRC register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Loads the GTRC register specified by {\em reg\/} with {\em value\/} \hypertarget{gGTRC_8h_a2}{
\index{gGTRC.h@{g\-GTRC.h}!gGTRCread@{gGTRCread}}
\index{gGTRCread@{gGTRCread}!gGTRC.h@{g\-GTRC.h}}
\subsubsection[gGTRCread]{\setlength{\rightskip}{0pt plus 5cm}int g\-GTRCread (\hyperlink{struct__gtem}{gtem\-Handle} {\em gt}, unsigned short {\em tem\-Addr}, unsigned short {\em gtcc\-Addr}, unsigned short {\em gtrc\-Addr}, unsigned short {\em reg}, unsigned long long $\ast$ {\em val})}}
\label{gGTRC_8h_a2}


Reads a register returing value in {\em val\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gt}]gtem\-Handle for TEM \item[{\em tem\-Addr}]tem\-Addrination of command \item[{\em gtcc\-Addr}]GTCC address \item[{\em gtrc\-Addr}]GTRC address \item[{\em reg}]register of GTRC to read \item[{\em val}]pointer to storage to hold the response of the read command \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]\_\-g\-GTRCread()\end{Desc}
Reads the GTRC register specified by {\em reg\/}. {\em val\/} is filled on return.

The following error codes are returned when LATp errors occur:

\begin{itemize}
\item GERR\_\-LATP\_\-HEADER\_\-PARITY \item GERR\_\-LATP\_\-CELL\_\-PARITY \item GERR\_\-LATP\_\-TRUNCATE \end{itemize}
