\hypertarget{gPDUE_8c}{
\section{g\-PDUE.c File Reference}
\label{gPDUE_8c}\index{gPDUE.c@{gPDUE.c}}
}
Implements command/response for the Environment monitoring register block of the PDU.  


{\tt \#include $<$string.h$>$}\par
{\tt \#include \char`\"{}GDAB/g\-PDUE.h\char`\"{}}\par
{\tt \#include \char`\"{}GDAB/g\-DAB.h\char`\"{}}\par
{\tt \#include \char`\"{}g\-PDU\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}g\-DAB\_\-p.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{gPDUE_8c_a0}{g\-PDUEread} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short pdu\-Addr, unsigned short reg, \hyperlink{struct__pduEnv}{pdu\-Env\-Handle} val)
\begin{CompactList}\small\item\em Reads a register returning value in {\em val\/}. \item\end{CompactList}\item 
int \hyperlink{gPDUE_8c_a1}{g\-PDUEload} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short pdu\-Addr, unsigned short reg, \hyperlink{struct__pduEnv}{pdu\-Env\-Handle} val)
\begin{CompactList}\small\item\em Loads a register with val. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Implements command/response for the Environment monitoring register block of the PDU. 

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


\subsection{Function Documentation}
\hypertarget{gPDUE_8c_a1}{
\index{gPDUE.c@{g\-PDUE.c}!gPDUEload@{gPDUEload}}
\index{gPDUEload@{gPDUEload}!gPDUE.c@{g\-PDUE.c}}
\subsubsection[gPDUEload]{\setlength{\rightskip}{0pt plus 5cm}int g\-PDUEload (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em pdu\-Addr}, unsigned short {\em reg}, \hyperlink{struct__pduEnv}{pdu\-Env\-Handle} {\em val})}}
\label{gPDUE_8c_a1}


Loads a register with val. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle containing the COM I/O (gnat) handle \item[{\em pdu\-Addr}]PDU address of command \item[{\em reg}]register of PDUC to load \item[{\em val}]ptr to value to write to the register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Loads a register from the PDU Environment Monitoring block specified by {\em reg\/} with {\em val\/} Included only for debugging and should not be propogated through to the LATTE interface \hypertarget{gPDUE_8c_a0}{
\index{gPDUE.c@{g\-PDUE.c}!gPDUEread@{gPDUEread}}
\index{gPDUEread@{gPDUEread}!gPDUE.c@{g\-PDUE.c}}
\subsubsection[gPDUEread]{\setlength{\rightskip}{0pt plus 5cm}int g\-PDUEread (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em pdu\-Addr}, unsigned short {\em reg}, \hyperlink{struct__pduEnv}{pdu\-Env\-Handle} {\em val})}}
\label{gPDUE_8c_a0}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle containing the COM I/O (gnat) handle \item[{\em pdu\-Addr}]PDU address of command \item[{\em reg}]register 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}
Reads the register {\em reg\/} from the PDU Environment Monitoring block {\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}
