\hypertarget{dump_8c}{
\section{dump.c File Reference}
\label{dump_8c}\index{dump.c@{dump.c}}
}
Framework used to parse the contents of a stream of datagrams. 

{\tt \#include \char`\"{}dump\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}list\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}QSD/CCSDS\_\-apid\-Dsc.h\char`\"{}}\par
{\tt \#include \char`\"{}QSD/CCSDS\_\-istream.h\char`\"{}}\par
{\tt \#include \char`\"{}QSD/CCSDS\_\-telemetry.h\char`\"{}}\par
{\tt \#include \char`\"{}LSE/LSE\_\-ids.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-scan.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-print.h\char`\"{}}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$string.h$>$}\par


Include dependency graph for dump.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=280pt]{dump_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static LSF\_\-scan\-Contribution\-Handler \hyperlink{dump_8c_a1}{screen\_\-dgm} (\hyperlink{struct__ApidStream}{Apid\-Stream} $\ast$astream, const LSF\_\-datagram $\ast$dgm)
\begin{CompactList}\small\item\em Screens out any datagrams that are not the ones of interest. \item\end{CompactList}\item 
size\_\-t \hyperlink{dump_8c_a2}{DUMP\_\-sizeof\-Astream} (void)
\begin{CompactList}\small\item\em Return the size of the Apid\-Stream structure. \item\end{CompactList}\item 
\hyperlink{struct__ApidStream}{Apid\-Stream} $\ast$ \hyperlink{dump_8c_a3}{DUMP\_\-construct\-Astream} (void $\ast$astream, unsigned int dgmid, unsigned short apid, unsigned char $\ast$dsc\_\-buf, size\_\-t buf\_\-size, \hyperlink{dump_8h_a1}{DUMP\_\-dgm\-Handler} $\ast$dgm\_\-handler, void $\ast$rsrc)
\begin{CompactList}\small\item\em Construct an Apid\-Stream structure using the resources provided. \item\end{CompactList}\item 
void $\ast$ \hyperlink{dump_8c_a4}{DUMP\_\-get\-Resource} (\hyperlink{struct__ApidStream}{Apid\-Stream} $\ast$astream)
\begin{CompactList}\small\item\em Hand back the pointer to the application resources. \item\end{CompactList}\item 
int \hyperlink{dump_8c_a5}{DUMP\_\-process} (const char $\ast$file, int dmp\_\-ccsds)
\begin{CompactList}\small\item\em Process a file of science datagrams. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hypertarget{dump_8c_a0}{
static \hyperlink{structLL__node__}{LL\_\-node} {\bf apid\_\-list} = \{NULL, 0, NULL\}}
\label{dump_8c_a0}

\end{CompactItemize}


\subsection{Detailed Description}
Framework used to parse the contents of a stream of datagrams. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\hyperlink{dump_8c}{dump.c},v 1.4 2008/04/17 22:41:34 apw Exp \end{Desc}


\subsection{Function Documentation}
\hypertarget{dump_8c_a3}{
\index{dump.c@{dump.c}!DUMP_constructAstream@{DUMP\_\-constructAstream}}
\index{DUMP_constructAstream@{DUMP\_\-constructAstream}!dump.c@{dump.c}}
\subsubsection[DUMP\_\-constructAstream]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__ApidStream}{Apid\-Stream}$\ast$ DUMP\_\-construct\-Astream (void $\ast$ {\em astream}, unsigned int {\em dgmid}, unsigned short {\em apid}, unsigned char $\ast$ {\em dsc\_\-buf}, size\_\-t {\em buf\_\-size}, \hyperlink{dump_8h_a1}{DUMP\_\-dgm\-Handler} $\ast$ {\em dgm\_\-handler}, void $\ast$ {\em rsrc})}}
\label{dump_8c_a3}


Construct an Apid\-Stream structure using the resources provided. 

\begin{Desc}
\item[Returns:]Pointer to the constructed Apid\-Stream structure\end{Desc}
\hypertarget{dump_8c_a4}{
\index{dump.c@{dump.c}!DUMP_getResource@{DUMP\_\-getResource}}
\index{DUMP_getResource@{DUMP\_\-getResource}!dump.c@{dump.c}}
\subsubsection[DUMP\_\-getResource]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ DUMP\_\-get\-Resource (\hyperlink{struct__ApidStream}{Apid\-Stream} $\ast$ {\em astream})}}
\label{dump_8c_a4}


Hand back the pointer to the application resources. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em astream}]Pointer to the Apid\-Stream structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer handed to DUMP when DUMP\_\-construct\-Astream was invoked\end{Desc}
\hypertarget{dump_8c_a5}{
\index{dump.c@{dump.c}!DUMP_process@{DUMP\_\-process}}
\index{DUMP_process@{DUMP\_\-process}!dump.c@{dump.c}}
\subsubsection[DUMP\_\-process]{\setlength{\rightskip}{0pt plus 5cm}int DUMP\_\-process (const char $\ast$ {\em file}, int {\em dmp\_\-ccsds})}}
\label{dump_8c_a5}


Process a file of science datagrams. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file}]Name of the file to process\item[{\em dmp\_\-ccsds}]Flag indicating whether (1) or not (0) to print out the raw CCSDS\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0}]Success \item[{\em $\sim$0}]Failure\end{description}
\end{Desc}
\hypertarget{dump_8c_a2}{
\index{dump.c@{dump.c}!DUMP_sizeofAstream@{DUMP\_\-sizeofAstream}}
\index{DUMP_sizeofAstream@{DUMP\_\-sizeofAstream}!dump.c@{dump.c}}
\subsubsection[DUMP\_\-sizeofAstream]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t DUMP\_\-sizeof\-Astream (void)}}
\label{dump_8c_a2}


Return the size of the Apid\-Stream structure. 

\begin{Desc}
\item[Returns:]Size of the Apid\-Stream structure\end{Desc}
\hypertarget{dump_8c_a1}{
\index{dump.c@{dump.c}!screen_dgm@{screen\_\-dgm}}
\index{screen_dgm@{screen\_\-dgm}!dump.c@{dump.c}}
\subsubsection[screen\_\-dgm]{\setlength{\rightskip}{0pt plus 5cm}LSF\_\-scan\-Contribution\-Handler screen\_\-dgm (\hyperlink{struct__ApidStream}{Apid\-Stream} $\ast$ {\em astream}, const LSF\_\-datagram $\ast$ {\em dgm})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{dump_8c_a1}


Screens out any datagrams that are not the ones of interest. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em astream}]Apid\-Stream pointer\item[{\em dgm}]The datagram\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Either a stop scan signal or the contribution handler\end{Desc}
