\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
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{decode_8c_117e3cf7c345fcbfc900a5bd2aa3daf3}{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_5df51d68fa8856555aa7c98398f0e432}{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_984ed1f11338b24aefe3672496465fed}{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_07746d95b41416b75a5399c9cda9338b}{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_4210abc1d7c4693f33b95214ae29493e}{TIC\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\item 
void \hyperlink{decode_8c_e1e49fe07249949e8179cb7f0d2d90ee}{TEM\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\item 
void \hyperlink{decode_8c_2122e02f5f584689a79737b26147a338}{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_98faf8564c1edc1f6a6c5ec33cc2a62d}{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_03bd526d86c0574a467b1743bd8e193f}{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_7ca01ebd09331c60c7cdc2c3cfdf84ae}{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_162efdb56b77245932908c31e26245dc}{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_d3b2720feed724e104df90c56088fce2}{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_48f0acbfbb78537c9fab93e596ad26ef}{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_ae27f5590efd0f8d01205a5e2138b3a5}{AEM\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\item 
void \hyperlink{decode_8c_21ebf6b5102040043c2e8e0d885aaac2}{ARC\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{unionACD__rsp}{ACD\_\-rsp} $\ast$rsp)
\item 
void \hyperlink{decode_8c_a3081789b20376b4ab4f76c9a1710bd2}{AFE\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{unionACD__rsp}{ACD\_\-rsp} $\ast$rsp)
\item 
void \hyperlink{decode_8c_2d35b8d1a5a3648e96fbd8524bc5e83c}{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_cb06cbf2ef789479ce57d1e6def83709}{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_832b9cf485d7794a6329136705e45282}{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_ae27f5590efd0f8d01205a5e2138b3a5}{
\index{decode.c@{decode.c}!AEM_decode@{AEM\_\-decode}}
\index{AEM_decode@{AEM\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void AEM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_ae27f5590efd0f8d01205a5e2138b3a5}


\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}
\hypertarget{decode_8c_832b9cf485d7794a6329136705e45282}{
\index{decode.c@{decode.c}!AEM_ENV_decode@{AEM\_\-ENV\_\-decode}}
\index{AEM_ENV_decode@{AEM\_\-ENV\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static inline void AEM\_\-ENV\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf AEM\_\-env\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_832b9cf485d7794a6329136705e45282}


\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_a3081789b20376b4ab4f76c9a1710bd2}{
\index{decode.c@{decode.c}!AFE_decode@{AFE\_\-decode}}
\index{AFE_decode@{AFE\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void AFE\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf ACD\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_a3081789b20376b4ab4f76c9a1710bd2}


\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}
\hypertarget{decode_8c_21ebf6b5102040043c2e8e0d885aaac2}{
\index{decode.c@{decode.c}!ARC_decode@{ARC\_\-decode}}
\index{ARC_decode@{ARC\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ARC\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf ACD\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_21ebf6b5102040043c2e8e0d885aaac2}


\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}
\hypertarget{decode_8c_2122e02f5f584689a79737b26147a338}{
\index{decode.c@{decode.c}!CCC_decode@{CCC\_\-decode}}
\index{CCC_decode@{CCC\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CCC\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_2122e02f5f584689a79737b26147a338}


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}
\hypertarget{decode_8c_03bd526d86c0574a467b1743bd8e193f}{
\index{decode.c@{decode.c}!CFE_decode@{CFE\_\-decode}}
\index{CFE_decode@{CFE\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CFE\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf CAL\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_03bd526d86c0574a467b1743bd8e193f}


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}
\hypertarget{decode_8c_98faf8564c1edc1f6a6c5ec33cc2a62d}{
\index{decode.c@{decode.c}!CRC_decode@{CRC\_\-decode}}
\index{CRC_decode@{CRC\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CRC\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf CAL\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_98faf8564c1edc1f6a6c5ec33cc2a62d}


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}
\hypertarget{decode_8c_117e3cf7c345fcbfc900a5bd2aa3daf3}{
\index{decode.c@{decode.c}!CRU_decode@{CRU\_\-decode}}
\index{CRU_decode@{CRU\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CRU\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_117e3cf7c345fcbfc900a5bd2aa3daf3}


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}
\hypertarget{decode_8c_984ed1f11338b24aefe3672496465fed}{
\index{decode.c@{decode.c}!EBM_decode@{EBM\_\-decode}}
\index{EBM_decode@{EBM\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void EBM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_984ed1f11338b24aefe3672496465fed}


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}
\hypertarget{decode_8c_5df51d68fa8856555aa7c98398f0e432}{
\index{decode.c@{decode.c}!GEM_decode@{GEM\_\-decode}}
\index{GEM_decode@{GEM\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GEM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_5df51d68fa8856555aa7c98398f0e432}


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}
\hypertarget{decode_8c_07746d95b41416b75a5399c9cda9338b}{
\index{decode.c@{decode.c}!PDU_decode@{PDU\_\-decode}}
\index{PDU_decode@{PDU\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void PDU\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_07746d95b41416b75a5399c9cda9338b}


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}
\hypertarget{decode_8c_2d35b8d1a5a3648e96fbd8524bc5e83c}{
\index{decode.c@{decode.c}!PDU_ENV_decode@{PDU\_\-ENV\_\-decode}}
\index{PDU_ENV_decode@{PDU\_\-ENV\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void PDU\_\-ENV\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf PDU\_\-env\_\-rsp} $\ast$ {\em value})}}
\label{decode_8c_2d35b8d1a5a3648e96fbd8524bc5e83c}


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}
\hypertarget{decode_8c_7ca01ebd09331c60c7cdc2c3cfdf84ae}{
\index{decode.c@{decode.c}!TCC_decode@{TCC\_\-decode}}
\index{TCC_decode@{TCC\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TCC\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_7ca01ebd09331c60c7cdc2c3cfdf84ae}


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}
\hypertarget{decode_8c_48f0acbfbb78537c9fab93e596ad26ef}{
\index{decode.c@{decode.c}!TDC_decode@{TDC\_\-decode}}
\index{TDC_decode@{TDC\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TDC\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf TKR\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_48f0acbfbb78537c9fab93e596ad26ef}


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}
\hypertarget{decode_8c_e1e49fe07249949e8179cb7f0d2d90ee}{
\index{decode.c@{decode.c}!TEM_decode@{TEM\_\-decode}}
\index{TEM_decode@{TEM\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TEM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_e1e49fe07249949e8179cb7f0d2d90ee}


\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}
\hypertarget{decode_8c_d3b2720feed724e104df90c56088fce2}{
\index{decode.c@{decode.c}!TFE_decode@{TFE\_\-decode}}
\index{TFE_decode@{TFE\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TFE\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf TKR\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_d3b2720feed724e104df90c56088fce2}


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}
\hypertarget{decode_8c_4210abc1d7c4693f33b95214ae29493e}{
\index{decode.c@{decode.c}!TIC_decode@{TIC\_\-decode}}
\index{TIC_decode@{TIC\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TIC\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8c_4210abc1d7c4693f33b95214ae29493e}


\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}
\hypertarget{decode_8c_cb06cbf2ef789479ce57d1e6def83709}{
\index{decode.c@{decode.c}!TIC_ENV_decode@{TIC\_\-ENV\_\-decode}}
\index{TIC_ENV_decode@{TIC\_\-ENV\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TIC\_\-ENV\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf TIC\_\-env\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_cb06cbf2ef789479ce57d1e6def83709}


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_162efdb56b77245932908c31e26245dc}{
\index{decode.c@{decode.c}!TRC_decode@{TRC\_\-decode}}
\index{TRC_decode@{TRC\_\-decode}!decode.c@{decode.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TRC\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf TKR\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8c_162efdb56b77245932908c31e26245dc}


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}
