\hypertarget{LPA_8c}{
\section{LPA.c File Reference}
\label{LPA_8c}\index{LPA.c@{LPA.c}}
}
LAT Physics Acquisition Event delivery and output management. 

{\tt \#include \char`\"{}LPA\_\-prvdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}LPA\_\-utils.h\char`\"{}}\par
{\tt \#include \char`\"{}LPA\_\-grb\_\-post\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}LPA\_\-DB/LPA\_\-DB\_\-schema.h\char`\"{}}\par
{\tt \#include \char`\"{}LPA/LPA\_\-msgs.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/FPA.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/FORK.h\char`\"{}}\par
{\tt \#include \char`\"{}LCBD/LCB.h\char`\"{}}\par
{\tt \#include \char`\"{}LCBD/LCBD.h\char`\"{}}\par
{\tt \#include \char`\"{}LCBD/LCBD\_\-cr.h\char`\"{}}\par
{\tt \#include \char`\"{}LCBD/LCBD\_\-evt.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EDS\_\-fw.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EDS\_\-fw\-Services.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/TMR.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/LCBV.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/FFS.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/io/LCBP.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS\_\-DB/EDS\_\-DB\_\-schema.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-match.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-pkt.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-ebw.h\char`\"{}}\par
{\tt \#include \char`\"{}LSE/LSEW\_\-dgm\-Fw.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEP/LSEPW.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-ids.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-cpu.h\char`\"{}}\par
{\tt \#include \char`\"{}CDM/CDM\_\-pubdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}CMX/CMX\_\-lookup\-Pub.h\char`\"{}}\par
{\tt \#include \char`\"{}MSG/MSG\_\-pubdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}ITC/ITC\_\-pubdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}LCS/LCS\_\-pubdefs.h\char`\"{}}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$string.h$>$}\par


Include dependency graph for LPA.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=328pt]{LPA_8c__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__LPA__handler}{\_\-LPA\_\-handler}
\begin{CompactList}\small\item\em Contains the parameters specifying how to install an event handler. \item\end{CompactList}\item 
struct \hyperlink{struct__LPA__poster}{\_\-LPA\_\-poster}
\begin{CompactList}\small\item\em Contains the parameters specifying how to output events. \item\end{CompactList}\item 
struct \hyperlink{struct__LPA__installation}{\_\-LPA\_\-installation}
\begin{CompactList}\small\item\em The installation specification. \item\end{CompactList}\item 
struct \hyperlink{struct__LPA}{\_\-LPA}
\begin{CompactList}\small\item\em The LPA control structure. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{LPA_8c_a0}{
typedef \hyperlink{struct__LPA__handler}{\_\-LPA\_\-handler} \hyperlink{LPA_8c_a0}{LPA\_\-handler}}
\label{LPA_8c_a0}

\begin{CompactList}\small\item\em Typedef for struct \_\-LPA\_\-hander. \item\end{CompactList}\item 
\hypertarget{LPA_8c_a1}{
typedef \hyperlink{struct__LPA__poster}{\_\-LPA\_\-poster} \hyperlink{LPA_8c_a1}{LPA\_\-poster}}
\label{LPA_8c_a1}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__LPA__poster}{\_\-LPA\_\-poster}. \item\end{CompactList}\item 
\hypertarget{LPA_8c_a2}{
typedef \hyperlink{struct__LPA__installation}{\_\-LPA\_\-installation} \hyperlink{LPA_8c_a2}{LPA\_\-installation}}
\label{LPA_8c_a2}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__LPA__installation}{\_\-LPA\_\-installation}. \item\end{CompactList}\item 
\hypertarget{LPA_8c_a3}{
typedef \hyperlink{struct__LPA}{\_\-LPA} \hyperlink{LPA_8c_a3}{LPA}}
\label{LPA_8c_a3}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__LPA}{\_\-LPA}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static unsigned int \hyperlink{LPA_8c_a4}{LPA\_\-config\-Output} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, LPA\_\-DB\_\-Schema $\ast$schema)
\begin{CompactList}\small\item\em Configures the output routine. \item\end{CompactList}\item 
static unsigned int \hyperlink{LPA_8c_a5}{LPA\_\-config\-Handlers} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, LPA\_\-DB\_\-Schema $\ast$schema, unsigned int instance)
\begin{CompactList}\small\item\em Configures the event handlers. \item\end{CompactList}\item 
static unsigned int \hyperlink{LPA_8c_a6}{LPA\_\-install} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, unsigned int list, unsigned int instance)
\begin{CompactList}\small\item\em Install configured handlers into the EDS framework. \item\end{CompactList}\item 
static unsigned int \hyperlink{LPA_8c_a7}{LPA\_\-translate} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, unsigned int handlers)
\begin{CompactList}\small\item\em Translates an LPA handler mask to an EDS handler mask. \item\end{CompactList}\item 
static \_\-\_\-inline int \hyperlink{LPA_8c_a8}{LPA\_\-is\-First\-Pkt} (const EBF\_\-pkt $\ast$pkt)
\begin{CompactList}\small\item\em Determine if packet is the first of an event. \item\end{CompactList}\item 
static \_\-\_\-inline int \hyperlink{LPA_8c_a9}{LPA\_\-is\-Last\-Pkt} (unsigned int edw)
\begin{CompactList}\small\item\em Determine if packet is the last of an event. \item\end{CompactList}\item 
int \hyperlink{LPA_8c_a10}{LPA\_\-start\-Marker\-Process} (void $\ast$prm, unsigned int edw, LCBD\_\-evt $\ast$lcb\_\-pkt)
\begin{CompactList}\small\item\em The start marker event handler callback This routine intercepts marker events and notifies LPA. \item\end{CompactList}\item 
int \hyperlink{LPA_8c_a11}{LPA\_\-stop\-Marker\-Process} (void $\ast$prm, unsigned int edw, LCBD\_\-evt $\ast$lcb\_\-pkt)
\begin{CompactList}\small\item\em The stop marker event handler callback This routine intercepts marker events and notifies LPA. \item\end{CompactList}\item 
\hyperlink{struct__LPA}{LPA} $\ast$ \hyperlink{LPA_8c_a12}{LPA\_\-construct} (\hyperlink{LPA__prvdefs_8h_a13}{LPA\_\-Resp\-Cb} cb)
\begin{CompactList}\small\item\em Preinitializes an LPA control block. \item\end{CompactList}\item 
void \hyperlink{LPA_8c_a13}{LPA\_\-destruct} (void $\ast$lpa)
\begin{CompactList}\small\item\em Destroys an LPA control block. \item\end{CompactList}\item 
int \hyperlink{LPA_8c_a14}{LPA\_\-connect\_\-start\_\-marker} (\hyperlink{struct__LPA}{LPA} $\ast$lpa)
\begin{CompactList}\small\item\em Connects the LCB's event callback handler to the LPA start marker event handler. \item\end{CompactList}\item 
int \hyperlink{LPA_8c_a15}{LPA\_\-connect\_\-stop\_\-marker} (\hyperlink{struct__LPA}{LPA} $\ast$lpa)
\begin{CompactList}\small\item\em Connects the LCB's event callback handler to the LPA marker event handler. \item\end{CompactList}\item 
int \hyperlink{LPA_8c_a16}{LPA\_\-connect\_\-eds} (\hyperlink{struct__LPA}{LPA} $\ast$lpa)
\begin{CompactList}\small\item\em Connects the LCB's event callback handler to the Event Delivery Service's handler. \item\end{CompactList}\item 
int \hyperlink{LPA_8c_a17}{LPA\_\-disconnect} (\hyperlink{struct__LPA}{LPA} $\ast$lpa)
\begin{CompactList}\small\item\em Disconnects the LCB's event callback handler from the active event handler callback and restores the original handler. \item\end{CompactList}\item 
unsigned int \hyperlink{LPA_8c_a18}{LPA\_\-configure} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, const LPA\_\-DB\_\-Schema $\ast$schema, unsigned int instance, unsigned int sbc\_\-key)
\begin{CompactList}\small\item\em Configures datagram, output, and handlers for LPA. \item\end{CompactList}\item 
unsigned int \hyperlink{LPA_8c_a19}{LPA\_\-start\-Run} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, unsigned int run\_\-id, unsigned int mode, unsigned int time, unsigned int reason, unsigned int latc\_\-key, unsigned int lpa\_\-key)
\begin{CompactList}\small\item\em Start the physics acquisition run. \item\end{CompactList}\item 
unsigned int \hyperlink{LPA_8c_a20}{LPA\_\-change\_\-handlers} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, unsigned int new\-State, unsigned int handlers)
\begin{CompactList}\small\item\em Requests enabling/disabling of the specified list of handlers. \item\end{CompactList}\item 
unsigned int \hyperlink{LPA_8c_a21}{LPA\_\-change\_\-eds\_\-out} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, unsigned int new\-State, unsigned int streams)
\begin{CompactList}\small\item\em Requests state change for the specified output streams. \item\end{CompactList}\item 
unsigned int \hyperlink{LPA_8c_a22}{LPA\_\-change\_\-post\_\-out} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, unsigned int new\-State)
\begin{CompactList}\small\item\em Requests state change for the specified output streams. \item\end{CompactList}\item 
unsigned int \hyperlink{LPA_8c_a23}{LPA\_\-get\_\-post\_\-count} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, unsigned int out\_\-type)
\begin{CompactList}\small\item\em Get the output post count. \item\end{CompactList}\item 
unsigned int \hyperlink{LPA_8c_a24}{LPA\_\-change\_\-compress} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, unsigned int level, unsigned int $\ast$set\_\-level)
\begin{CompactList}\small\item\em Requests a change for the specified compression level. \item\end{CompactList}\item 
unsigned int \hyperlink{LPA_8c_a25}{LPA\_\-select} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, unsigned int mode)
\begin{CompactList}\small\item\em Changes mode for the specified list of handlers. \item\end{CompactList}\item 
unsigned int \hyperlink{LPA_8c_a26}{LPA\_\-mode\-Associate} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, unsigned int handlers, unsigned int mode, unsigned int cfg\_\-id)
\begin{CompactList}\small\item\em Associate a mode with a set of handlers. \item\end{CompactList}\item 
unsigned int \hyperlink{LPA_8c_a27}{LPA\_\-flush} (\hyperlink{struct__LPA}{LPA} $\ast$lpa, unsigned int handlers, unsigned int reason)
\begin{CompactList}\small\item\em Requests the specified list of handlers to flush their output. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
LAT Physics Acquisition Event delivery and output management. 

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


\footnotesize\begin{verbatim}    CVS $Id: LPA.c,v 1.18 2007/04/06 18:13:43 smaldona Exp $
   \end{verbatim}
\normalsize


\subsection{Function Documentation}
\hypertarget{LPA_8c_a24}{
\index{LPA.c@{LPA.c}!LPA_change_compress@{LPA\_\-change\_\-compress}}
\index{LPA_change_compress@{LPA\_\-change\_\-compress}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-change\_\-compress]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LPA\_\-change\_\-compress (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, unsigned int {\em level}, unsigned int $\ast$ {\em set\_\-level})}}
\label{LPA_8c_a24}


Requests a change for the specified compression level. 

\begin{Desc}
\item[Returns:]Compression level set\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure \item[{\em level}]The requested compression level \item[{\em set\_\-level}]Storage for actual value applied\end{description}
\end{Desc}
\hypertarget{LPA_8c_a21}{
\index{LPA.c@{LPA.c}!LPA_change_eds_out@{LPA\_\-change\_\-eds\_\-out}}
\index{LPA_change_eds_out@{LPA\_\-change\_\-eds\_\-out}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-change\_\-eds\_\-out]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LPA\_\-change\_\-eds\_\-out (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, unsigned int {\em new\-State}, unsigned int {\em streams})}}
\label{LPA_8c_a21}


Requests state change for the specified output streams. 

\begin{Desc}
\item[Returns:]A list, in the form of a bit mask, of the previous state\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure \item[{\em new\-State}]The EDS post streams state \item[{\em streams}]The LPA post streams to change\end{description}
\end{Desc}
\hypertarget{LPA_8c_a20}{
\index{LPA.c@{LPA.c}!LPA_change_handlers@{LPA\_\-change\_\-handlers}}
\index{LPA_change_handlers@{LPA\_\-change\_\-handlers}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-change\_\-handlers]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LPA\_\-change\_\-handlers (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, unsigned int {\em new\-State}, unsigned int {\em handlers})}}
\label{LPA_8c_a20}


Requests enabling/disabling of the specified list of handlers. 

\begin{Desc}
\item[Returns:]A list, in the form of a bit mask, of the previously enabled handlers\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure \item[{\em new\-State}]A list, in the form of a bit mask, of the new state of the target list of handlers (0=Disable, 1=Enable) \item[{\em handlers}]A list, in the form of a bit mask, of the target list handlers. Only those handlers with a set bit will be affected.\end{description}
\end{Desc}
\hypertarget{LPA_8c_a22}{
\index{LPA.c@{LPA.c}!LPA_change_post_out@{LPA\_\-change\_\-post\_\-out}}
\index{LPA_change_post_out@{LPA\_\-change\_\-post\_\-out}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-change\_\-post\_\-out]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LPA\_\-change\_\-post\_\-out (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, unsigned int {\em new\-State})}}
\label{LPA_8c_a22}


Requests state change for the specified output streams. 

\begin{Desc}
\item[Returns:]A list, in the form of a bit mask, of the previous state\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure \item[{\em new\-State}]The LPA post streams state\end{description}
\end{Desc}
\hypertarget{LPA_8c_a5}{
\index{LPA.c@{LPA.c}!LPA_configHandlers@{LPA\_\-configHandlers}}
\index{LPA_configHandlers@{LPA\_\-configHandlers}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-configHandlers]{\setlength{\rightskip}{0pt plus 5cm}static unsigned int LPA\_\-config\-Handlers (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, LPA\_\-DB\_\-Schema $\ast$ {\em schema}, unsigned int {\em instance})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LPA_8c_a5}


Configures the event handlers. 

\begin{Desc}
\item[Returns:]LPA\_\-success\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control handle \item[{\em schema}]The LPA\_\-DB schema to use when doing the configruation \item[{\em instance}]The LPA\_\-DB instance\end{description}
\end{Desc}
\hypertarget{LPA_8c_a4}{
\index{LPA.c@{LPA.c}!LPA_configOutput@{LPA\_\-configOutput}}
\index{LPA_configOutput@{LPA\_\-configOutput}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-configOutput]{\setlength{\rightskip}{0pt plus 5cm}static unsigned int LPA\_\-config\-Output (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, LPA\_\-DB\_\-Schema $\ast$ {\em schema})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LPA_8c_a4}


Configures the output routine. 

\begin{Desc}
\item[Returns:]LPA\_\-SUCCESS\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control handle \item[{\em schema}]The LPA\_\-DB schema to use when doing the configruation\end{description}
\end{Desc}
\hypertarget{LPA_8c_a18}{
\index{LPA.c@{LPA.c}!LPA_configure@{LPA\_\-configure}}
\index{LPA_configure@{LPA\_\-configure}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-configure]{\setlength{\rightskip}{0pt plus 5cm}unsigned int $\ast$ LPA\_\-configure (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, const LPA\_\-DB\_\-Schema $\ast$ {\em schema}, unsigned int {\em instance}, unsigned int {\em sbc\_\-key})}}
\label{LPA_8c_a18}


Configures datagram, output, and handlers for LPA. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control handle \item[{\em schema}]The LPA\_\-DB schema to use when doing the configruation \item[{\em instance}]The LPA\_\-DB instance number \item[{\em sbc\_\-key}]The SBC DB file key\end{description}
\end{Desc}
\hypertarget{LPA_8c_a16}{
\index{LPA.c@{LPA.c}!LPA_connect_eds@{LPA\_\-connect\_\-eds}}
\index{LPA_connect_eds@{LPA\_\-connect\_\-eds}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-connect\_\-eds]{\setlength{\rightskip}{0pt plus 5cm}int LPA\_\-connect\_\-eds (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa})}}
\label{LPA_8c_a16}


Connects the LCB's event callback handler to the Event Delivery Service's handler. 

\begin{Desc}
\item[Returns:]The status value of the LCBD\_\-evt\_\-cb\_\-set\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure\end{description}
\end{Desc}
\hypertarget{LPA_8c_a14}{
\index{LPA.c@{LPA.c}!LPA_connect_start_marker@{LPA\_\-connect\_\-start\_\-marker}}
\index{LPA_connect_start_marker@{LPA\_\-connect\_\-start\_\-marker}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-connect\_\-start\_\-marker]{\setlength{\rightskip}{0pt plus 5cm}int LPA\_\-connect\_\-start\_\-marker (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa})}}
\label{LPA_8c_a14}


Connects the LCB's event callback handler to the LPA start marker event handler. 

\begin{Desc}
\item[Returns:]The status value of the LCBD\_\-evt\_\-cb\_\-set\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure\end{description}
\end{Desc}
\hypertarget{LPA_8c_a15}{
\index{LPA.c@{LPA.c}!LPA_connect_stop_marker@{LPA\_\-connect\_\-stop\_\-marker}}
\index{LPA_connect_stop_marker@{LPA\_\-connect\_\-stop\_\-marker}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-connect\_\-stop\_\-marker]{\setlength{\rightskip}{0pt plus 5cm}int LPA\_\-connect\_\-stop\_\-marker (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa})}}
\label{LPA_8c_a15}


Connects the LCB's event callback handler to the LPA marker event handler. 

\begin{Desc}
\item[Returns:]The status value of the LCBD\_\-evt\_\-cb\_\-set\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure\end{description}
\end{Desc}
\hypertarget{LPA_8c_a12}{
\index{LPA.c@{LPA.c}!LPA_construct@{LPA\_\-construct}}
\index{LPA_construct@{LPA\_\-construct}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}LPA\_\-construct (\hyperlink{LPA__prvdefs_8h_a13}{LPA\_\-Resp\-Cb} {\em cb})}}
\label{LPA_8c_a12}


Preinitializes an LPA control block. 

\begin{Desc}
\item[Returns:]Pointer to the LPA device control block\end{Desc}
\hypertarget{LPA_8c_a13}{
\index{LPA.c@{LPA.c}!LPA_destruct@{LPA\_\-destruct}}
\index{LPA_destruct@{LPA\_\-destruct}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-destruct]{\setlength{\rightskip}{0pt plus 5cm}LPA\_\-destruct (void $\ast$ {\em lpa})}}
\label{LPA_8c_a13}


Destroys an LPA control block. 

\begin{Desc}
\item[Returns:]Pointer to the LPA device control block\end{Desc}
\hypertarget{LPA_8c_a17}{
\index{LPA.c@{LPA.c}!LPA_disconnect@{LPA\_\-disconnect}}
\index{LPA_disconnect@{LPA\_\-disconnect}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-disconnect]{\setlength{\rightskip}{0pt plus 5cm}int LPA\_\-disconnect (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa})}}
\label{LPA_8c_a17}


Disconnects the LCB's event callback handler from the active event handler callback and restores the original handler. 

\begin{Desc}
\item[Returns:]The status value of the LCBD\_\-evt\_\-cb\_\-set\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure\end{description}
\end{Desc}
\hypertarget{LPA_8c_a27}{
\index{LPA.c@{LPA.c}!LPA_flush@{LPA\_\-flush}}
\index{LPA_flush@{LPA\_\-flush}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-flush]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LPA\_\-flush (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, unsigned int {\em handlers}, unsigned int {\em reason})}}
\label{LPA_8c_a27}


Requests the specified list of handlers to flush their output. 

\begin{Desc}
\item[Returns:]A list, in the form of a bit mask, indicating which handlers failed to comply with the request\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure \item[{\em handlers}]The list of handlers to flush \item[{\em reason}]A value passed transparently to the user's flush routine. The value 0 has been reserved by the EFC facility to mean that the result vector list has been exhausted. LPA uses the value -1 to indicate a flush on TIMEOUT, and 1 to indicate a flush on stop.\end{description}
\end{Desc}
\hypertarget{LPA_8c_a23}{
\index{LPA.c@{LPA.c}!LPA_get_post_count@{LPA\_\-get\_\-post\_\-count}}
\index{LPA_get_post_count@{LPA\_\-get\_\-post\_\-count}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-get\_\-post\_\-count]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LPA\_\-get\_\-post\_\-count (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, unsigned int {\em out\_\-type})}}
\label{LPA_8c_a23}


Get the output post count. 

\begin{Desc}
\item[Returns:]Output post count\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure \item[{\em out\_\-type}]Output type\end{description}
\end{Desc}
\hypertarget{LPA_8c_a6}{
\index{LPA.c@{LPA.c}!LPA_install@{LPA\_\-install}}
\index{LPA_install@{LPA\_\-install}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-install]{\setlength{\rightskip}{0pt plus 5cm}static unsigned int LPA\_\-install (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, unsigned int {\em list}, unsigned int {\em instance})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LPA_8c_a6}


Install configured handlers into the EDS framework. 

\begin{Desc}
\item[Returns:]LPA\_\-SUCCESS\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control handle \item[{\em list}]Bit mask of which handlers to install \item[{\em instance}]The LPA DB instance\end{description}
\end{Desc}
\hypertarget{LPA_8c_a8}{
\index{LPA.c@{LPA.c}!LPA_isFirstPkt@{LPA\_\-isFirstPkt}}
\index{LPA_isFirstPkt@{LPA\_\-isFirstPkt}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-isFirstPkt]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline int LPA\_\-is\-First\-Pkt (const EBF\_\-pkt $\ast$ {\em pkt})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LPA_8c_a8}


Determine if packet is the first of an event. 

\begin{Desc}
\item[Returns:]0 or 1\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]The event packet\end{description}
\end{Desc}
\hypertarget{LPA_8c_a9}{
\index{LPA.c@{LPA.c}!LPA_isLastPkt@{LPA\_\-isLastPkt}}
\index{LPA_isLastPkt@{LPA\_\-isLastPkt}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-isLastPkt]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline int LPA\_\-is\-Last\-Pkt (unsigned int {\em edw})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LPA_8c_a9}


Determine if packet is the last of an event. 

\begin{Desc}
\item[Returns:]0 or 1\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em edw}]The event descriptor word\end{description}
\end{Desc}
\hypertarget{LPA_8c_a26}{
\index{LPA.c@{LPA.c}!LPA_modeAssociate@{LPA\_\-modeAssociate}}
\index{LPA_modeAssociate@{LPA\_\-modeAssociate}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-modeAssociate]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LPA\_\-mode\-Associate (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, unsigned int {\em handlers}, unsigned int {\em mode}, unsigned int {\em cfg\_\-id})}}
\label{LPA_8c_a26}


Associate a mode with a set of handlers. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em Status}]\end{description}
\end{Desc}
\hypertarget{LPA_8c_a25}{
\index{LPA.c@{LPA.c}!LPA_select@{LPA\_\-select}}
\index{LPA_select@{LPA\_\-select}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-select]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LPA\_\-select (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, unsigned int {\em mode})}}
\label{LPA_8c_a25}


Changes mode for the specified list of handlers. 

\begin{Desc}
\item[Returns:]LPA\_\-SUCCESS\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure \item[{\em mode}]Target mode\end{description}
\end{Desc}
\hypertarget{LPA_8c_a10}{
\index{LPA.c@{LPA.c}!LPA_startMarkerProcess@{LPA\_\-startMarkerProcess}}
\index{LPA_startMarkerProcess@{LPA\_\-startMarkerProcess}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-startMarkerProcess]{\setlength{\rightskip}{0pt plus 5cm}int LPA\_\-start\-Marker\-Process (void $\ast$ {\em prm}, unsigned int {\em edw}, LCBD\_\-evt $\ast$ {\em lcb\_\-evt})}}
\label{LPA_8c_a10}


The start marker event handler callback This routine intercepts marker events and notifies LPA. 

\begin{Desc}
\item[Returns:]The fate of the event\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prm}]The LPA control structure \item[{\em edw}]The Event Descriptor Word \item[{\em lcb\_\-evt}]The packet to process\end{description}
\end{Desc}
\hypertarget{LPA_8c_a19}{
\index{LPA.c@{LPA.c}!LPA_startRun@{LPA\_\-startRun}}
\index{LPA_startRun@{LPA\_\-startRun}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-startRun]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LPA\_\-start\-Run (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, unsigned int {\em run\_\-id}, unsigned int {\em mode}, unsigned int {\em time}, unsigned int {\em reason}, unsigned int {\em latc\_\-key}, unsigned int {\em lpa\_\-key})}}
\label{LPA_8c_a19}


Start the physics acquisition run. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure \item[{\em run\_\-id}]The ground run ID \item[{\em mode}]Mode to start the run in \item[{\em time}]Start time request \item[{\em reason}]Start run reason \item[{\em latc\_\-key}]LATC file key \item[{\em lpa\_\-key}]LPA\_\-DB key\end{description}
\end{Desc}
\hypertarget{LPA_8c_a11}{
\index{LPA.c@{LPA.c}!LPA_stopMarkerProcess@{LPA\_\-stopMarkerProcess}}
\index{LPA_stopMarkerProcess@{LPA\_\-stopMarkerProcess}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-stopMarkerProcess]{\setlength{\rightskip}{0pt plus 5cm}int LPA\_\-stop\-Marker\-Process (void $\ast$ {\em prm}, unsigned int {\em edw}, LCBD\_\-evt $\ast$ {\em lcb\_\-evt})}}
\label{LPA_8c_a11}


The stop marker event handler callback This routine intercepts marker events and notifies LPA. 

\begin{Desc}
\item[Returns:]The fate of the event\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prm}]The LPA control structure \item[{\em edw}]The Event Descriptor Word \item[{\em lcb\_\-evt}]The packet to process\end{description}
\end{Desc}
\hypertarget{LPA_8c_a7}{
\index{LPA.c@{LPA.c}!LPA_translate@{LPA\_\-translate}}
\index{LPA_translate@{LPA\_\-translate}!LPA.c@{LPA.c}}
\subsubsection[LPA\_\-translate]{\setlength{\rightskip}{0pt plus 5cm}static unsigned int LPA\_\-translate (\hyperlink{struct__LPA}{LPA} $\ast$ {\em lpa}, unsigned int {\em handlers})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LPA_8c_a7}


Translates an LPA handler mask to an EDS handler mask. 

\begin{Desc}
\item[Returns:]A list, in the form of a bit mask, of EDS handlers\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lpa}]The LPA control structure \item[{\em handlers}]The list of EDS handlers\end{description}
\end{Desc}
