\section{lci.h File Reference}
\label{lci_8h}\index{lci.h@{lci.h}}


Interface to the LAT Charge Injection package.  


{\ttfamily \#include $<$PBS/TASK.h$>$}\par
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct__LCI__runInfo}{\_\-LCI\_\-runInfo}
\begin{DoxyCompactList}\small\item\em Structure to hold information about the last LCI run Must match the layout of LHK telemetry. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \hyperlink{struct__LCI__runInfo}{\_\-LCI\_\-runInfo} \hyperlink{lci_8h_a8e24f76689496c2ae172387825523f0d}{LCI\_\-runInfo}\label{lci_8h_a8e24f76689496c2ae172387825523f0d}

\begin{DoxyCompactList}\small\item\em Structure to hold information about the last LCI run Must match the layout of LHK telemetry. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
unsigned \hyperlink{lci_8h_a24343f001c0a9a2926398db94cff4fc5}{LCI\_\-getRunInfo} (\hyperlink{struct__LCI__runInfo}{LCI\_\-runInfo} $\ast$info)
\begin{DoxyCompactList}\small\item\em Get extended information about the calibration run. \end{DoxyCompactList}\item 
unsigned \hyperlink{lci_8h_a472232a9e411b7729f097642d5dd1dd0}{LCI\_\-initialise} (void)
\begin{DoxyCompactList}\small\item\em Initialize the calibration system from its config database. \end{DoxyCompactList}\item 
unsigned \hyperlink{lci_8h_a3f5607d9d9b5c085f23fbdc15f29d811}{LCI\_\-sizeofRunInfo} ()
\begin{DoxyCompactList}\small\item\em Get the size of the extended calibration run information. \end{DoxyCompactList}\item 
unsigned \hyperlink{lci_8h_abdd61cff8129f3677b0e1ed6cdeb60d8}{LCI\_\-startTask} (void)
\begin{DoxyCompactList}\small\item\em Start the LCI task using its config database. \end{DoxyCompactList}\item 
unsigned \hyperlink{lci_8h_ab990de0d4b06a814804b8f30e8f45f15}{LCI\_\-stopTask} (void)
\begin{DoxyCompactList}\small\item\em Stop the LCI task. \end{DoxyCompactList}\item 
unsigned \hyperlink{lci_8h_a189dae1a7ccb27b31bac5fb6dc89c9e7}{LCI\_\-teardown} (void)
\begin{DoxyCompactList}\small\item\em Tear down the calibration system. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Interface to the LAT Charge Injection package. \begin{DoxyAuthor}{Author}
James Swain \& Owen Saxton
\end{DoxyAuthor}
\begin{DoxyParagraph}{Id:}
\hyperlink{lci_8h}{lci.h},v 1.8 2011/03/29 19:23:13 saxton Exp 
\end{DoxyParagraph}


\subsection{Function Documentation}
\index{lci.h@{lci.h}!LCI\_\-getRunInfo@{LCI\_\-getRunInfo}}
\index{LCI\_\-getRunInfo@{LCI\_\-getRunInfo}!lci.h@{lci.h}}
\subsubsection[{LCI\_\-getRunInfo}]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-getRunInfo (
\begin{DoxyParamCaption}
\item[{{\bf LCI\_\-runInfo} $\ast$}]{info}
\end{DoxyParamCaption}
)}\label{lci_8h_a24343f001c0a9a2926398db94cff4fc5}


Get extended information about the calibration run. 

This routine fills a block of information detailing the current state of calibration runs.


\begin{DoxyParams}{Parameters}
{\em info} & The address of a block to be filled with the current run information.\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em LCI\_\-SUCCESS} & success always \\
\hline
\end{DoxyRetVals}


References \_\-LCI\_\-runInfo::cfgFid, \_\-LCI\_\-runInfo::endSec, \_\-LCI\_\-runInfo::endSub, \_\-LCI\_\-runInfo::latcFid, \_\-LCI\_\-runInfo::runId, \_\-LCI\_\-runInfo::spare, \_\-LCI\_\-runInfo::startSec, \_\-LCI\_\-runInfo::startSub, and \_\-LCI\_\-runInfo::status.

\index{lci.h@{lci.h}!LCI\_\-initialise@{LCI\_\-initialise}}
\index{LCI\_\-initialise@{LCI\_\-initialise}!lci.h@{lci.h}}
\subsubsection[{LCI\_\-initialise}]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-initialise (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{lci_8h_a472232a9e411b7729f097642d5dd1dd0}


Initialize the calibration system from its config database. 

This routine is normally called at system initialization time to initialize the calibration system . It uses a configuration database to supply the {\itshape capacity\/}, {\itshape cpuid\/} and {\itshape srcid\/} parameters.

\begin{DoxyReturn}{Returns}
Any of the return codes from LCI\_\-init 
\end{DoxyReturn}


References LCI\_\-init().

\index{lci.h@{lci.h}!LCI\_\-sizeofRunInfo@{LCI\_\-sizeofRunInfo}}
\index{LCI\_\-sizeofRunInfo@{LCI\_\-sizeofRunInfo}!lci.h@{lci.h}}
\subsubsection[{LCI\_\-sizeofRunInfo}]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-sizeofRunInfo (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{lci_8h_a3f5607d9d9b5c085f23fbdc15f29d811}


Get the size of the extended calibration run information. 

This routine returns the size of the area needed to hold the extended run information for the last calibration.

\begin{DoxyReturn}{Returns}
The size, in bytes, of the extended run information. 
\end{DoxyReturn}
\index{lci.h@{lci.h}!LCI\_\-startTask@{LCI\_\-startTask}}
\index{LCI\_\-startTask@{LCI\_\-startTask}!lci.h@{lci.h}}
\subsubsection[{LCI\_\-startTask}]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-startTask (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{lci_8h_abdd61cff8129f3677b0e1ed6cdeb60d8}


Start the LCI task using its config database. 

This routine is normally called during system initialization. It starts the LCI task using the CPU configuration database to supply its attributes.

\begin{DoxyReturn}{Returns}
Any of the return codes from LCI\_\-startTask 
\end{DoxyReturn}


References LCI\_\-start().

\index{lci.h@{lci.h}!LCI\_\-stopTask@{LCI\_\-stopTask}}
\index{LCI\_\-stopTask@{LCI\_\-stopTask}!lci.h@{lci.h}}
\subsubsection[{LCI\_\-stopTask}]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-stopTask (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{lci_8h_ab990de0d4b06a814804b8f30e8f45f15}


Stop the LCI task. 

This routine stops the LCI task and sets the state to INITIALISED.

\begin{DoxyReturn}{Returns}
LCI\_\-STATE if the state is not WAITING, an error status code from ITC\_\-stopTask or LCI\_\-SUCCESS if all goes well 
\end{DoxyReturn}
\index{lci.h@{lci.h}!LCI\_\-teardown@{LCI\_\-teardown}}
\index{LCI\_\-teardown@{LCI\_\-teardown}!lci.h@{lci.h}}
\subsubsection[{LCI\_\-teardown}]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-teardown (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{lci_8h_a189dae1a7ccb27b31bac5fb6dc89c9e7}


Tear down the calibration system. 

This routine frees all the resources associated with the LCI task.


\begin{DoxyRetVals}{Return values}
{\em LCI\_\-STATE} & If the LCI task is not in the INITIALISED state\\
\hline
{\em LCI\_\-SUCCESS} & If all goes well \\
\hline
\end{DoxyRetVals}


References LCI\_\-Apid67c, LCI\_\-Apid67d, and LCI\_\-deleteController().



Referenced by LCI\_\-init().

