\hypertarget{gAENV_8h}{
\section{g\-AENV.h File Reference}
\label{gAENV_8h}\index{gAENV.h@{gAENV.h}}
}
defines the command and response methods for the AEM Environmental Monitor  


\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{gAENV_8h_a0}{g\-AENVload} (\hyperlink{struct__gaem}{gaem\-Handle} ga, unsigned short reg\-Id, unsigned long long val)
\begin{CompactList}\small\item\em Loads a register with value. \item\end{CompactList}\item 
int \hyperlink{gAENV_8h_a1}{g\-AENVread} (\hyperlink{struct__gaem}{gaem\-Handle} ga, unsigned short reg\-Id, unsigned long long $\ast$val)
\begin{CompactList}\small\item\em Reads a register specified by {\em reg\/} and stores result in {\em value\/}. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
defines the command and response methods for the AEM Environmental Monitor 

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


\subsection{Function Documentation}
\hypertarget{gAENV_8h_a0}{
\index{gAENV.h@{g\-AENV.h}!gAENVload@{gAENVload}}
\index{gAENVload@{gAENVload}!gAENV.h@{g\-AENV.h}}
\subsubsection[gAENVload]{\setlength{\rightskip}{0pt plus 5cm}int g\-AENVload (\hyperlink{struct__gaem}{gaem\-Handle} {\em ga}, unsigned short {\em reg}, unsigned long long {\em value})}}
\label{gAENV_8h_a0}


Loads a register with value. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ga}]gaem\-Handle for AEM \item[{\em reg}]register of AEM to load \item[{\em value}]64-bit value to load into AENV register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
The value written to AENV registers is ignored, but the act of writing initiates the ADC acquisition cycle.

In the VAEM no action is taken. \hypertarget{gAENV_8h_a1}{
\index{gAENV.h@{g\-AENV.h}!gAENVread@{gAENVread}}
\index{gAENVread@{gAENVread}!gAENV.h@{g\-AENV.h}}
\subsubsection[gAENVread]{\setlength{\rightskip}{0pt plus 5cm}int g\-AENVread (\hyperlink{struct__gaem}{gaem\-Handle} {\em ga}, unsigned short {\em reg}, unsigned long long $\ast$ {\em value})}}
\label{gAENV_8h_a1}


Reads a register specified by {\em reg\/} and stores result in {\em value\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ga}]gaem\-Handle for AEM \item[{\em reg}]register of AEM to load \item[{\em value}]pointer to 64-bit value to store register read result \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Returns the 4 ADC values associated with {\em reg\/} in the AEM Environmental Monitor.

In the VAEM this function always returns a value of 0. 