\hypertarget{CDFP_8c}{
\section{CDFP.c File Reference}
\label{CDFP_8c}\index{CDFP.c@{CDFP.c}}
}
Generic compression routines. 

{\tt \#include \char`\"{}LSEP/LSEP\_\-ids.h\char`\"{}}\par
{\tt \#include \char`\"{}CDFP.h\char`\"{}}\par
{\tt \#include \char`\"{}CDFP\_\-def.h\char`\"{}}\par
{\tt \#include \char`\"{}LSE/CDF\_\-esb.h\char`\"{}}\par
{\tt \#include \char`\"{}LSE/CDF\_\-gem.h\char`\"{}}\par
{\tt \#include \char`\"{}LSE/CDF\_\-acd.h\char`\"{}}\par
{\tt \#include \char`\"{}LSE/CDF\_\-cal.h\char`\"{}}\par
{\tt \#include \char`\"{}LSE/CDF\_\-tkr.h\char`\"{}}\par
{\tt \#include \char`\"{}LSE/CDF\_\-dgn.h\char`\"{}}\par
{\tt \#include \char`\"{}LSE/CDF\_\-err.h\char`\"{}}\par
{\tt \#include \char`\"{}LDT/HDE.h\char`\"{}}\par
{\tt \#include $<$string.h$>$}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{CDFP_8c_a81786130c3c12617fb7aeff2e7408a9}{
\#define \textbf{RND8N}(\_\-n)~(((\_\-n) + 7) \& $\sim$7)}
\label{CDFP_8c_a81786130c3c12617fb7aeff2e7408a9}

\item 
\hypertarget{CDFP_8c_fa56f1aeb167c47bc00e8f6c2f31acc5}{
\#define \textbf{RND8P}(\_\-p)~((void $\ast$)(((unsigned int)(\_\-p) + 7) \& $\sim$7))}
\label{CDFP_8c_fa56f1aeb167c47bc00e8f6c2f31acc5}

\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static \_\-\_\-inline unsigned int $\ast$ \hyperlink{CDFP_8c_f39a62b3f0e76aa678ceb05d592b378c}{composeCtb} (\hyperlink{struct__CDFP__ctxCtb}{CDFP\_\-ctxCtb} $\ast$ctb, const \hyperlink{struct__CDFP__ctx}{CDFP\_\-ctx} $\ast$cdfp)
\begin{CompactList}\small\item\em Composes the CDF LSF contribution. \item\end{CompactList}\item 
int \hyperlink{CDFP_8c_3ff2ed8c5457589e295cb85cb0a07a64}{CDFP\_\-cfg\_\-sizeof} (int level)
\begin{CompactList}\small\item\em Returns the size, in bytes, of the compression configuration needed to support the specified compression level. \item\end{CompactList}\item 
int \hyperlink{CDFP_8c_1d002a5dec5a83237225e474d2f92a37}{CDFP\_\-cfg\_\-construct} (\hyperlink{struct__CDFP__cfg}{CDFP\_\-cfg} $\ast$cfg, int level)
\begin{CompactList}\small\item\em Constructs (initializes) the compression configuration for the appropriate level. \item\end{CompactList}\item 
int \hyperlink{CDFP_8c_159f9b4936e044f34ec6baad8f42b5bf}{CDFP\_\-sizeof} (int level, void $\ast$cfg)
\begin{CompactList}\small\item\em Returns the size, in bytes, of the compression structure needed to supprot the specified compression level. \item\end{CompactList}\item 
int \hyperlink{CDFP_8c_8f0a2b41ac9b8a3d96a2d1a450e64eb0}{CDFP\_\-construct} (\hyperlink{struct__CDFP__ctx}{CDFP\_\-ctx} $\ast$cdfp, int level, const \hyperlink{struct__CDFP__cfg}{CDFP\_\-cfg} $\ast$cfg, LSEW\_\-dgmFw $\ast$dgmFw, \hyperlink{struct__LSEPW}{LSEPW} $\ast$lsepw)
\begin{CompactList}\small\item\em Constructs (initializes) the compression structure for the appropriate level. \item\end{CompactList}\item 
unsigned int $\ast$ \hyperlink{CDFP_8c_abfd56d3c96ccfd1637f9f8b746014c4}{CDFP\_\-begin\_\-add} (\hyperlink{struct__CDFP__ctx}{CDFP\_\-ctx} $\ast$cdfp, unsigned int $\ast$beg, unsigned int len32)
\begin{CompactList}\small\item\em Begin datagram callback routine. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Generic compression routines. 

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


\footnotesize\begin{verbatim}

   CVS $Id: CDFP.c,v 1.4 2009/04/30 22:49:50 russell Exp $
\end{verbatim}
\normalsize
 

\subsection{Function Documentation}
\hypertarget{CDFP_8c_abfd56d3c96ccfd1637f9f8b746014c4}{
\index{CDFP.c@{CDFP.c}!CDFP_begin_add@{CDFP\_\-begin\_\-add}}
\index{CDFP_begin_add@{CDFP\_\-begin\_\-add}!CDFP.c@{CDFP.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int$\ast$ CDFP\_\-begin\_\-add ({\bf CDFP\_\-ctx} $\ast$ {\em cdfp}, unsigned int $\ast$ {\em beg}, unsigned int {\em len32})}}
\label{CDFP_8c_abfd56d3c96ccfd1637f9f8b746014c4}


Begin datagram callback routine. 

\begin{Desc}
\item[Returns:]Pointer to the next write location\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cdfp}]The Compressed Data Format handle \item[{\em beg}]The output buffer \item[{\em len32}]The amount of space, in 32-bit words, available in the output buffer \end{description}
\end{Desc}
\hypertarget{CDFP_8c_1d002a5dec5a83237225e474d2f92a37}{
\index{CDFP.c@{CDFP.c}!CDFP_cfg_construct@{CDFP\_\-cfg\_\-construct}}
\index{CDFP_cfg_construct@{CDFP\_\-cfg\_\-construct}!CDFP.c@{CDFP.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int CDFP\_\-cfg\_\-construct ({\bf CDFP\_\-cfg} $\ast$ {\em cfg}, int {\em level})}}
\label{CDFP_8c_1d002a5dec5a83237225e474d2f92a37}


Constructs (initializes) the compression configuration for the appropriate level. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cfg}]The compression configuratin to initialize \item[{\em level}]The maximum compression level that needs supporting\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]It is assumed that the caller has used CDFP\_\-cfg\_\-sizeof to determine the amount of storage that is needed and, thus, has assured that the {\em cfg\/} structure is adequately sized. \end{Desc}
\hypertarget{CDFP_8c_3ff2ed8c5457589e295cb85cb0a07a64}{
\index{CDFP.c@{CDFP.c}!CDFP_cfg_sizeof@{CDFP\_\-cfg\_\-sizeof}}
\index{CDFP_cfg_sizeof@{CDFP\_\-cfg\_\-sizeof}!CDFP.c@{CDFP.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int CDFP\_\-cfg\_\-sizeof (int {\em level})}}
\label{CDFP_8c_3ff2ed8c5457589e295cb85cb0a07a64}


Returns the size, in bytes, of the compression configuration needed to support the specified compression level. 

\begin{Desc}
\item[Returns:]The size, in bytes, of the compression configuration\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em level}]The maximum compression level to support \end{description}
\end{Desc}
\hypertarget{CDFP_8c_8f0a2b41ac9b8a3d96a2d1a450e64eb0}{
\index{CDFP.c@{CDFP.c}!CDFP_construct@{CDFP\_\-construct}}
\index{CDFP_construct@{CDFP\_\-construct}!CDFP.c@{CDFP.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int CDFP\_\-construct ({\bf CDFP\_\-ctx} $\ast$ {\em cdfp}, int {\em level}, const {\bf CDFP\_\-cfg} $\ast$ {\em cfg}, LSEW\_\-dgmFw $\ast$ {\em dgmFw}, {\bf LSEPW} $\ast$ {\em lsepw})}}
\label{CDFP_8c_8f0a2b41ac9b8a3d96a2d1a450e64eb0}


Constructs (initializes) the compression structure for the appropriate level. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cdfp}]The compression context to initialize \item[{\em level}]The maximum compression level that needs supporting \item[{\em cfg}]Target specific configuration parameter \item[{\em dgmFw}]The datagram framework handle \item[{\em lsepw}]The generic LSEPW services\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]It is assumed that the called has used CDFP\_\-sizeof to determine the amount of storage that is needed and, thus, has assured that the {\em cmp\/} structure is adequately sized. \end{Desc}
\hypertarget{CDFP_8c_159f9b4936e044f34ec6baad8f42b5bf}{
\index{CDFP.c@{CDFP.c}!CDFP_sizeof@{CDFP\_\-sizeof}}
\index{CDFP_sizeof@{CDFP\_\-sizeof}!CDFP.c@{CDFP.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int CDFP\_\-sizeof (int {\em level}, void $\ast$ {\em cfg})}}
\label{CDFP_8c_159f9b4936e044f34ec6baad8f42b5bf}


Returns the size, in bytes, of the compression structure needed to supprot the specified compression level. 

\begin{Desc}
\item[Returns:]The size, in bytes, of the compression structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em level}]The maximum compression level to support \item[{\em cfg}]Level specific configuration parameter \end{description}
\end{Desc}
\hypertarget{CDFP_8c_f39a62b3f0e76aa678ceb05d592b378c}{
\index{CDFP.c@{CDFP.c}!composeCtb@{composeCtb}}
\index{composeCtb@{composeCtb}!CDFP.c@{CDFP.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int $\ast$ composeCtb ({\bf CDFP\_\-ctxCtb} $\ast$ {\em ctb}, const {\bf CDFP\_\-ctx} $\ast$ {\em cdfp})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{CDFP_8c_f39a62b3f0e76aa678ceb05d592b378c}


Composes the CDF LSF contribution. 

\begin{Desc}
\item[Returns:]Pointer to the next fill location\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctb}]The contribution to fill \item[{\em cdfp}]The Compression Data Formatting Physics context \end{description}
\end{Desc}
