\hypertarget{QEMP_8c}{
\section{QEMP.c File Reference}
\label{QEMP_8c}\index{QEMP.c@{QEMP.c}}
}
Generic QEMP routines. 

{\tt \#include \char`\"{}QEMP/QEMP.h\char`\"{}}\par
{\tt \#include \char`\"{}QASC\_\-pvtdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}QEMP\_\-pvtdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}EMP/ASC\_\-ids.h\char`\"{}}\par


Include dependency graph for QEMP.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=204pt]{QEMP_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned int \hyperlink{QEMP_8c_a0}{QEMP\_\-sizeof} (\hyperlink{QEMP_8h_a0}{QEMP\_\-TYPEID} typeid)
\begin{CompactList}\small\item\em Return the size, in bytes, of the buffer needed to handle data of the specified type. \item\end{CompactList}\item 
\hyperlink{QEMP_8h_a0}{QEMP\_\-TYPEID} \hyperlink{QEMP_8c_a1}{QEMP\_\-typeof} (const LSF\_\-contribution $\ast$ctb)
\begin{CompactList}\small\item\em Return the type of given contribution. \item\end{CompactList}\item 
const char $\ast$ \hyperlink{QEMP_8c_a2}{QEMP\_\-err\-To\-Str} (\hyperlink{QEMP_8h_a1}{QEMP\_\-STATUS} status)
\begin{CompactList}\small\item\em Convert error code to a string. \item\end{CompactList}\item 
static void \hyperlink{QEMP_8c_a3}{transfer\_\-hdr\-Evt} (\hyperlink{struct__QEMP__hdrEvt}{QEMP\_\-hdr\-Evt} $\ast$dst, const EMP\_\-hdr\-Evt $\ast$src)
\begin{CompactList}\small\item\em Transfer an EMP\_\-hdr\-Evt structure to a QEMP\_\-hdr\-Evt structure. \item\end{CompactList}\item 
void \hyperlink{QEMP_8c_a4}{QEMP\_\-hdr\-Transfer} (\hyperlink{struct__QEMP__hdr}{QEMP\_\-hdr} $\ast$dst, const EMP\_\-hdr $\ast$src)
\begin{CompactList}\small\item\em Transfers the contents of an EMP\_\-hdr structure to a QEMP\_\-hdr structure. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Generic QEMP routines. 

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


\footnotesize\begin{verbatim}   CVS $Id: QEMP.c,v 1.4 2006/10/21 00:30:00 russell Exp $
\end{verbatim}
\normalsize


\subsection{Function Documentation}
\hypertarget{QEMP_8c_a2}{
\index{QEMP.c@{QEMP.c}!QEMP_errToStr@{QEMP\_\-errToStr}}
\index{QEMP_errToStr@{QEMP\_\-errToStr}!QEMP.c@{QEMP.c}}
\subsubsection[QEMP\_\-errToStr]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ QEMP\_\-err\-To\-Str (\hyperlink{QEMP_8h_a1}{QEMP\_\-STATUS} {\em status})}}
\label{QEMP_8c_a2}


Convert error code to a string. 

\begin{Desc}
\item[Returns:]string of error code\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em status}]status codes QEMP\_\-ERR\_\-Xxxx\end{description}
\end{Desc}
---------------------------------------------------------------------- \hypertarget{QEMP_8c_a4}{
\index{QEMP.c@{QEMP.c}!QEMP_hdrTransfer@{QEMP\_\-hdrTransfer}}
\index{QEMP_hdrTransfer@{QEMP\_\-hdrTransfer}!QEMP.c@{QEMP.c}}
\subsubsection[QEMP\_\-hdrTransfer]{\setlength{\rightskip}{0pt plus 5cm}void QEMP\_\-hdr\-Transfer (\hyperlink{struct__QEMP__hdr}{QEMP\_\-hdr} $\ast$ {\em dst}, const EMP\_\-hdr $\ast$ {\em src})}}
\label{QEMP_8c_a4}


Transfers the contents of an EMP\_\-hdr structure to a QEMP\_\-hdr structure. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The destination QEMP\_\-hdr structure \item[{\em src}]The source EMP\_\-hdr structure\end{description}
\end{Desc}
Because the EMP structure contains 64-bit long long, and because the alignment of these is compiler dependent, they cannot be simply copied to one another. Hence the need for a formalized transfer routine.

\begin{Desc}
\item[Note:]This is not part of the public interface.\end{Desc}
\hypertarget{QEMP_8c_a0}{
\index{QEMP.c@{QEMP.c}!QEMP_sizeof@{QEMP\_\-sizeof}}
\index{QEMP_sizeof@{QEMP\_\-sizeof}!QEMP.c@{QEMP.c}}
\subsubsection[QEMP\_\-sizeof]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QEMP\_\-sizeof (\hyperlink{QEMP_8h_a0}{QEMP\_\-TYPEID} {\em typeid})}}
\label{QEMP_8c_a0}


Return the size, in bytes, of the buffer needed to handle data of the specified type. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em The}]size, in bytes, of the buffer needed to handle data of the specified type. \item[{\em QEMP\_\-STATUS\_\-CTB\_\-UNKNOWN\_\-TYPEID,if}]the type id was not recognized\end{description}
\end{Desc}
\hypertarget{QEMP_8c_a1}{
\index{QEMP.c@{QEMP.c}!QEMP_typeof@{QEMP\_\-typeof}}
\index{QEMP_typeof@{QEMP\_\-typeof}!QEMP.c@{QEMP.c}}
\subsubsection[QEMP\_\-typeof]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{QEMP_8h_a0}{QEMP\_\-TYPEID} QEMP\_\-typeof (const LSF\_\-contribution $\ast$ {\em ctb})}}
\label{QEMP_8c_a1}


Return the type of given contribution. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em QEMP\_\-TYPEID\_\-ASC}]\item[{\em QEMP\_\-TYPEID\_\-UNKNOWN,if}]typeid is not recognized\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctb}]The ontributor to query\end{description}
\end{Desc}
\hypertarget{QEMP_8c_a3}{
\index{QEMP.c@{QEMP.c}!transfer_hdrEvt@{transfer\_\-hdrEvt}}
\index{transfer_hdrEvt@{transfer\_\-hdrEvt}!QEMP.c@{QEMP.c}}
\subsubsection[transfer\_\-hdrEvt]{\setlength{\rightskip}{0pt plus 5cm}static void transfer\_\-hdr\-Evt (\hyperlink{struct__QEMP__hdrEvt}{QEMP\_\-hdr\-Evt} $\ast$ {\em dst}, const EMP\_\-hdr\-Evt $\ast$ {\em src})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QEMP_8c_a3}


Transfer an EMP\_\-hdr\-Evt structure to a QEMP\_\-hdr\-Evt structure. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The destination QEMP\_\-hdr\-Evt structure \item[{\em src}]The source EMP\_\-hdr\-Evt structure\end{description}
\end{Desc}
