\hypertarget{LCBP_8c}{
\section{LCBP.c File Reference}
\label{LCBP_8c}\index{LCBP.c@{LCBP.c}}
}
LCB Virtual Device.  


{\tt \#include $<$EDS/LCBV.h$>$}\par
{\tt \#include $<$EDS/io/LCBP.h$>$}\par
{\tt \#include $<$EDS/io/EBF\_\-pkts.h$>$}\par
{\tt \#include $<$EDS/EBF\_\-pkt.h$>$}\par
{\tt \#include $<$EDS/EBF\_\-evt.h$>$}\par
{\tt \#include $<$EDS/EBF\_\-edw.h$>$}\par
{\tt \#include $<$EDS/EBF\_\-gem.h$>$}\par
{\tt \#include $<$EDS/EBF\_\-gemLocate.h$>$}\par
{\tt \#include $<$PBS/FORK.h$>$}\par
{\tt \#include $<$PBS/TASK.h$>$}\par
{\tt \#include $<$PBS/MBA.h$>$}\par
{\tt \#include $<$PBI/Alias.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__EDM}{\_\-EDM}
\begin{CompactList}\small\item\em EDM control/context handle for the Event Delivery Model. \item\end{CompactList}\item 
struct \hyperlink{struct__LCBP__fork}{\_\-LCBP\_\-fork}
\begin{CompactList}\small\item\em Event fork task. \item\end{CompactList}\item 
struct \hyperlink{struct__LCBP__pktCbp}{\_\-LCBP\_\-pktCbp}
\begin{CompactList}\small\item\em Binds an event call back routine with its parameter. \item\end{CompactList}\item 
struct \hyperlink{struct__LCBP}{\_\-LCBP}
\begin{CompactList}\small\item\em Layout of the control block for the virtual LCB. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{LCBP_8c_ad521f35a7aec5dea1de812fe3419e6d}{
typedef struct \hyperlink{struct__EDM}{\_\-EDM} \hyperlink{LCBP_8c_ad521f35a7aec5dea1de812fe3419e6d}{EDM}}
\label{LCBP_8c_ad521f35a7aec5dea1de812fe3419e6d}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__EDM}{\_\-EDM}. \item\end{CompactList}\item 
\hypertarget{LCBP_8c_1c0b743730485e69db2a957bfc80d28f}{
typedef struct \hyperlink{struct__LCBP__fork}{\_\-LCBP\_\-fork} \hyperlink{LCBP_8c_1c0b743730485e69db2a957bfc80d28f}{LCBP\_\-fork}}
\label{LCBP_8c_1c0b743730485e69db2a957bfc80d28f}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__LCBP__fork}{\_\-LCBP\_\-fork}. \item\end{CompactList}\item 
\hypertarget{LCBP_8c_897f0bd2bf9b57e504046840c6f3514b}{
typedef struct \hyperlink{struct__LCBP__pktCbp}{\_\-LCBP\_\-pktCbp} \hyperlink{LCBP_8c_897f0bd2bf9b57e504046840c6f3514b}{LCBP\_\-pktCbp}}
\label{LCBP_8c_897f0bd2bf9b57e504046840c6f3514b}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__LCBP__pktCbp}{\_\-LCBP\_\-pktCbp}. \item\end{CompactList}\item 
\hypertarget{LCBP_8c_f1353623c43e090eab3e35db703b6c7c}{
typedef struct \hyperlink{struct__LCBP}{\_\-LCBP} $\ast$ \hyperlink{LCBP_8c_f1353623c43e090eab3e35db703b6c7c}{LCBP}}
\label{LCBP_8c_f1353623c43e090eab3e35db703b6c7c}

\begin{CompactList}\small\item\em Typedef for a pointer to the struct \hyperlink{struct__LCBP}{\_\-LCBP}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hypertarget{LCBP_8c_1314fddc1d8b3a99e599573511a04213}{
\textbf{ALIAS\_\-FNC} (unsigned int, LCBP\_\-evt\_\-cb\_\-set, LCBP\_\-pktCbSet)}
\label{LCBP_8c_1314fddc1d8b3a99e599573511a04213}

\item 
\hypertarget{LCBP_8c_a5a4a548865f13d692bbd06cffdb0dfe}{
\textbf{ALIAS\_\-END} (\hyperlink{struct__LCBP}{LCBP})}
\label{LCBP_8c_a5a4a548865f13d692bbd06cffdb0dfe}

\item 
int \hyperlink{LCBP_8c_6e86aee45115c50d26675422f0722a0e}{EDM\_\-construct} (\hyperlink{struct__EDM}{EDM} $\ast$edm)
\begin{CompactList}\small\item\em Constructor for an EDM handle. \item\end{CompactList}\item 
int \hyperlink{LCBP_8c_311d74c5e11b504ac960b2f2748edad3}{EDM\_\-wait} (\hyperlink{struct__EDM}{EDM} $\ast$edm, unsigned int edw, \hyperlink{struct__EBF__pkt}{EBF\_\-pkt} $\ast$pkt)
\begin{CompactList}\small\item\em Standard event handler for EDM. \item\end{CompactList}\item 
static unsigned int \hyperlink{LCBP_8c_1aca57320f684fd04849820ea80bfc8c}{defaultCb} (void $\ast$prm, unsigned int edw, \hyperlink{struct__EBF__pkt}{EBF\_\-pkt} $\ast$pkt)
\begin{CompactList}\small\item\em Default callback routine. \item\end{CompactList}\item 
static int \hyperlink{LCBP_8c_a277361f3e20c722217dea1b2899a8fb}{evtHandler} (\hyperlink{struct__LCBP}{LCBP} lcb, \hyperlink{struct__EBF__pkt}{EBF\_\-pkt} $\ast$pkt)
\begin{CompactList}\small\item\em FORK callback dispatch routine. \item\end{CompactList}\item 
static unsigned int \hyperlink{LCBP_8c_2c3e4d71da921cdfb81c73be07872fe5}{normal\_\-delivery} (\hyperlink{struct__LCBP}{LCBP} lcb)
\begin{CompactList}\small\item\em Normal packet delivery. \item\end{CompactList}\item 
static unsigned int \hyperlink{LCBP_8c_71c07193446b823e721ed07b05983a28}{timed\_\-delivery} (\hyperlink{struct__LCBP}{LCBP} lcb)
\begin{CompactList}\small\item\em Normal packet delivery. \item\end{CompactList}\item 
\hyperlink{struct__LCBP}{LCBP} \hyperlink{LCBP_8c_01a27cc29cbc1d6de851594ad8909584}{LCBP\_\-get} ()
\begin{CompactList}\small\item\em Returns a pointer to the virtual LCB control block. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBP_8c_ac87b09b3779e5661203c5768a7d0624}{LCBP\_\-create} (\hyperlink{struct__LCBP}{LCBP} lcb)
\begin{CompactList}\small\item\em Initializes the LCB virtual device control block. \item\end{CompactList}\item 
int \hyperlink{LCBP_8c_56dd8b6124388bb3ea2961bb71918848}{LCBP\_\-sizeof} ()
\begin{CompactList}\small\item\em Returns the size, in bytes, of a virtual LCB control block. \item\end{CompactList}\item 
void \hyperlink{LCBP_8c_72f51689fa3132153de88c8a9883264e}{LCBP\_\-construct} (\hyperlink{struct__LCBP}{LCBP} lcb)
\begin{CompactList}\small\item\em Constructs (initializes) the specified virtual LCB control block. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBP_8c_2487312ce0ebcf8e82209bd88749f192}{LCBP\_\-edm\_\-configure} (\hyperlink{struct__LCBP}{LCBP} lcb, unsigned int style, void $\ast$prm)
\begin{CompactList}\small\item\em Sets the event deliver style. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBP_8c_fb7983b8dfe54f046b5475bbee3b616c}{LCBP\_\-edm\_\-reset} (\hyperlink{struct__LCBP}{LCBP} lcb)
\begin{CompactList}\small\item\em Resets the LCB handle, preparing it for a new set of data. This is generally called when switching to a new event stream. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBP_8c_926f47d92d2f04cb9bc309a9c66672fc}{LCBP\_\-pktsDeliver} (\hyperlink{struct__LCBP}{LCBP} lcb)
\begin{CompactList}\small\item\em Feeds one packet at a time to the user provided callback routine. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBP_8c_f8dfef45c4c0bf567d3e00941feb7e81}{LCBP\_\-pktsConnect} (\hyperlink{struct__LCBP}{LCBP} lcb, \hyperlink{struct__EBF__pkts__ps}{EBF\_\-pkts} pkts)
\begin{CompactList}\small\item\em Connect a stream of packets to the virtual LCB. \item\end{CompactList}\item 
\hyperlink{struct__EBF__pkts__ps}{EBF\_\-pkts} \hyperlink{LCBP_8c_f6e69c6a38c80bdd93ba1f5ee584a036}{LCBP\_\-pktsQuery} (\hyperlink{struct__LCBP}{LCBP} lcb)
\begin{CompactList}\small\item\em Returns the current EBF\_\-pkts. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBP_8c_a30db2e5ad1357c220cf81a608c75e09}{LCBP\_\-evt\_\-cb\_\-set} (\hyperlink{struct__LCBP}{LCBP} lcb, unsigned int proto, \hyperlink{LCBV_8h_7d5a0b53ccda04babd6e3e41a9f8b6d6}{LCBV\_\-pktCb} rtn, void $\ast$prm)
\begin{CompactList}\small\item\em Establishes a callback handler for the specified protocal. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBP_8c_be1c63971deb8ac7b9dcfee89be9fd55}{LCBP\_\-evt\_\-enable} (\hyperlink{struct__LCBP}{LCBP} lcb, int enable)
\begin{CompactList}\small\item\em Enables/Disables the flow of events. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBP_8c_811a11f9546922c392ac56cb0bc19642}{LCBP\_\-evt\_\-handler\_\-create} (\hyperlink{struct__LCBP}{LCBP} lcb, int priority)
\begin{CompactList}\small\item\em Creates the event que handler service task. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBP_8c_5a770c288b97b8f13bcd26d636a45e71}{LCBP\_\-evt\_\-que\_\-install} (\hyperlink{struct__LCBP}{LCBP} lcb, FORK\_\-que $\ast$que)
\begin{CompactList}\small\item\em Installs queue from {\em fcb\/} as the task message queue for event traffic. \item\end{CompactList}\item 
FORK\_\-que $\ast$ \hyperlink{LCBP_8c_c383a7eada15739f9bbb86207cebc138}{LCBP\_\-evt\_\-que\_\-get} (\hyperlink{struct__LCBP}{LCBP} lcb, int que\_\-id)
\begin{CompactList}\small\item\em Installs queue from {\em fcb\/} as the task message queue for event traffic. \item\end{CompactList}\item 
unsigned int \hyperlink{LCBP_8c_43e71f907b9181f08de6cfd9733afb49}{LCBP\_\-pktsRngFree} (\hyperlink{struct__LCBP}{LCBP} lcb, \hyperlink{struct__EBF__pkt}{EBF\_\-pkt} $\ast$from, \hyperlink{struct__EBF__pkt}{EBF\_\-pkt} $\ast$to)
\begin{CompactList}\small\item\em Dummy implementation of the corresponds LCBD routine. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hypertarget{LCBP_8c_6ba1a28e97d2e9f32e7e77dad223198e}{
static struct \hyperlink{struct__LCBP}{\_\-LCBP} \hyperlink{LCBP_8c_6ba1a28e97d2e9f32e7e77dad223198e}{Lcbp} = \{ 0 \}}
\label{LCBP_8c_6ba1a28e97d2e9f32e7e77dad223198e}

\begin{CompactList}\small\item\em Static instance of the packet LCB control block. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
LCB Virtual Device. 

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


\footnotesize\begin{verbatim}

   CVS $Id: LCBP.c,v 1.7 2011/03/25 22:16:57 russell Exp $
\end{verbatim}
\normalsize
 

\subsection{Function Documentation}
\hypertarget{LCBP_8c_1aca57320f684fd04849820ea80bfc8c}{
\index{LCBP.c@{LCBP.c}!defaultCb@{defaultCb}}
\index{defaultCb@{defaultCb}!LCBP.c@{LCBP.c}}
\subsubsection[{defaultCb}]{\setlength{\rightskip}{0pt plus 5cm}static int defaultCb (void $\ast$ {\em prm}, \/  unsigned int {\em edw}, \/  {\bf EBF\_\-pkt} $\ast$ {\em pkt})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LCBP_8c_1aca57320f684fd04849820ea80bfc8c}


Default callback routine. 

\begin{Desc}
\item[Returns:]0, always, indicating to press-on\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prm}]The user parameter (ignored) \item[{\em edw}]The event descriptor word (ignored) \item[{\em pkt}]The data packet \end{description}
\end{Desc}


Referenced by LCBP\_\-construct().\hypertarget{LCBP_8c_6e86aee45115c50d26675422f0722a0e}{
\index{LCBP.c@{LCBP.c}!EDM\_\-construct@{EDM\_\-construct}}
\index{EDM\_\-construct@{EDM\_\-construct}!LCBP.c@{LCBP.c}}
\subsubsection[{EDM\_\-construct}]{\setlength{\rightskip}{0pt plus 5cm}int EDM\_\-construct ({\bf EDM} $\ast$ {\em edm})}}
\label{LCBP_8c_6e86aee45115c50d26675422f0722a0e}


Constructor for an EDM handle. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em edm}]The target EDM handle \end{description}
\end{Desc}


References \_\-EDM::first, \_\-EDM::nsecx, \_\-EDM::offset, \_\-EDM::ppstime, and \_\-EDM::prv\_\-truncated.

Referenced by LCBP\_\-edm\_\-configure().\hypertarget{LCBP_8c_311d74c5e11b504ac960b2f2748edad3}{
\index{LCBP.c@{LCBP.c}!EDM\_\-wait@{EDM\_\-wait}}
\index{EDM\_\-wait@{EDM\_\-wait}!LCBP.c@{LCBP.c}}
\subsubsection[{EDM\_\-wait}]{\setlength{\rightskip}{0pt plus 5cm}int EDM\_\-wait ({\bf EDM} $\ast$ {\em edm}, \/  unsigned int {\em edw}, \/  {\bf EBF\_\-pkt} $\ast$ {\em pkt})}}
\label{LCBP_8c_311d74c5e11b504ac960b2f2748edad3}


Standard event handler for EDM. 

\begin{Desc}
\item[Returns:]Whatever the user's event handler returns\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em edm}]The EDM control/context handle \item[{\em edw}]The LCB's event descriptor word \item[{\em pkt}]The data packet \end{description}
\end{Desc}


References \_\-EDM::base\_\-tov, \_\-EBF\_\-edw::bf, EBF\_\-\_\-gemLocate(), EBF\_\-EDW\_\-RSTATUS\_\-K\_\-PACKET\_\-TRUNCATED, \_\-EDM::first, \_\-EDM::nsecx, \_\-EDM::offset, \_\-EDM::pps\_\-idx, \_\-EDM::ppstime, \_\-EBF\_\-gem::ppstime, \_\-EDM::prv\_\-truncated, \_\-EBF\_\-edw\_\-bf::rstatus, \_\-EDM::secs, \_\-EBF\_\-gem::trgtime, and \_\-EBF\_\-edw::ui.

Referenced by timed\_\-delivery().\hypertarget{LCBP_8c_a277361f3e20c722217dea1b2899a8fb}{
\index{LCBP.c@{LCBP.c}!evtHandler@{evtHandler}}
\index{evtHandler@{evtHandler}!LCBP.c@{LCBP.c}}
\subsubsection[{evtHandler}]{\setlength{\rightskip}{0pt plus 5cm}static int evtHandler ({\bf LCBP} {\em lcb}, \/  {\bf EBF\_\-pkt} $\ast$ {\em pkt})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LCBP_8c_a277361f3e20c722217dea1b2899a8fb}


FORK callback dispatch routine. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB device handle \item[{\em pkt}]The data packet \end{description}
\end{Desc}


References \_\-EBF\_\-ebw::bf, \_\-LCBP::cbps, \_\-EBF\_\-pkt::ebw, \_\-LCBP::enabled, \_\-EBF\_\-pkt::hdr, LCBV\_\-PKT\_\-FATE\_\-M\_\-ABORT, LCBV\_\-PKT\_\-FATE\_\-M\_\-NO\_\-MORE, \_\-LCBP\_\-pktCbp::prm, \_\-LCBP\_\-pktCbp::rtn, \_\-EBF\_\-ebw::ui, \_\-EBF\_\-edw::ui, and \_\-EBF\_\-pktHdr::undef.

Referenced by timed\_\-delivery().\hypertarget{LCBP_8c_72f51689fa3132153de88c8a9883264e}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-construct@{LCBP\_\-construct}}
\index{LCBP\_\-construct@{LCBP\_\-construct}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-construct}]{\setlength{\rightskip}{0pt plus 5cm}void LCBP\_\-construct ({\bf LCBP} {\em lcb})}}
\label{LCBP_8c_72f51689fa3132153de88c8a9883264e}


Constructs (initializes) the specified virtual LCB control block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB control block to construct \end{description}
\end{Desc}


References \_\-LCBP::cbps, defaultCb(), \_\-LCBP::enabled, \_\-LCBP::init, \_\-LCBP\_\-pktCbp::prm, and \_\-LCBP\_\-pktCbp::rtn.

Referenced by fileOpen(), and LCBP\_\-create().\hypertarget{LCBP_8c_ac87b09b3779e5661203c5768a7d0624}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-create@{LCBP\_\-create}}
\index{LCBP\_\-create@{LCBP\_\-create}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-create}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBP\_\-create ({\bf LCBP} {\em lcb})}}
\label{LCBP_8c_ac87b09b3779e5661203c5768a7d0624}


Initializes the LCB virtual device control block. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB device handle \end{description}
\end{Desc}


References \_\-LCBP::init, and LCBP\_\-construct().

Referenced by EBF\_\-streamProcess().\hypertarget{LCBP_8c_2487312ce0ebcf8e82209bd88749f192}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-edm\_\-configure@{LCBP\_\-edm\_\-configure}}
\index{LCBP\_\-edm\_\-configure@{LCBP\_\-edm\_\-configure}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-edm\_\-configure}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBP\_\-edm\_\-configure ({\bf LCBP} {\em lcb}, \/  unsigned int {\em style}, \/  void $\ast$ {\em prm})}}
\label{LCBP_8c_2487312ce0ebcf8e82209bd88749f192}


Sets the event deliver style. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB device handle \item[{\em style}]The deliver style \item[{\em prm}]Parameter specific to the delivery style \end{description}
\end{Desc}


References \_\-LCBP::edm, EDM\_\-construct(), LCBP\_\-EDS\_\-K\_\-NORMAL, LCBP\_\-EDS\_\-K\_\-TIMED, and \_\-LCBP::style.\hypertarget{LCBP_8c_fb7983b8dfe54f046b5475bbee3b616c}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-edm\_\-reset@{LCBP\_\-edm\_\-reset}}
\index{LCBP\_\-edm\_\-reset@{LCBP\_\-edm\_\-reset}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-edm\_\-reset}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBP\_\-edm\_\-reset ({\bf LCBP} {\em lcb})}}
\label{LCBP_8c_fb7983b8dfe54f046b5475bbee3b616c}


Resets the LCB handle, preparing it for a new set of data. This is generally called when switching to a new event stream. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The LCB control/context handle \end{description}
\end{Desc}


References \_\-LCBP::edm, \_\-EDM::first, \_\-EDM::nsecx, \_\-EDM::offset, and \_\-EDM::prv\_\-truncated.

Referenced by EBF\_\-streamProcess().\hypertarget{LCBP_8c_a30db2e5ad1357c220cf81a608c75e09}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-evt\_\-cb\_\-set@{LCBP\_\-evt\_\-cb\_\-set}}
\index{LCBP\_\-evt\_\-cb\_\-set@{LCBP\_\-evt\_\-cb\_\-set}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-evt\_\-cb\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBP\_\-evt\_\-cb\_\-set ({\bf LCBP} {\em lcb}, \/  unsigned int {\em proto}, \/  {\bf LCBV\_\-pktCb} {\em rtn}, \/  void $\ast$ {\em prm})}}
\label{LCBP_8c_a30db2e5ad1357c220cf81a608c75e09}


Establishes a callback handler for the specified protocal. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Success}]\item[{\em -1,Protocal}]out-of-range\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB device handle \item[{\em proto}]The protocol number \item[{\em rtn}]The callback routine \item[{\em prm}]Parameter to the callback routine \end{description}
\end{Desc}


References \_\-LCBP::cbps, \_\-LCBP\_\-pktCbp::prm, and \_\-LCBP\_\-pktCbp::rtn.

Referenced by EBF\_\-streamProcess().\hypertarget{LCBP_8c_be1c63971deb8ac7b9dcfee89be9fd55}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-evt\_\-enable@{LCBP\_\-evt\_\-enable}}
\index{LCBP\_\-evt\_\-enable@{LCBP\_\-evt\_\-enable}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-evt\_\-enable}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBP\_\-evt\_\-enable ({\bf LCBP} {\em lcb}, \/  int {\em enable})}}
\label{LCBP_8c_be1c63971deb8ac7b9dcfee89be9fd55}


Enables/Disables the flow of events. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Event}]enable was not set before this call \item[{\em 1,Event}]enable was set before this call \item[{\em Anything}]else, an LCBP error\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB device handle \item[{\em enable}]Enable (1) / Disable (0) flag \end{description}
\end{Desc}


References \_\-LCBP::enabled.

Referenced by EBF\_\-streamProcess().\hypertarget{LCBP_8c_811a11f9546922c392ac56cb0bc19642}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-evt\_\-handler\_\-create@{LCBP\_\-evt\_\-handler\_\-create}}
\index{LCBP\_\-evt\_\-handler\_\-create@{LCBP\_\-evt\_\-handler\_\-create}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-evt\_\-handler\_\-create}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBP\_\-evt\_\-handler\_\-create ({\bf LCBP} {\em lcb}, \/  int {\em priority})}}
\label{LCBP_8c_811a11f9546922c392ac56cb0bc19642}


Creates the event que handler service task. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The LCBP driver handle \item[{\em priority}]The priority of the task. If specified as -1, then a default value is assigned. \end{description}
\end{Desc}


References \_\-LCBP\_\-fork::fcb, \_\-LCBP::fork, and \_\-LCBP\_\-fork::que.\hypertarget{LCBP_8c_c383a7eada15739f9bbb86207cebc138}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-evt\_\-que\_\-get@{LCBP\_\-evt\_\-que\_\-get}}
\index{LCBP\_\-evt\_\-que\_\-get@{LCBP\_\-evt\_\-que\_\-get}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-evt\_\-que\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}FORK\_\-que$\ast$ LCBP\_\-evt\_\-que\_\-get ({\bf LCBP} {\em lcb}, \/  int {\em que\_\-id})}}
\label{LCBP_8c_c383a7eada15739f9bbb86207cebc138}


Installs queue from {\em fcb\/} as the task message queue for event traffic. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em Pointer}]to the fork que or NULL if non-existent\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]Pointer to private LCBP structure \item[{\em que\_\-id}]The FORK que id \end{description}
\end{Desc}


References \_\-LCBP::fork, and \_\-LCBP\_\-fork::que.\hypertarget{LCBP_8c_5a770c288b97b8f13bcd26d636a45e71}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-evt\_\-que\_\-install@{LCBP\_\-evt\_\-que\_\-install}}
\index{LCBP\_\-evt\_\-que\_\-install@{LCBP\_\-evt\_\-que\_\-install}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-evt\_\-que\_\-install}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBP\_\-evt\_\-que\_\-install ({\bf LCBP} {\em lcb}, \/  FORK\_\-que $\ast$ {\em que})}}
\label{LCBP_8c_5a770c288b97b8f13bcd26d636a45e71}


Installs queue from {\em fcb\/} as the task message queue for event traffic. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,currently}]there is no failure mode \end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]Pointer to private LCBP structure \item[{\em que}]The FORK que to use \end{description}
\end{Desc}


References \_\-LCBP\_\-fork::fcb, \_\-LCBP::fork, and \_\-LCBP\_\-fork::que.\hypertarget{LCBP_8c_01a27cc29cbc1d6de851594ad8909584}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-get@{LCBP\_\-get}}
\index{LCBP\_\-get@{LCBP\_\-get}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf LCBP} LCBP\_\-get (void)}}
\label{LCBP_8c_01a27cc29cbc1d6de851594ad8909584}


Returns a pointer to the virtual LCB control block. 

\begin{Desc}
\item[Returns:]A pointer to the virtual LCB control block \end{Desc}
\hypertarget{LCBP_8c_f8dfef45c4c0bf567d3e00941feb7e81}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-pktsConnect@{LCBP\_\-pktsConnect}}
\index{LCBP\_\-pktsConnect@{LCBP\_\-pktsConnect}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-pktsConnect}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBP\_\-pktsConnect ({\bf LCBP} {\em lcb}, \/  {\bf EBF\_\-pkts} {\em pkts})}}
\label{LCBP_8c_f8dfef45c4c0bf567d3e00941feb7e81}


Connect a stream of packets to the virtual LCB. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB device handle \item[{\em pkts}]The vector of packets \end{description}
\end{Desc}


References \_\-LCBP::pkts.

Referenced by EBF\_\-streamProcess().\hypertarget{LCBP_8c_926f47d92d2f04cb9bc309a9c66672fc}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-pktsDeliver@{LCBP\_\-pktsDeliver}}
\index{LCBP\_\-pktsDeliver@{LCBP\_\-pktsDeliver}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-pktsDeliver}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBP\_\-pktsDeliver ({\bf LCBP} {\em lcb})}}
\label{LCBP_8c_926f47d92d2f04cb9bc309a9c66672fc}


Feeds one packet at a time to the user provided callback routine. 

\begin{Desc}
\item[Returns:]A bit mask of LCBP\_\-PKT\_\-FATE\_\-M from the terminating callback or LCBP\_\-PKT\_\-FATE\_\-M\_\-EOF;\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB device handle\end{description}
\end{Desc}
\begin{Desc}
\item[]The signature and return values are built to match that of the actual LCBP driver. Therefore, the user callback routine should work in both environments. The cavaet is that there obviously non-portable things one can do in the callback, like manipulating the contents of the vector of packets. The point is, that with this routine, at least the capability of writing a portable processing routine exists. \end{Desc}


References LCBP\_\-EDS\_\-K\_\-NORMAL, LCBP\_\-EDS\_\-K\_\-TIMED, normal\_\-delivery(), \_\-LCBP::style, and timed\_\-delivery().

Referenced by EBF\_\-streamProcess().\hypertarget{LCBP_8c_f6e69c6a38c80bdd93ba1f5ee584a036}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-pktsQuery@{LCBP\_\-pktsQuery}}
\index{LCBP\_\-pktsQuery@{LCBP\_\-pktsQuery}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-pktsQuery}]{\setlength{\rightskip}{0pt plus 5cm}{\bf EBF\_\-pkts} LCBP\_\-pktsQuery ({\bf LCBP} {\em lcb})}}
\label{LCBP_8c_f6e69c6a38c80bdd93ba1f5ee584a036}


Returns the current EBF\_\-pkts. 

\begin{Desc}
\item[Returns:]The current EBF\_\-pkts\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB device handle \end{description}
\end{Desc}


References \_\-LCBP::pkts.\hypertarget{LCBP_8c_43e71f907b9181f08de6cfd9733afb49}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-pktsRngFree@{LCBP\_\-pktsRngFree}}
\index{LCBP\_\-pktsRngFree@{LCBP\_\-pktsRngFree}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-pktsRngFree}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCBP\_\-pktsRngFree ({\bf LCBP} {\em lcb}, \/  {\bf EBF\_\-pkt} $\ast$ {\em from}, \/  {\bf EBF\_\-pkt} $\ast$ {\em to})}}
\label{LCBP_8c_43e71f907b9181f08de6cfd9733afb49}


Dummy implementation of the corresponds LCBD routine. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB device handle \item[{\em from}]The address to start the free at. \item[{\em to}]The address of the last packet to free. \end{description}
\end{Desc}
\hypertarget{LCBP_8c_56dd8b6124388bb3ea2961bb71918848}{
\index{LCBP.c@{LCBP.c}!LCBP\_\-sizeof@{LCBP\_\-sizeof}}
\index{LCBP\_\-sizeof@{LCBP\_\-sizeof}!LCBP.c@{LCBP.c}}
\subsubsection[{LCBP\_\-sizeof}]{\setlength{\rightskip}{0pt plus 5cm}int LCBP\_\-sizeof (void)}}
\label{LCBP_8c_56dd8b6124388bb3ea2961bb71918848}


Returns the size, in bytes, of a virtual LCB control block. 

\begin{Desc}
\item[Returns:]The size, in bytes, of a virtual LCB control block. \end{Desc}


Referenced by fileOpen().\hypertarget{LCBP_8c_2c3e4d71da921cdfb81c73be07872fe5}{
\index{LCBP.c@{LCBP.c}!normal\_\-delivery@{normal\_\-delivery}}
\index{normal\_\-delivery@{normal\_\-delivery}!LCBP.c@{LCBP.c}}
\subsubsection[{normal\_\-delivery}]{\setlength{\rightskip}{0pt plus 5cm}static unsigned int normal\_\-delivery ({\bf LCBP} {\em lcb})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LCBP_8c_2c3e4d71da921cdfb81c73be07872fe5}


Normal packet delivery. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB device handle \end{description}
\end{Desc}


References \_\-EBF\_\-ebw::bf, \_\-LCBP::cbps, EBF\_\-\_\-pktsAdvance(), EBF\_\-\_\-pktSize(), EBF\_\-\_\-pktsPkt(), EBF\_\-\_\-pktsSize(), \_\-EBF\_\-pkt::ebw, \_\-LCBP::enabled, \_\-EBF\_\-pkt::hdr, LCBV\_\-PKT\_\-FATE\_\-M\_\-ABORT, LCBV\_\-PKT\_\-FATE\_\-M\_\-EOF, LCBV\_\-PKT\_\-FATE\_\-M\_\-NO\_\-MORE, LCBV\_\-PKT\_\-FATE\_\-M\_\-PAUSE, \_\-LCBP::pkts, \_\-LCBP\_\-pktCbp::prm, \_\-LCBP\_\-pktCbp::rtn, \_\-EBF\_\-ebw::ui, \_\-EBF\_\-edw::ui, and \_\-EBF\_\-pktHdr::undef.

Referenced by LCBP\_\-pktsDeliver().\hypertarget{LCBP_8c_71c07193446b823e721ed07b05983a28}{
\index{LCBP.c@{LCBP.c}!timed\_\-delivery@{timed\_\-delivery}}
\index{timed\_\-delivery@{timed\_\-delivery}!LCBP.c@{LCBP.c}}
\subsubsection[{timed\_\-delivery}]{\setlength{\rightskip}{0pt plus 5cm}static unsigned int timed\_\-delivery ({\bf LCBP} {\em lcb})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{LCBP_8c_71c07193446b823e721ed07b05983a28}


Normal packet delivery. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]The virtual LCB device handle \end{description}
\end{Desc}


References \_\-EBF\_\-ebw::bf, \_\-LCBP::cbps, EBF\_\-\_\-pktsAdvance(), EBF\_\-\_\-pktSize(), EBF\_\-\_\-pktsPkt(), EBF\_\-\_\-pktsSize(), \_\-EBF\_\-pkt::ebw, \_\-LCBP::edm, EDM\_\-wait(), \_\-LCBP::enabled, evtHandler(), \_\-LCBP::fork, \_\-EBF\_\-pkt::hdr, LCBV\_\-PKT\_\-FATE\_\-M\_\-ABORT, LCBV\_\-PKT\_\-FATE\_\-M\_\-EOF, \_\-LCBP::pkts, \_\-LCBP\_\-pktCbp::prm, \_\-LCBP\_\-fork::que, \_\-LCBP\_\-pktCbp::rtn, \_\-EBF\_\-ebw::ui, \_\-EBF\_\-edw::ui, and \_\-EBF\_\-pktHdr::undef.

Referenced by LCBP\_\-pktsDeliver().