\hypertarget{LSEPW_8c}{
\section{LSEPW.c File Reference}
\label{LSEPW_8c}\index{LSEPW.c@{LSEPW.c}}
}
Manages information and adds the application specific root contribution to the output datagram. 

{\tt \#include \char`\"{}LSEPW\_\-pvtdef.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEP/LSEPW.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEP/LSEP\_\-ids.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEP/LSEP\_\-etx\-Ctb.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEP/LSEPW\_\-evt0.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEP/LSEP\_\-evt\-Bdy0.h\char`\"{}}\par
{\tt \#include \char`\"{}LSE/LSEW\_\-dgm\-Fw.h\char`\"{}}\par
{\tt \#include \char`\"{}LDT/BFP.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EDS\_\-fw.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EDS\_\-rsd.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-gem\-Locate.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/FFS.h\char`\"{}}\par
{\tt \#include $<$string.h$>$}\par


Include dependency graph for LSEPW.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=293pt]{LSEPW_8c__incl}
\end{center}
\end{figure}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{LSEPW_8c_a0}{ADVANCE}(\_\-ptr, \_\-nbytes)~(void $\ast$)(((unsigned char $\ast$)(\_\-ptr) + (\_\-nbytes)))
\begin{CompactList}\small\item\em Advance a generic pointer by the specified number of bytes. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static \_\-\_\-inline unsigned int \hyperlink{LSEPW_8c_a1}{pack\_\-rsd\-Dscs} (unsigned int $\ast$wrds, unsigned int position, unsigned int active, const EDS\_\-rsd\-Dsc dscs\mbox{[}32\mbox{]})
\begin{CompactList}\small\item\em Packs the byte length of the result summary data specified by {\em active\/} into the output bit array. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{LSEPW_8c_a2}{pack\_\-rsds} (unsigned int $\ast$wrds, unsigned int position, unsigned int active, unsigned int rsd, const EDS\_\-rsd\-Dsc dscs\mbox{[}32\mbox{]})
\begin{CompactList}\small\item\em Packs the result summary information for those handlers that are both active and have non-zero result summary data. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{LSEPW_8c_a3}{pack\_\-cfgs} (unsigned int $\ast$wrds, unsigned int position, unsigned int active, const unsigned char cfgs\mbox{[}32\mbox{]})
\begin{CompactList}\small\item\em Packs the cfgs ids specified by {\em active\/} into the output bit array. \item\end{CompactList}\item 
int \hyperlink{LSEPW_8c_a4}{LSEPW\_\-sizeof} (int level)
\begin{CompactList}\small\item\em Return the size of the LSEP data structure. \item\end{CompactList}\item 
const EDS\_\-fw\-Post\-Services $\ast$ \hyperlink{LSEPW_8c_a5}{LSEPW\_\-construct\-C} (\hyperlink{struct__LSEPW}{LSEPW} $\ast$lsepw, int level, const void $\ast$cfg, unsigned short int apid, unsigned int dgm\_\-id, LSF\_\-CPU\_\-K cpu, LSF\_\-ORIGIN\_\-K origin, unsigned int sw\_\-key, LSEW\_\-dgm\-Fw\-Poster post\-Rtn, void $\ast$post\-Prm, unsigned int $\ast$buf, int buf\_\-size)
\begin{CompactList}\small\item\em Constructs/initializes the physics application specific context. \item\end{CompactList}\item 
const EDS\_\-fw\-Post\-Services $\ast$ \hyperlink{LSEPW_8c_a6}{LSEPW\_\-construct} (\hyperlink{struct__LSEPW}{LSEPW} $\ast$lsepw, int level, unsigned short int apid, unsigned int dgm\_\-id, LSF\_\-CPU\_\-K cpu, LSF\_\-ORIGIN\_\-K origin, unsigned int sw\_\-key, LSEW\_\-dgm\-Fw\-Poster post\-Rtn, void $\ast$post\-Prm, unsigned int $\ast$buf, int buf\_\-size)
\begin{CompactList}\small\item\em Constructs/initializes the physics application specific context. \item\end{CompactList}\item 
int \hyperlink{LSEPW_8c_a7}{LSEPW\_\-start} (\hyperlink{struct__LSEPW}{LSEPW} $\ast$lsepw, LSF\_\-REASON\_\-OPEN\_\-K reason, unsigned int run\_\-id, unsigned int start\-Time, LSF\_\-MODE\_\-K mode, unsigned int hw\_\-key, unsigned int lpa\_\-key)
\begin{CompactList}\small\item\em Start or more accurately, prepare a posting stream to receive events. \item\end{CompactList}\item 
int \hyperlink{LSEPW_8c_a8}{LSEPW\_\-flush} (\hyperlink{struct__LSEPW}{LSEPW} $\ast$lsepw, int reason)
\begin{CompactList}\small\item\em Flushes the current datagram. \item\end{CompactList}\item 
int \hyperlink{LSEPW_8c_a9}{LSEPW\_\-level\-Set} (\hyperlink{struct__LSEPW}{LSEPW} $\ast$lsepw, int level)
\begin{CompactList}\small\item\em Modifies to the current working level to the minimum of {\em level\/} and the maximum allowable compression level that LSEPW is configured to. \item\end{CompactList}\item 
int \hyperlink{LSEPW_8c_a10}{LSEPW\_\-notify} (\hyperlink{struct__LSEPW}{LSEPW} $\ast$lsepw, unsigned int mode, unsigned int active, const unsigned char cfgs\mbox{[}32\mbox{]}, const EDS\_\-rsd\-Tbl $\ast$rsd\-Tbl)
\begin{CompactList}\small\item\em Called when the configuration has changed, for example by a mode change. \item\end{CompactList}\item 
unsigned int $\ast$ \hyperlink{LSEPW_8c_a11}{LSEPW\_\-ctb\-Add} (\hyperlink{struct__LSEPW}{LSEPW} $\ast$lsepw, unsigned int $\ast$cur, int len32)
\begin{CompactList}\small\item\em Adds the Physics specific context contribution to the datagram. \item\end{CompactList}\item 
int \hyperlink{LSEPW_8c_a12}{LSEPW\_\-evt\-Add} (\hyperlink{struct__LSEPW}{LSEPW} $\ast$lsepw, EDS\_\-fw\-Ixb $\ast$ixb)
\begin{CompactList}\small\item\em Formats the event specified in by the EDS\_\-fw Information Exchange block, flushing the current record to the output stream if the datagram is full. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Manages information and adds the application specific root contribution to the output datagram. 

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


\footnotesize\begin{verbatim}   CVS $Id: LSEPW.c,v 1.10 2007/02/14 06:19:23 russell Exp $
\end{verbatim}
\normalsize


\begin{Desc}
\item[Overview]This gathers all the stuff need to add both the public and private application specific contributions to the datagram. This structure should be allocated and pasted to LSEPW\_\-construct routine.\end{Desc}
\begin{Desc}
\item[Private]The private aspects are driven by the needs of event formatting and deformatting. These needs break into two pieces,\begin{enumerate}
\item Those that are static\item Those that dependent of the event data\end{enumerate}
\end{Desc}
\begin{Desc}
\item[]The private static needs are things such as the CAL pedestals used in the encoding. The dynamic needs are the compression tables that are built on the fly from the data.\end{Desc}
\begin{Desc}
\item[Public]The public aspects also fall into two pieces\begin{enumerate}
\item Those that are static\item Those that change in response to changes in the operating conditions\end{enumerate}
\end{Desc}
\begin{Desc}
\item[]The public static needs are things such as the file keys for the relevant configuration files, LATc, LPA\_\-DB, etc. The dynamics needs are the list of active handlers and their active configuration.\end{Desc}
\begin{Desc}
\item[]The challenge is how to gather this information and, particularly, for those values that change when the conditions change, to decide how to update the information. Here one has to choices\end{Desc}
\begin{enumerate}
\item Query EDS\_\-fw everytime the information is needed\item Have EDS\_\-fw notify one of such at change.\end{enumerate}


\subsection{Define Documentation}
\hypertarget{LSEPW_8c_a0}{
\index{LSEPW.c@{LSEPW.c}!ADVANCE@{ADVANCE}}
\index{ADVANCE@{ADVANCE}!LSEPW.c@{LSEPW.c}}
\subsubsection[ADVANCE]{\setlength{\rightskip}{0pt plus 5cm}\#define ADVANCE(\_\-ptr, \_\-nbytes)~(void $\ast$)(((unsigned char $\ast$)(\_\-ptr) + (\_\-nbytes)))}}
\label{LSEPW_8c_a0}


Advance a generic pointer by the specified number of bytes. 

\begin{Desc}
\item[Returns:]The advanced pointer, recast to a void\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-ptr}]The pointer to advance \item[{\em \_\-nbytes}]The nubmer of bytes to advance\end{description}
\end{Desc}


\subsection{Function Documentation}
\hypertarget{LSEPW_8c_a6}{
\index{LSEPW.c@{LSEPW.c}!LSEPW_construct@{LSEPW\_\-construct}}
\index{LSEPW_construct@{LSEPW\_\-construct}!LSEPW.c@{LSEPW.c}}
\subsubsection[LSEPW\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}const EDS\_\-fw\-Post\-Services$\ast$ LSEPW\_\-construct (\hyperlink{struct__LSEPW}{LSEPW} $\ast$ {\em lsepw}, int {\em level}, unsigned short int {\em apid}, unsigned int {\em dgm\_\-id}, LSF\_\-CPU\_\-K {\em cpu}, LSF\_\-ORIGIN\_\-K {\em origin}, unsigned int {\em sw\_\-key}, LSEW\_\-dgm\-Fw\-Poster {\em post\-Rtn}, void $\ast$ {\em post\-Prm}, unsigned int $\ast$ {\em buf}, int {\em buf\_\-size})}}
\label{LSEPW_8c_a6}


Constructs/initializes the physics application specific context. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lsepw}]The physics application specific context to construct \item[{\em level}]The maximum compression level that will be used \item[{\em apid}]The application id to use in the CCSDS packets \item[{\em dgm\_\-id}]The LAT Science Format Data Id (LSF) to use \item[{\em cpu}]The originating CPU \item[{\em origin}]The data source type \item[{\em sw\_\-key}]The master software configuration key; this is the key to the Secondary Boot File. \item[{\em post\-Rtn}]Routine used to post a formatted event \item[{\em post\-Prm}]Parameter passed to the post routine \item[{\em buf}]The first, preallocated buffer to fill \item[{\em buf\_\-size}]The size, in bytes, of the ouptut buffer. Events will be packed into this buffer until full\end{description}
\end{Desc}
\hypertarget{LSEPW_8c_a5}{
\index{LSEPW.c@{LSEPW.c}!LSEPW_constructC@{LSEPW\_\-constructC}}
\index{LSEPW_constructC@{LSEPW\_\-constructC}!LSEPW.c@{LSEPW.c}}
\subsubsection[LSEPW\_\-constructC]{\setlength{\rightskip}{0pt plus 5cm}const EDS\_\-fw\-Post\-Services$\ast$ LSEPW\_\-construct\-C (\hyperlink{struct__LSEPW}{LSEPW} $\ast$ {\em lsepw}, int {\em level}, const void $\ast$ {\em cfg}, unsigned short int {\em apid}, unsigned int {\em dgm\_\-id}, LSF\_\-CPU\_\-K {\em cpu}, LSF\_\-ORIGIN\_\-K {\em origin}, unsigned int {\em sw\_\-key}, LSEW\_\-dgm\-Fw\-Poster {\em post\-Rtn}, void $\ast$ {\em post\-Prm}, unsigned int $\ast$ {\em buf}, int {\em buf\_\-size})}}
\label{LSEPW_8c_a5}


Constructs/initializes the physics application specific context. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lsepw}]The physics application specific context to construct \item[{\em level}]The maximum compression level that will be used \item[{\em cfg}]Level level specific configuration parameters \item[{\em apid}]The application id to use in the CCSDS packets \item[{\em dgm\_\-id}]The LAT Science Format Data Id (LSF) to use \item[{\em cpu}]The originating CPU \item[{\em origin}]The data source type \item[{\em sw\_\-key}]The master software configuration key; this is the key to the Secondary Boot File. \item[{\em post\-Rtn}]Routine used to post a formatted event \item[{\em post\-Prm}]Parameter passed to the post routine \item[{\em buf}]The first, preallocated buffer to fill \item[{\em buf\_\-size}]The size, in bytes, of the ouptut buffer. Events will be packed into this buffer until full\end{description}
\end{Desc}
This routine is something of a royal kludge. The original call for LSEPW\_\-construct did not include a configuration parameter. To keep things backwardly compatiable, this routine was invented. It should be become LSEPW\_\-construct if a reorganization permits it.\hypertarget{LSEPW_8c_a11}{
\index{LSEPW.c@{LSEPW.c}!LSEPW_ctbAdd@{LSEPW\_\-ctbAdd}}
\index{LSEPW_ctbAdd@{LSEPW\_\-ctbAdd}!LSEPW.c@{LSEPW.c}}
\subsubsection[LSEPW\_\-ctbAdd]{\setlength{\rightskip}{0pt plus 5cm}unsigned int$\ast$ LSEPW\_\-ctb\-Add (\hyperlink{struct__LSEPW}{LSEPW} $\ast$ {\em lsepw}, unsigned int $\ast$ {\em cur}, int {\em len32})}}
\label{LSEPW_8c_a11}


Adds the Physics specific context contribution to the datagram. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lsepw}]The physics application specific context \item[{\em cur}]Pointer to the where to add the informaton \item[{\em len32}]The length, in 32-bit words, of the available space in the datagram\end{description}
\end{Desc}
\hypertarget{LSEPW_8c_a12}{
\index{LSEPW.c@{LSEPW.c}!LSEPW_evtAdd@{LSEPW\_\-evtAdd}}
\index{LSEPW_evtAdd@{LSEPW\_\-evtAdd}!LSEPW.c@{LSEPW.c}}
\subsubsection[LSEPW\_\-evtAdd]{\setlength{\rightskip}{0pt plus 5cm}int LSEPW\_\-evt\-Add (\hyperlink{struct__LSEPW}{LSEPW} $\ast$ {\em lsepw}, EDS\_\-fw\-Ixb $\ast$ {\em ixb})}}
\label{LSEPW_8c_a12}


Formats the event specified in by the EDS\_\-fw Information Exchange block, flushing the current record to the output stream if the datagram is full. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lsepw}]The physics application specific context \item[{\em ixb}]The Information Exchange Block\end{description}
\end{Desc}
\hypertarget{LSEPW_8c_a8}{
\index{LSEPW.c@{LSEPW.c}!LSEPW_flush@{LSEPW\_\-flush}}
\index{LSEPW_flush@{LSEPW\_\-flush}!LSEPW.c@{LSEPW.c}}
\subsubsection[LSEPW\_\-flush]{\setlength{\rightskip}{0pt plus 5cm}int LSEPW\_\-flush (\hyperlink{struct__LSEPW}{LSEPW} $\ast$ {\em lsepw}, int {\em reason})}}
\label{LSEPW_8c_a8}


Flushes the current datagram. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lsepw}]The physics application specific context \item[{\em reason}]The reason for the flush\end{description}
\end{Desc}
\hypertarget{LSEPW_8c_a9}{
\index{LSEPW.c@{LSEPW.c}!LSEPW_levelSet@{LSEPW\_\-levelSet}}
\index{LSEPW_levelSet@{LSEPW\_\-levelSet}!LSEPW.c@{LSEPW.c}}
\subsubsection[LSEPW\_\-levelSet]{\setlength{\rightskip}{0pt plus 5cm}int LSEPW\_\-level\-Set (\hyperlink{struct__LSEPW}{LSEPW} $\ast$ {\em lsepw}, int {\em level})}}
\label{LSEPW_8c_a9}


Modifies to the current working level to the minimum of {\em level\/} and the maximum allowable compression level that LSEPW is configured to. 

\begin{Desc}
\item[Returns:]The actual level is was set to, {\em i.e\/}. the minimum of {\em level\/} and the maximum allowable compression level. On failure this value is -1.\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lsepw}]The physics application specific context \item[{\em level}]The new compression level\end{description}
\end{Desc}
\hypertarget{LSEPW_8c_a10}{
\index{LSEPW.c@{LSEPW.c}!LSEPW_notify@{LSEPW\_\-notify}}
\index{LSEPW_notify@{LSEPW\_\-notify}!LSEPW.c@{LSEPW.c}}
\subsubsection[LSEPW\_\-notify]{\setlength{\rightskip}{0pt plus 5cm}int LSEPW\_\-notify (\hyperlink{struct__LSEPW}{LSEPW} $\ast$ {\em lsepw}, unsigned int {\em mode}, unsigned int {\em active}, const unsigned char {\em cfgs}\mbox{[}32\mbox{]}, const EDS\_\-rsd\-Tbl $\ast$ {\em rsd\-Tbl})}}
\label{LSEPW_8c_a10}


Called when the configuration has changed, for example by a mode change. 

\begin{Desc}
\item[Returns:]0 if successful, non-zero if not\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lsepw}]The physics application specific context \item[{\em mode}]The new mode \item[{\em active}]The list of active handlers \item[{\em cfgs}]The current configuration for each handler. \item[{\em rsd\-Tbl}]The result summary data table\end{description}
\end{Desc}
\hypertarget{LSEPW_8c_a4}{
\index{LSEPW.c@{LSEPW.c}!LSEPW_sizeof@{LSEPW\_\-sizeof}}
\index{LSEPW_sizeof@{LSEPW\_\-sizeof}!LSEPW.c@{LSEPW.c}}
\subsubsection[LSEPW\_\-sizeof]{\setlength{\rightskip}{0pt plus 5cm}int LSEPW\_\-sizeof (int {\em level})}}
\label{LSEPW_8c_a4}


Return the size of the LSEP data structure. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em level}]The maximum compression level that will be used. Resources will be allocated consistent with supporting events written in this and all lesser compression levels.\end{description}
\end{Desc}
\hypertarget{LSEPW_8c_a7}{
\index{LSEPW.c@{LSEPW.c}!LSEPW_start@{LSEPW\_\-start}}
\index{LSEPW_start@{LSEPW\_\-start}!LSEPW.c@{LSEPW.c}}
\subsubsection[LSEPW\_\-start]{\setlength{\rightskip}{0pt plus 5cm}int LSEPW\_\-start (\hyperlink{struct__LSEPW}{LSEPW} $\ast$ {\em lsepw}, LSF\_\-REASON\_\-OPEN\_\-K {\em reason}, unsigned int {\em run\_\-id}, unsigned int {\em start\-Time}, LSF\_\-MODE\_\-K {\em mode}, unsigned int {\em hw\_\-key}, unsigned int {\em lpa\_\-key})}}
\label{LSEPW_8c_a7}


Start or more accurately, prepare a posting stream to receive events. 

\begin{Desc}
\item[Returns:]Status, currectly what LSEW\_\-dgm\-Fw\-Run\-Start returns.\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lsepw}]The physics application specific context \item[{\em reason}]The reason why this run is being started \item[{\em run\_\-id}]The run identifier. Only the first 24-bits are used. \item[{\em start\-Time}]The run start time rounded to the nearest second \item[{\em mode}]The operational mode \item[{\em hw\_\-key}]The master hardware configuraion key; this is the key to the LATc file \item[{\em lpa\_\-key}]The LPA\_\-DB file key\end{description}
\end{Desc}
\hypertarget{LSEPW_8c_a3}{
\index{LSEPW.c@{LSEPW.c}!pack_cfgs@{pack\_\-cfgs}}
\index{pack_cfgs@{pack\_\-cfgs}!LSEPW.c@{LSEPW.c}}
\subsubsection[pack\_\-cfgs]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int pack\_\-cfgs (unsigned int $\ast$ {\em wrds}, unsigned int {\em position}, unsigned int {\em active}, const unsigned char {\em cfgs}\mbox{[}32\mbox{]})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LSEPW_8c_a3}


Packs the cfgs ids specified by {\em active\/} into the output bit array. 

\begin{Desc}
\item[Returns:]The new bit position in the output buffer\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em wrds}]The beginning of 32-bit output buffer \item[{\em position}]The current bit position in the output buffer \item[{\em active}]Bit mask indicating which of the elements of {\em cfgs\/} should be packed \item[{\em cfgs}]The array of up-to 32 configuration ids of the handlers\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]This piece of code assumes that active is non-zero\end{Desc}
\hypertarget{LSEPW_8c_a1}{
\index{LSEPW.c@{LSEPW.c}!pack_rsdDscs@{pack\_\-rsdDscs}}
\index{pack_rsdDscs@{pack\_\-rsdDscs}!LSEPW.c@{LSEPW.c}}
\subsubsection[pack\_\-rsdDscs]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int pack\_\-rsd\-Dscs (unsigned int $\ast$ {\em wrds}, unsigned int {\em position}, unsigned int {\em active}, const EDS\_\-rsd\-Dsc {\em dscs}\mbox{[}32\mbox{]})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LSEPW_8c_a1}


Packs the byte length of the result summary data specified by {\em active\/} into the output bit array. 

\begin{Desc}
\item[Returns:]The new bit position in the output buffer\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em wrds}]The beginning of 32-bit output buffer \item[{\em position}]The current bit position in the output buffer \item[{\em active}]Bit mask indicating which of the elements of {\em rsd\-Dscs\/} should be packed \item[{\em dscs}]The result summary data descriptor array\end{description}
\end{Desc}
\hypertarget{LSEPW_8c_a2}{
\index{LSEPW.c@{LSEPW.c}!pack_rsds@{pack\_\-rsds}}
\index{pack_rsds@{pack\_\-rsds}!LSEPW.c@{LSEPW.c}}
\subsubsection[pack\_\-rsds]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int pack\_\-rsds (unsigned int $\ast$ {\em wrds}, unsigned int {\em position}, unsigned int {\em active}, unsigned int {\em rsd}, const EDS\_\-rsd\-Dsc {\em dscs}\mbox{[}32\mbox{]})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LSEPW_8c_a2}


Packs the result summary information for those handlers that are both active and have non-zero result summary data. 

\begin{Desc}
\item[Returns:]The new bit position in the output buffer\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em wrds}]The beginning of 32-bit output buffer \item[{\em position}]The current bit position in the output buffer \item[{\em active}]The defining set of bits, {\em i\/},e. set of all handlers \item[{\em rsd}]The set of handlers with non-zero result summary data. This bit list is collapsed by removing all the corresponding bits in {\em active\/} that are zero. Since only active handlers can contribute result summary data, the set is reduced to only the active handlers. Thus for each set bit in {\em active\/} a result bit is emitted that is 0/1 if that handler does/does not produce any summary data. \item[{\em dscs}]The result summary data descriptor array\end{description}
\end{Desc}
\begin{Desc}
\item[]This routine composes a bit field from {\em fld2\/} considering only the set bits in fld1. For every bit set in {\em fld1\/}, a bit is added to the output which is set to 0/1 if the corresponding bit in fld2 is not/is set. The resulting bits are packed into the output buffer.\end{Desc}
