\hypertarget{gPDUE_8h}{
\section{g\-PDUE.h File Reference}
\label{gPDUE_8h}\index{gPDUE.h@{gPDUE.h}}
}
command/response methods for the PDU Environment Monitoring register block  


{\tt \#include \char`\"{}GDAB/gdab.h\char`\"{}}\par
{\tt \#include \char`\"{}GDAB/gpdu\_\-structs.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{gPDUE_8h_a0}{g\-PDUEload} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short pdu\-Addr, unsigned short reg\-Id, \hyperlink{struct__pduEnv}{pdu\-Env\-Handle} val)
\begin{CompactList}\small\item\em Loads a register with val. \item\end{CompactList}\item 
int \hyperlink{gPDUE_8h_a1}{g\-PDUEread} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short pdu\-Addr, unsigned short reg\-Id, \hyperlink{struct__pduEnv}{pdu\-Env\-Handle} val)
\begin{CompactList}\small\item\em Reads a register returning value in {\em val\/}. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
command/response methods for the PDU Environment Monitoring register block 

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


\subsection{Function Documentation}
\hypertarget{gPDUE_8h_a0}{
\index{gPDUE.h@{g\-PDUE.h}!gPDUEload@{gPDUEload}}
\index{gPDUEload@{gPDUEload}!gPDUE.h@{g\-PDUE.h}}
\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_8h_a0}


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_8h_a1}{
\index{gPDUE.h@{g\-PDUE.h}!gPDUEread@{gPDUEread}}
\index{gPDUEread@{gPDUEread}!gPDUE.h@{g\-PDUE.h}}
\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_8h_a1}


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}
