\hypertarget{decode_8c}{
\section{decode.c File Reference}
\label{decode_8c}\index{decode.c@{decode.c}}
}
Unpack the payload of a result item.  


{\tt \#include \char`\"{}LEM/defs.h\char`\"{}}\par
{\tt \#include \char`\"{}LEM/decode.h\char`\"{}}\par
{\tt \#include \char`\"{}decode.ih\char`\"{}}\par


Include dependency graph for decode.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=160pt]{decode_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{decode_8c_a0}{CRU\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a1}{GEM\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a2}{EBM\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a3}{PDU\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a4}{TIC\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\item 
void \hyperlink{decode_8c_a5}{TEM\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\item 
void \hyperlink{decode_8c_a6}{CCC\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a7}{CRC\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{unionCAL__rsp}{CAL\_\-rsp} $\ast$rsp)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a8}{CFE\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{unionCAL__rsp}{CAL\_\-rsp} $\ast$rsp)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a9}{TCC\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a10}{TRC\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{structTKR__rsp}{TKR\_\-rsp} $\ast$rsp)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a11}{TFE\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{structTKR__rsp}{TKR\_\-rsp} $\ast$rsp)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a12}{TDC\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{structTKR__rsp}{TKR\_\-rsp} $\ast$rsp)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a13}{AEM\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\item 
void \hyperlink{decode_8c_a14}{ARC\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{unionACD__rsp}{ACD\_\-rsp} $\ast$rsp)
\item 
void \hyperlink{decode_8c_a15}{AFE\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{unionACD__rsp}{ACD\_\-rsp} $\ast$rsp)
\item 
void \hyperlink{decode_8c_a16}{PDU\_\-ENV\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{structPDU__env__rsp}{PDU\_\-env\_\-rsp} $\ast$value)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a17}{TIC\_\-ENV\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{structTIC__env__rsp}{TIC\_\-env\_\-rsp} $\ast$rsp)
\begin{CompactList}\small\item\em Dissects the response into constituent parts. \item\end{CompactList}\item 
void \hyperlink{decode_8c_a18}{AEM\_\-ENV\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{unionAEM__env__rsp}{AEM\_\-env\_\-rsp} $\ast$rsp)
\end{CompactItemize}


\subsection{Detailed Description}
Unpack the payload of a result item. 

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


\subsection{Function Documentation}
\hypertarget{decode_8c_a13}{
\index{decode.c@{decode.c}!AEM_decode@{AEM\_\-decode}}
\index{AEM_decode@{AEM\_\-decode}!decode.c@{decode.c}}
\subsubsection[AEM\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void AEM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_a13}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]pointer to response payload data \item[{\em value}]pointer to memory to hold decoded payload \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=113pt]{decode_8c_a13_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a18}{
\index{decode.c@{decode.c}!AEM_ENV_decode@{AEM\_\-ENV\_\-decode}}
\index{AEM_ENV_decode@{AEM\_\-ENV\_\-decode}!decode.c@{decode.c}}
\subsubsection[AEM\_\-ENV\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}static inline void AEM\_\-ENV\_\-decode (const unsigned short $\ast$ {\em pkt}, \hyperlink{unionAEM__env__rsp}{AEM\_\-env\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_a18}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]pointer to response payload data \item[{\em rsp}]pointer to memory to hold decoded environmental monitor response data \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}
\hypertarget{decode_8c_a15}{
\index{decode.c@{decode.c}!AFE_decode@{AFE\_\-decode}}
\index{AFE_decode@{AFE\_\-decode}!decode.c@{decode.c}}
\subsubsection[AFE\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void AFE\_\-decode (const unsigned short $\ast$ {\em pkt}, \hyperlink{unionACD__rsp}{ACD\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_a15}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rsp}]Pointer to stucture holding the response \item[{\em pkt}]pointer to response payload data \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=115pt]{decode_8c_a15_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a14}{
\index{decode.c@{decode.c}!ARC_decode@{ARC\_\-decode}}
\index{ARC_decode@{ARC\_\-decode}!decode.c@{decode.c}}
\subsubsection[ARC\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void ARC\_\-decode (const unsigned short $\ast$ {\em pkt}, \hyperlink{unionACD__rsp}{ACD\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_a14}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rsp}]Pointer to stucture holding the response \item[{\em pkt}]pointer to response payload data \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=116pt]{decode_8c_a14_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a6}{
\index{decode.c@{decode.c}!CCC_decode@{CCC\_\-decode}}
\index{CCC_decode@{CCC\_\-decode}!decode.c@{decode.c}}
\subsubsection[CCC\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void CCC\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_a6}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em value}]Pointer to location to store result \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=111pt]{decode_8c_a6_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a8}{
\index{decode.c@{decode.c}!CFE_decode@{CFE\_\-decode}}
\index{CFE_decode@{CFE\_\-decode}!decode.c@{decode.c}}
\subsubsection[CFE\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void CFE\_\-decode (const unsigned short $\ast$ {\em pkt}, \hyperlink{unionCAL__rsp}{CAL\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_a8}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em rsp}]Pointer to structure to hold response \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=112pt]{decode_8c_a8_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a7}{
\index{decode.c@{decode.c}!CRC_decode@{CRC\_\-decode}}
\index{CRC_decode@{CRC\_\-decode}!decode.c@{decode.c}}
\subsubsection[CRC\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void CRC\_\-decode (const unsigned short $\ast$ {\em pkt}, \hyperlink{unionCAL__rsp}{CAL\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_a7}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em rsp}]Pointer to structure to hold response \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=114pt]{decode_8c_a7_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a0}{
\index{decode.c@{decode.c}!CRU_decode@{CRU\_\-decode}}
\index{CRU_decode@{CRU\_\-decode}!decode.c@{decode.c}}
\subsubsection[CRU\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void CRU\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_a0}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em value}]Pointer to location to store result \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=112pt]{decode_8c_a0_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a2}{
\index{decode.c@{decode.c}!EBM_decode@{EBM\_\-decode}}
\index{EBM_decode@{EBM\_\-decode}!decode.c@{decode.c}}
\subsubsection[EBM\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void EBM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_a2}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em value}]Pointer to location to store result \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=113pt]{decode_8c_a2_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a1}{
\index{decode.c@{decode.c}!GEM_decode@{GEM\_\-decode}}
\index{GEM_decode@{GEM\_\-decode}!decode.c@{decode.c}}
\subsubsection[GEM\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void GEM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_a1}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em value}]Pointer to location to store result \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=113pt]{decode_8c_a1_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a3}{
\index{decode.c@{decode.c}!PDU_decode@{PDU\_\-decode}}
\index{PDU_decode@{PDU\_\-decode}!decode.c@{decode.c}}
\subsubsection[PDU\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void PDU\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_a3}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em value}]Pointer to location to store result \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=112pt]{decode_8c_a3_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a16}{
\index{decode.c@{decode.c}!PDU_ENV_decode@{PDU\_\-ENV\_\-decode}}
\index{PDU_ENV_decode@{PDU\_\-ENV\_\-decode}!decode.c@{decode.c}}
\subsubsection[PDU\_\-ENV\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void PDU\_\-ENV\_\-decode (const unsigned short $\ast$ {\em pkt}, \hyperlink{structPDU__env__rsp}{PDU\_\-env\_\-rsp} $\ast$ {\em value})}}
\label{decode_8c_a16}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em value}]Pointer to location to store result \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=129pt]{decode_8c_a16_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a9}{
\index{decode.c@{decode.c}!TCC_decode@{TCC\_\-decode}}
\index{TCC_decode@{TCC\_\-decode}!decode.c@{decode.c}}
\subsubsection[TCC\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void TCC\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_a9}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em value}]Pointer to location to store result \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=111pt]{decode_8c_a9_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a12}{
\index{decode.c@{decode.c}!TDC_decode@{TDC\_\-decode}}
\index{TDC_decode@{TDC\_\-decode}!decode.c@{decode.c}}
\subsubsection[TDC\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void TDC\_\-decode (const unsigned short $\ast$ {\em pkt}, \hyperlink{structTKR__rsp}{TKR\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_a12}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em rsp}]Pointer to structure holding the response flags and the result \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=114pt]{decode_8c_a12_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a5}{
\index{decode.c@{decode.c}!TEM_decode@{TEM\_\-decode}}
\index{TEM_decode@{TEM\_\-decode}!decode.c@{decode.c}}
\subsubsection[TEM\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void TEM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_a5}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]pointer to response payload data \item[{\em value}]pointer to memory to hold decoded payload \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=112pt]{decode_8c_a5_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a11}{
\index{decode.c@{decode.c}!TFE_decode@{TFE\_\-decode}}
\index{TFE_decode@{TFE\_\-decode}!decode.c@{decode.c}}
\subsubsection[TFE\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void TFE\_\-decode (const unsigned short $\ast$ {\em pkt}, \hyperlink{structTKR__rsp}{TKR\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_a11}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em rsp}]Pointer to structure holding the response flags and the result \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=113pt]{decode_8c_a11_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a4}{
\index{decode.c@{decode.c}!TIC_decode@{TIC\_\-decode}}
\index{TIC_decode@{TIC\_\-decode}!decode.c@{decode.c}}
\subsubsection[TIC\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void TIC\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_a4}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]pointer to response payload data \item[{\em value}]pointer to memory to hold decoded payload \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=109pt]{decode_8c_a4_cgraph}
\end{center}
\end{figure}
\hypertarget{decode_8c_a17}{
\index{decode.c@{decode.c}!TIC_ENV_decode@{TIC\_\-ENV\_\-decode}}
\index{TIC_ENV_decode@{TIC\_\-ENV\_\-decode}!decode.c@{decode.c}}
\subsubsection[TIC\_\-ENV\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void TIC\_\-ENV\_\-decode (const unsigned short $\ast$ {\em pkt}, \hyperlink{structTIC__env__rsp}{TIC\_\-env\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_a17}


Dissects the response into constituent parts. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em rsp}]Pointer to structure holding storage for storage for 8 16-bit values,the mux channel number that was acquired and the acquisition valid bit. \end{description}
\end{Desc}
\hypertarget{decode_8c_a10}{
\index{decode.c@{decode.c}!TRC_decode@{TRC\_\-decode}}
\index{TRC_decode@{TRC\_\-decode}!decode.c@{decode.c}}
\subsubsection[TRC\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}void TRC\_\-decode (const unsigned short $\ast$ {\em pkt}, \hyperlink{structTKR__rsp}{TKR\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_a10}


Copies the response from a result item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Pointer to result item payload \item[{\em rsp}]Pointer to structure holding the response flags and the result \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=114pt]{decode_8c_a10_cgraph}
\end{center}
\end{figure}
