\hypertarget{consign_8h}{
\section{consign.h File Reference}
\label{consign_8h}\index{consign.h@{consign.h}}
}
Public definitions of the consignment structure and functions. 

{\tt \#include \char`\"{}configure.h\char`\"{}}\par
{\tt \#include \char`\"{}collect.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEC/compact.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/WCT.h\char`\"{}}\par


Include dependency graph for consign.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=191pt]{consign_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=156pt]{consign_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{consign_8h_a0}{
typedef \hyperlink{struct__LCI__consignment}{\_\-LCI\_\-consignment} \hyperlink{consign_8h_a0}{LCI\_\-consignment}}
\label{consign_8h_a0}

\begin{CompactList}\small\item\em Declaration of the opaque consignment structure. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{struct__LCI__consignment}{LCI\_\-consignment} $\ast$ \hyperlink{consign_8h_a1}{LCI\_\-new\-Consignment} (unsigned cpuid, unsigned srcid, \hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, \hyperlink{struct__LCI__collection}{LCI\_\-collection} $\ast$cll, LSEC\_\-compaction $\ast$cpc)
\begin{CompactList}\small\item\em Allocate memory for an LCI\_\-consigment structure and initialise (clear). \item\end{CompactList}\item 
void \hyperlink{consign_8h_a2}{LCI\_\-delete\-Consignment} (\hyperlink{struct__LCI__consignment}{LCI\_\-consignment} $\ast$cns)
\begin{CompactList}\small\item\em Free the previously allocated consignment structure. \item\end{CompactList}\item 
WCT\_\-time\_\-sat \hyperlink{consign_8h_a3}{LCI\_\-prepare} (\hyperlink{struct__LCI__consignment}{LCI\_\-consignment} $\ast$cns, unsigned runid)
\begin{CompactList}\small\item\em Set the runid and start time for the first datagram of the new calibration. \item\end{CompactList}\item 
unsigned \hyperlink{consign_8h_a4}{LCI\_\-consign} (\hyperlink{struct__LCI__consignment}{LCI\_\-consignment} $\ast$cns)
\begin{CompactList}\small\item\em Perform a consignment. \item\end{CompactList}\item 
unsigned \hyperlink{consign_8h_a5}{LCI\_\-complete} (\hyperlink{struct__LCI__consignment}{LCI\_\-consignment} $\ast$cns)
\begin{CompactList}\small\item\em Complete a consignment. \item\end{CompactList}\item 
void \hyperlink{consign_8h_a6}{LCI\_\-set\-Reason} (\hyperlink{struct__LCI__consignment}{LCI\_\-consignment} $\ast$cns, int reason)
\begin{CompactList}\small\item\em Set the current datagram close reason. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Public definitions of the consignment structure and functions. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\hyperlink{consign_8h}{consign.h},v 1.11 2007/08/21 22:51:56 saxton Exp \end{Desc}


\subsection{Function Documentation}
\hypertarget{consign_8h_a5}{
\index{consign.h@{consign.h}!LCI_complete@{LCI\_\-complete}}
\index{LCI_complete@{LCI\_\-complete}!consign.h@{consign.h}}
\subsubsection[LCI\_\-complete]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-complete (\hyperlink{struct__LCI__consignment}{LCI\_\-consignment} $\ast$ {\em cns})}}
\label{consign_8h_a5}


Complete a consignment. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cns}]pointer to the consignment\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LCI\_\-SUCCESS}]If all goes well\end{description}
\end{Desc}
\hypertarget{consign_8h_a4}{
\index{consign.h@{consign.h}!LCI_consign@{LCI\_\-consign}}
\index{LCI_consign@{LCI\_\-consign}!consign.h@{consign.h}}
\subsubsection[LCI\_\-consign]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-consign (\hyperlink{struct__LCI__consignment}{LCI\_\-consignment} $\ast$ {\em cns})}}
\label{consign_8h_a4}


Perform a consignment. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cns}]Pointer to a consignment structure\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LCI\_\-SUCCESS}]If all goes well\end{description}
\end{Desc}
\hypertarget{consign_8h_a2}{
\index{consign.h@{consign.h}!LCI_deleteConsignment@{LCI\_\-deleteConsignment}}
\index{LCI_deleteConsignment@{LCI\_\-deleteConsignment}!consign.h@{consign.h}}
\subsubsection[LCI\_\-deleteConsignment]{\setlength{\rightskip}{0pt plus 5cm}void LCI\_\-delete\-Consignment (\hyperlink{struct__LCI__consignment}{LCI\_\-consignment} $\ast$ {\em cns})}}
\label{consign_8h_a2}


Free the previously allocated consignment structure. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cns}]Pointer to allocated, intialised consignment structure (from LCI\_\-new\-Consignment)\end{description}
\end{Desc}
\hypertarget{consign_8h_a1}{
\index{consign.h@{consign.h}!LCI_newConsignment@{LCI\_\-newConsignment}}
\index{LCI_newConsignment@{LCI\_\-newConsignment}!consign.h@{consign.h}}
\subsubsection[LCI\_\-newConsignment]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__LCI__consignment}{LCI\_\-consignment}$\ast$ LCI\_\-new\-Consignment (unsigned {\em cpuid}, unsigned {\em srcid}, \hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf}, \hyperlink{struct__LCI__collection}{LCI\_\-collection} $\ast$ {\em cll}, LSEC\_\-compaction $\ast$ {\em cpc})}}
\label{consign_8h_a1}


Allocate memory for an LCI\_\-consigment structure and initialise (clear). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em srcid}]ID of the data source\item[{\em cpuid}]ID of the CPU LCI is being run on\item[{\em cll}]Pointer to the collection of events to consign\item[{\em cpc}]Pointer to the compaction state information\item[{\em cnf}]Pointer to the configuration data\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer to an allocated, initialised consignment (NULL if there is an error allocating memory)\end{Desc}
\hypertarget{consign_8h_a3}{
\index{consign.h@{consign.h}!LCI_prepare@{LCI\_\-prepare}}
\index{LCI_prepare@{LCI\_\-prepare}!consign.h@{consign.h}}
\subsubsection[LCI\_\-prepare]{\setlength{\rightskip}{0pt plus 5cm}WCT\_\-time\_\-sat LCI\_\-prepare (\hyperlink{struct__LCI__consignment}{LCI\_\-consignment} $\ast$ {\em cns}, unsigned {\em runid})}}
\label{consign_8h_a3}


Set the runid and start time for the first datagram of the new calibration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cns}]Pointer to allocated, intialised consignment structure (from LCI\_\-new\-Consignment)\item[{\em runid}]32-bit number identifying the calibration run\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The run start time (as a 64-bit Spectrum Astro time)\end{Desc}
\hypertarget{consign_8h_a6}{
\index{consign.h@{consign.h}!LCI_setReason@{LCI\_\-setReason}}
\index{LCI_setReason@{LCI\_\-setReason}!consign.h@{consign.h}}
\subsubsection[LCI\_\-setReason]{\setlength{\rightskip}{0pt plus 5cm}void LCI\_\-set\-Reason (\hyperlink{struct__LCI__consignment}{LCI\_\-consignment} $\ast$ {\em cns}, int {\em reason})}}
\label{consign_8h_a6}


Set the current datagram close reason. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cns}]Pointer to the consignment structure\item[{\em reason}]The reason code to be set\end{description}
\end{Desc}
