\hypertarget{decode_8h}{
\section{decode.h File Reference}
\label{decode_8h}\index{decode.h@{decode.h}}
}
Convert a response payload into a component specific response. 

{\tt \#include \char`\"{}LEM/decode\_\-structs.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{decode_8h_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_8h_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_8h_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_8h_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_8h_e1e49fe07249949e8179cb7f0d2d90ee}{TEM\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\item 
void \hyperlink{decode_8h_4210abc1d7c4693f33b95214ae29493e}{TIC\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\item 
void \hyperlink{decode_8h_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_8h_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_8h_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_8h_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_8h_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_8h_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_8h_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_8h_ae27f5590efd0f8d01205a5e2138b3a5}{AEM\_\-decode} (const unsigned short $\ast$pkt, unsigned $\ast$value)
\item 
void \hyperlink{decode_8h_21ebf6b5102040043c2e8e0d885aaac2}{ARC\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{unionACD__rsp}{ACD\_\-rsp} $\ast$rsp)
\item 
void \hyperlink{decode_8h_a3081789b20376b4ab4f76c9a1710bd2}{AFE\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{unionACD__rsp}{ACD\_\-rsp} $\ast$rsp)
\item 
void \hyperlink{decode_8h_f49dfc0ab299b15b9e595e2d49fa14cf}{PDU\_\-ENV\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{structPDU__env__rsp}{PDU\_\-env\_\-rsp} $\ast$rsp)
\begin{CompactList}\small\item\em Copies the response from a result item. \item\end{CompactList}\item 
void \hyperlink{decode_8h_8d18f97af966a6fe1f671dd181a749d3}{AEM\_\-ENV\_\-decode} (const unsigned short $\ast$pkt, \hyperlink{unionAEM__env__rsp}{AEM\_\-env\_\-rsp} $\ast$rsp)
\item 
void \hyperlink{decode_8h_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}\end{CompactItemize}


\subsection{Detailed Description}
Convert a response payload into a component specific response. 

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


\subsection{Function Documentation}
\hypertarget{decode_8h_ae27f5590efd0f8d01205a5e2138b3a5}{
\index{decode.h@{decode.h}!AEM_decode@{AEM\_\-decode}}
\index{AEM_decode@{AEM\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void AEM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8h_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_8h_8d18f97af966a6fe1f671dd181a749d3}{
\index{decode.h@{decode.h}!AEM_ENV_decode@{AEM\_\-ENV\_\-decode}}
\index{AEM_ENV_decode@{AEM\_\-ENV\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void AEM\_\-ENV\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf AEM\_\-env\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8h_8d18f97af966a6fe1f671dd181a749d3}


\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_8h_a3081789b20376b4ab4f76c9a1710bd2}{
\index{decode.h@{decode.h}!AFE_decode@{AFE\_\-decode}}
\index{AFE_decode@{AFE\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void AFE\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf ACD\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8h_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_8h_21ebf6b5102040043c2e8e0d885aaac2}{
\index{decode.h@{decode.h}!ARC_decode@{ARC\_\-decode}}
\index{ARC_decode@{ARC\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ARC\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf ACD\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8h_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_8h_2122e02f5f584689a79737b26147a338}{
\index{decode.h@{decode.h}!CCC_decode@{CCC\_\-decode}}
\index{CCC_decode@{CCC\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CCC\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8h_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_8h_03bd526d86c0574a467b1743bd8e193f}{
\index{decode.h@{decode.h}!CFE_decode@{CFE\_\-decode}}
\index{CFE_decode@{CFE\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CFE\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf CAL\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8h_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_8h_98faf8564c1edc1f6a6c5ec33cc2a62d}{
\index{decode.h@{decode.h}!CRC_decode@{CRC\_\-decode}}
\index{CRC_decode@{CRC\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CRC\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf CAL\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8h_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_8h_117e3cf7c345fcbfc900a5bd2aa3daf3}{
\index{decode.h@{decode.h}!CRU_decode@{CRU\_\-decode}}
\index{CRU_decode@{CRU\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CRU\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8h_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_8h_984ed1f11338b24aefe3672496465fed}{
\index{decode.h@{decode.h}!EBM_decode@{EBM\_\-decode}}
\index{EBM_decode@{EBM\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void EBM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8h_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_8h_5df51d68fa8856555aa7c98398f0e432}{
\index{decode.h@{decode.h}!GEM_decode@{GEM\_\-decode}}
\index{GEM_decode@{GEM\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GEM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8h_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_8h_07746d95b41416b75a5399c9cda9338b}{
\index{decode.h@{decode.h}!PDU_decode@{PDU\_\-decode}}
\index{PDU_decode@{PDU\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void PDU\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8h_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_8h_f49dfc0ab299b15b9e595e2d49fa14cf}{
\index{decode.h@{decode.h}!PDU_ENV_decode@{PDU\_\-ENV\_\-decode}}
\index{PDU_ENV_decode@{PDU\_\-ENV\_\-decode}!decode.h@{decode.h}}
\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_8h_f49dfc0ab299b15b9e595e2d49fa14cf}


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_8h_7ca01ebd09331c60c7cdc2c3cfdf84ae}{
\index{decode.h@{decode.h}!TCC_decode@{TCC\_\-decode}}
\index{TCC_decode@{TCC\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TCC\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8h_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_8h_48f0acbfbb78537c9fab93e596ad26ef}{
\index{decode.h@{decode.h}!TDC_decode@{TDC\_\-decode}}
\index{TDC_decode@{TDC\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TDC\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf TKR\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8h_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_8h_e1e49fe07249949e8179cb7f0d2d90ee}{
\index{decode.h@{decode.h}!TEM_decode@{TEM\_\-decode}}
\index{TEM_decode@{TEM\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TEM\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8h_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_8h_d3b2720feed724e104df90c56088fce2}{
\index{decode.h@{decode.h}!TFE_decode@{TFE\_\-decode}}
\index{TFE_decode@{TFE\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TFE\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf TKR\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8h_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_8h_4210abc1d7c4693f33b95214ae29493e}{
\index{decode.h@{decode.h}!TIC_decode@{TIC\_\-decode}}
\index{TIC_decode@{TIC\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TIC\_\-decode (const unsigned short $\ast$ {\em pkt}, unsigned $\ast$ {\em value})}}
\label{decode_8h_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_8h_cb06cbf2ef789479ce57d1e6def83709}{
\index{decode.h@{decode.h}!TIC_ENV_decode@{TIC\_\-ENV\_\-decode}}
\index{TIC_ENV_decode@{TIC\_\-ENV\_\-decode}!decode.h@{decode.h}}
\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_8h_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_8h_162efdb56b77245932908c31e26245dc}{
\index{decode.h@{decode.h}!TRC_decode@{TRC\_\-decode}}
\index{TRC_decode@{TRC\_\-decode}!decode.h@{decode.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TRC\_\-decode (const unsigned short $\ast$ {\em pkt}, {\bf TKR\_\-rsp} $\ast$ {\em rsp})}}
\label{decode_8h_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}
