\hypertarget{xfc_8h}{
\section{xfc.h File Reference}
\label{xfc_8h}\index{xfc.h@{xfc.h}}
}
Filter interface definitions. 

{\tt \#include \char`\"{}EDS/TMR.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EDS\_\-fw\-Services.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/LCBV.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/io/EBF\_\-stream.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/io/LCBP.h\char`\"{}}\par


Include dependency graph for xfc.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=125pt]{xfc_8h__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=78pt]{xfc_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct {\bf \_\-Xfc\-Filter\-Handle}
\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{xfc_8h_a0}{
typedef int($\ast$ {\bf Xfc\-Results\-Print\-Rtn} )(unsigned int options, const void $\ast$beg, const void $\ast$end)}
\label{xfc_8h_a0}

\item 
\hypertarget{xfc_8h_a1}{
typedef void($\ast$ {\bf Xfc\-Stats\-Accumulate\-Rtn} )(void $\ast$stats, const void $\ast$beg, const void $\ast$end)}
\label{xfc_8h_a1}

\item 
\hypertarget{xfc_8h_a2}{
typedef void($\ast$ {\bf Xfc\-Stats\-Print\-Rtn} )(void $\ast$stats, unsigned int vetoes)}
\label{xfc_8h_a2}

\item 
\hypertarget{xfc_8h_a3}{
typedef void($\ast$ {\bf Xfc\-Stats\-Clear\-Rtn} )(void $\ast$stats)}
\label{xfc_8h_a3}

\item 
\hypertarget{xfc_8h_a4}{
typedef \_\-Xfc\-Filter\-Handle {\bf Xfc\-Filter\-Handle}}
\label{xfc_8h_a4}

\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{xfc_8h_a5}{xfc\_\-initialize} (void)
\begin{CompactList}\small\item\em One time initialization routine. \item\end{CompactList}\item 
int \hyperlink{xfc_8h_a6}{xfc\_\-process} (int id, const \hyperlink{struct__XfcRto}{Xfc\-Rto} $\ast$rto, const EDS\_\-DB\_\-Handler\-Construct\-Services $\ast$services)
\begin{CompactList}\small\item\em Common routine to do the processing. \item\end{CompactList}\item 
int \hyperlink{xfc_8h_a7}{xfc\_\-sizeof} (\hyperlink{struct__XfcConstructCtx}{Xfc\-Construct\-Ctx} $\ast$ctx, const EFC\_\-definition $\ast$def, const EFC\_\-DB\_\-Schema $\ast$schema, int stats\_\-size)
\begin{CompactList}\small\item\em Computes the size needed to hold configuration defined by the specified context, definition block and schema. \item\end{CompactList}\item 
const EDS\_\-fw\-Handler\-Services\-X1 $\ast$ \hyperlink{xfc_8h_a8}{xfc\_\-construct} (\hyperlink{struct__XfcConstructCtx}{Xfc\-Construct\-Ctx} $\ast$ctx, EFC $\ast$efc, unsigned int handler\_\-id, const EFC\_\-DB\_\-Schema $\ast$schema, unsigned int schema\_\-key, EDS\_\-fw $\ast$eds\-Fw, unsigned int objects, unsigned int needs, Xfc\-Results\-Print\-Rtn results\-Print, Xfc\-Stats\-Clear\-Rtn stats\-Clear, Xfc\-Stats\-Accumulate\-Rtn stats\-Acc, Xfc\-Stats\-Print\-Rtn stats\-Print)
\begin{CompactList}\small\item\em Constructs the configuration for the specified set of parameters. \item\end{CompactList}\item 
void \hyperlink{xfc_8h_a9}{xfc\_\-display} (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx, unsigned int pkt\-Bytes, EBF\_\-pkt $\ast$pkt, EBF\_\-siv siv, EDS\_\-fw\-Ixb $\ast$ixb)
\begin{CompactList}\small\item\em Displays the requested subsystems. \item\end{CompactList}\item 
int \hyperlink{xfc_8h_a10}{xfc\_\-any\_\-display} (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx)
\begin{CompactList}\small\item\em Returns non-zero if there are any subsystems to display that need a directory. \item\end{CompactList}\item 
void \hyperlink{xfc_8h_a11}{xfc\_\-begtick\_\-set} (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx, TMR\_\-tick tick)
\begin{CompactList}\small\item\em Seeds the beginning tick of this sample. \item\end{CompactList}\item 
void \hyperlink{xfc_8h_a12}{xfc\_\-endtick\_\-set} (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx, TMR\_\-tick tick)
\begin{CompactList}\small\item\em Seeds the ending tick of this sample. \item\end{CompactList}\item 
void $\ast$ \hyperlink{xfc_8h_a13}{xfc\_\-filter\-Ctx\_\-get} (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx)
\begin{CompactList}\small\item\em Returns a pointer to the underlying user filter control structure. \item\end{CompactList}\item 
void $\ast$ \hyperlink{xfc_8h_a14}{xfc\_\-results\-Ctx\_\-get} (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx)
\begin{CompactList}\small\item\em Returns a pointer to the results control structure. \item\end{CompactList}\item 
void $\ast$ \hyperlink{xfc_8h_a15}{xfc\_\-stats\-Ctx\_\-get} (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx)
\begin{CompactList}\small\item\em Returns a pointer to the statistics control structure. \item\end{CompactList}\item 
void \hyperlink{xfc_8h_a16}{xfc\_\-results\_\-post} (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx, int reason, const void $\ast$beg, const void $\ast$end, const EFA\_\-span $\ast$span)
\begin{CompactList}\small\item\em Dummy result vector post routine. \item\end{CompactList}\item 
int \hyperlink{xfc_8h_a17}{xfc\_\-results\_\-start} (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx, int reason, int run\_\-id, int start\-Time, int mode)
\begin{CompactList}\small\item\em Handles the start run for the result analysis. \item\end{CompactList}\item 
void \hyperlink{xfc_8h_a18}{xfc\_\-results\_\-print} (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx, const void $\ast$beg, const void $\ast$end)
\begin{CompactList}\small\item\em Prints the standard part of the results, then calls the filter specific piece. \item\end{CompactList}\item 
unsigned int \hyperlink{xfc_8h_a19}{xfc\_\-objects\_\-get} (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx)
\begin{CompactList}\small\item\em Used to supply any additional EDS\_\-fw objects needed by this filter context. \item\end{CompactList}\item 
unsigned int \hyperlink{xfc_8h_a20}{xfc\_\-needs\_\-get} (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ctx)
\begin{CompactList}\small\item\em Used to supply any additional EDS\_\-fw needs for this filter context. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Filter interface definitions. 

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


\footnotesize\begin{verbatim}   CVS $Id: xfc.h,v 1.1 2007/10/17 02:12:28 russell Exp $
\end{verbatim}
\normalsize


\subsection{Function Documentation}
\hypertarget{xfc_8h_a10}{
\index{xfc.h@{xfc.h}!xfc_any_display@{xfc\_\-any\_\-display}}
\index{xfc_any_display@{xfc\_\-any\_\-display}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-any\_\-display]{\setlength{\rightskip}{0pt plus 5cm}int xfc\_\-any\_\-display (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx})}}
\label{xfc_8h_a10}


Returns non-zero if there are any subsystems to display that need a directory. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The filter context parameter\end{description}
\end{Desc}
\hypertarget{xfc_8h_a11}{
\index{xfc.h@{xfc.h}!xfc_begtick_set@{xfc\_\-begtick\_\-set}}
\index{xfc_begtick_set@{xfc\_\-begtick\_\-set}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-begtick\_\-set]{\setlength{\rightskip}{0pt plus 5cm}void xfc\_\-begtick\_\-set (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx}, TMR\_\-tick {\em tick})}}
\label{xfc_8h_a11}


Seeds the beginning tick of this sample. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The xfc context \item[{\em tick}]The beginning tick value\end{description}
\end{Desc}
\hypertarget{xfc_8h_a8}{
\index{xfc.h@{xfc.h}!xfc_construct@{xfc\_\-construct}}
\index{xfc_construct@{xfc\_\-construct}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}const EDS\_\-fw\-Handler\-Services xfc\_\-construct (\hyperlink{struct__XfcConstructCtx}{Xfc\-Construct\-Ctx} $\ast$ {\em ctxx}, EFC $\ast$ {\em efc}, unsigned int {\em handler\_\-id}, const EFC\_\-DB\_\-Schema $\ast$ {\em schema}, unsigned int {\em schema\_\-key}, EDS\_\-fw $\ast$ {\em eds\-Fw}, unsigned int {\em objects}, unsigned int {\em needs}, Xfc\-Results\-Print\-Rtn {\em results\-Print}, Xfc\-Stats\-Clear\-Rtn {\em stats\-Clear}, Xfc\-Stats\-Accumulate\-Rtn {\em stats\-Acc}, Xfc\-Stats\-Print\-Rtn {\em stats\-Print})}}
\label{xfc_8h_a8}


Constructs the configuration for the specified set of parameters. 

!!!results; \hypertarget{xfc_8h_a9}{
\index{xfc.h@{xfc.h}!xfc_display@{xfc\_\-display}}
\index{xfc_display@{xfc\_\-display}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-display]{\setlength{\rightskip}{0pt plus 5cm}void void xfc\_\-display (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx}, unsigned int {\em pkt\-Bytes}, EBF\_\-pkt $\ast$ {\em pkt}, EBF\_\-siv {\em siv}, EDS\_\-fw\-Ixb $\ast$ {\em ixb})}}
\label{xfc_8h_a9}


Displays the requested subsystems. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The filter context \item[{\em pkt\-Bytes}]The number of bytes in the packet \item[{\em pkt}]The event data packet \item[{\em siv}]The packet state information vector \item[{\em ixb}]The EDS information exchange block\end{description}
\end{Desc}
\hypertarget{xfc_8h_a12}{
\index{xfc.h@{xfc.h}!xfc_endtick_set@{xfc\_\-endtick\_\-set}}
\index{xfc_endtick_set@{xfc\_\-endtick\_\-set}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-endtick\_\-set]{\setlength{\rightskip}{0pt plus 5cm}void xfc\_\-endtick\_\-set (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx}, TMR\_\-tick {\em tick})}}
\label{xfc_8h_a12}


Seeds the ending tick of this sample. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The xfc context \item[{\em tick}]The ending tick value\end{description}
\end{Desc}
\hypertarget{xfc_8h_a13}{
\index{xfc.h@{xfc.h}!xfc_filterCtx_get@{xfc\_\-filterCtx\_\-get}}
\index{xfc_filterCtx_get@{xfc\_\-filterCtx\_\-get}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-filterCtx\_\-get]{\setlength{\rightskip}{0pt plus 5cm}void $\ast$ xfc\_\-filter\-Ctx\_\-get (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx})}}
\label{xfc_8h_a13}


Returns a pointer to the underlying user filter control structure. 

\begin{Desc}
\item[Returns:]A pointer to the underlying user filter control structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The filter control context\end{description}
\end{Desc}
\hypertarget{xfc_8h_a5}{
\index{xfc.h@{xfc.h}!xfc_initialize@{xfc\_\-initialize}}
\index{xfc_initialize@{xfc\_\-initialize}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-initialize]{\setlength{\rightskip}{0pt plus 5cm}int xfc\_\-initialize (void)}}
\label{xfc_8h_a5}


One time initialization routine. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\hypertarget{xfc_8h_a20}{
\index{xfc.h@{xfc.h}!xfc_needs_get@{xfc\_\-needs\_\-get}}
\index{xfc_needs_get@{xfc\_\-needs\_\-get}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-needs\_\-get]{\setlength{\rightskip}{0pt plus 5cm}unsigned int xfc\_\-needs\_\-get (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx})}}
\label{xfc_8h_a20}


Used to supply any additional EDS\_\-fw needs for this filter context. 

\begin{Desc}
\item[Returns:]Bit mask of the addition objects\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The filter context handle\end{description}
\end{Desc}
\hypertarget{xfc_8h_a19}{
\index{xfc.h@{xfc.h}!xfc_objects_get@{xfc\_\-objects\_\-get}}
\index{xfc_objects_get@{xfc\_\-objects\_\-get}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-objects\_\-get]{\setlength{\rightskip}{0pt plus 5cm}unsigned int xfc\_\-objects\_\-get (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx})}}
\label{xfc_8h_a19}


Used to supply any additional EDS\_\-fw objects needed by this filter context. 

\begin{Desc}
\item[Returns:]Bit mask of the addition objects\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The filter context handle\end{description}
\end{Desc}
\hypertarget{xfc_8h_a6}{
\index{xfc.h@{xfc.h}!xfc_process@{xfc\_\-process}}
\index{xfc_process@{xfc\_\-process}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-process]{\setlength{\rightskip}{0pt plus 5cm}int xfc\_\-process (int {\em id}, const \hyperlink{struct__XfcRto}{Xfc\-Rto} $\ast$ {\em rto}, const EDS\_\-DB\_\-Handler\-Construct\-Services $\ast$ {\em services})}}
\label{xfc_8h_a6}


Common routine to do the processing. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]The EFC\_\-DB\_\-id of this filter \item[{\em rto}]The runtime options structure \item[{\em services}]An alternative set of construction services, may be NULL, in which case the services resolved by the database schema and instance buried in the {\em rto\/} will be used. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Status\end{Desc}
\hypertarget{xfc_8h_a16}{
\index{xfc.h@{xfc.h}!xfc_results_post@{xfc\_\-results\_\-post}}
\index{xfc_results_post@{xfc\_\-results\_\-post}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-results\_\-post]{\setlength{\rightskip}{0pt plus 5cm}void xfc\_\-results\_\-post (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx}, int {\em reason}, const void $\ast$ {\em beg}, const void $\ast$ {\em end}, const EFA\_\-span $\ast$ {\em span})}}
\label{xfc_8h_a16}


Dummy result vector post routine. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The xfc context \item[{\em reason}]The posting reason \item[{\em beg}]The first result vector \item[{\em end}]The last result vector (actually one past the last one) \item[{\em span}]The span of the sample\end{description}
\end{Desc}
\hypertarget{xfc_8h_a18}{
\index{xfc.h@{xfc.h}!xfc_results_print@{xfc\_\-results\_\-print}}
\index{xfc_results_print@{xfc\_\-results\_\-print}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-results\_\-print]{\setlength{\rightskip}{0pt plus 5cm}void xfc\_\-results\_\-print (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx}, const void $\ast$ {\em beg}, const void $\ast$ {\em end})}}
\label{xfc_8h_a18}


Prints the standard part of the results, then calls the filter specific piece. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The xfc context \item[{\em beg}]Pointer to the first filter specific result vector \item[{\em end}]Pointer to the last filter specific result vector\end{description}
\end{Desc}
\hypertarget{xfc_8h_a17}{
\index{xfc.h@{xfc.h}!xfc_results_start@{xfc\_\-results\_\-start}}
\index{xfc_results_start@{xfc\_\-results\_\-start}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-results\_\-start]{\setlength{\rightskip}{0pt plus 5cm}int xfc\_\-results\_\-start (\hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx}, int {\em reason}, int {\em run\_\-id}, int {\em start\-Time}, int {\em mode})}}
\label{xfc_8h_a17}


Handles the start run for the result analysis. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em ==0,if}]successfully started \item[{\em !=0,if}]not successfully started\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The callback context parameter \item[{\em reason}]The LSF\_\-REASON\_\-OPEN to indicate why the stream is being started \item[{\em run\_\-id}]Suggested use is to identify the block of events between when EDS\_\-fw\-Handler\-Start is called and EDS\_\-fw\-Handler\-Flush is called with a stop reason \item[{\em start\-Time}]The run start time rounded to the nearest second \item[{\em mode}]This must be the running mode.\end{description}
\end{Desc}
\hypertarget{xfc_8h_a14}{
\index{xfc.h@{xfc.h}!xfc_resultsCtx_get@{xfc\_\-resultsCtx\_\-get}}
\index{xfc_resultsCtx_get@{xfc\_\-resultsCtx\_\-get}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-resultsCtx\_\-get]{\setlength{\rightskip}{0pt plus 5cm}void $\ast$ xfc\_\-results\-Ctx\_\-get (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx})}}
\label{xfc_8h_a14}


Returns a pointer to the results control structure. 

\begin{Desc}
\item[Returns:]A pointer to the results control structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The filter control context\end{description}
\end{Desc}
\hypertarget{xfc_8h_a7}{
\index{xfc.h@{xfc.h}!xfc_sizeof@{xfc\_\-sizeof}}
\index{xfc_sizeof@{xfc\_\-sizeof}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-sizeof]{\setlength{\rightskip}{0pt plus 5cm}int xfc\_\-sizeof (\hyperlink{struct__XfcConstructCtx}{Xfc\-Construct\-Ctx} $\ast$ {\em ctxx}, const EFC\_\-definition $\ast$ {\em def}, const EFC\_\-DB\_\-Schema $\ast$ {\em schema}, int {\em stats\_\-size})}}
\label{xfc_8h_a7}


Computes the size needed to hold configuration defined by the specified context, definition block and schema. 

\begin{Desc}
\item[Returns:]The size, in bytes,\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctxx}]The filter control construction context \item[{\em def}]The EFC definition block \item[{\em schema}]The defining schema \item[{\em stats\_\-size}]The size, in bytes, of one statistics buffer\end{description}
\end{Desc}
\hypertarget{xfc_8h_a15}{
\index{xfc.h@{xfc.h}!xfc_statsCtx_get@{xfc\_\-statsCtx\_\-get}}
\index{xfc_statsCtx_get@{xfc\_\-statsCtx\_\-get}!xfc.h@{xfc.h}}
\subsubsection[xfc\_\-statsCtx\_\-get]{\setlength{\rightskip}{0pt plus 5cm}void $\ast$ xfc\_\-stats\-Ctx\_\-get (const \hyperlink{struct__XfcCtx}{Xfc\-Ctx} $\ast$ {\em ctx})}}
\label{xfc_8h_a15}


Returns a pointer to the statistics control structure. 

\begin{Desc}
\item[Returns:]A pointer to the statistics control structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]The filter control context\end{description}
\end{Desc}
