\hypertarget{lci_8h}{
\section{lci.h File Reference}
\label{lci_8h}\index{lci.h@{lci.h}}
}
Interface to the LAT Charge Injection package.  


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

\begin{CompactList}\small\item\em Structure to hold information about the last LCI run Must match the layout of LHK telemetry. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned \hyperlink{lci_8h_24343f001c0a9a2926398db94cff4fc5}{LCI\_\-getRunInfo} (\hyperlink{struct__LCI__runInfo}{LCI\_\-runInfo} $\ast$info)
\begin{CompactList}\small\item\em Get extended information about the calibration run. \item\end{CompactList}\item 
unsigned \hyperlink{lci_8h_472232a9e411b7729f097642d5dd1dd0}{LCI\_\-initialise} (void)
\begin{CompactList}\small\item\em Initialize the calibration system from its config database. \item\end{CompactList}\item 
unsigned \hyperlink{lci_8h_3f5607d9d9b5c085f23fbdc15f29d811}{LCI\_\-sizeofRunInfo} ()
\begin{CompactList}\small\item\em Get the size of the extended calibration run information. \item\end{CompactList}\item 
unsigned \hyperlink{lci_8h_bdd61cff8129f3677b0e1ed6cdeb60d8}{LCI\_\-startTask} (void)
\begin{CompactList}\small\item\em Start the LCI task using its config database. \item\end{CompactList}\item 
unsigned \hyperlink{lci_8h_b990de0d4b06a814804b8f30e8f45f15}{LCI\_\-stopTask} (void)
\begin{CompactList}\small\item\em Stop the LCI task. \item\end{CompactList}\item 
unsigned \hyperlink{lci_8h_189dae1a7ccb27b31bac5fb6dc89c9e7}{LCI\_\-teardown} (void)
\begin{CompactList}\small\item\em Tear down the calibration system. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Interface to the LAT Charge Injection package. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\hyperlink{lci_8h}{lci.h},v 1.8 2011/03/29 19:23:13 saxton Exp \end{Desc}


\subsection{Function Documentation}
\hypertarget{lci_8h_24343f001c0a9a2926398db94cff4fc5}{
\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 ({\bf LCI\_\-runInfo} $\ast$ {\em info})}}
\label{lci_8h_24343f001c0a9a2926398db94cff4fc5}


Get extended information about the calibration run. 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em info}]The address of a block to be filled with the current run information.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LCI\_\-SUCCESS}]success always \end{description}
\end{Desc}


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.\hypertarget{lci_8h_472232a9e411b7729f097642d5dd1dd0}{
\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 (void)}}
\label{lci_8h_472232a9e411b7729f097642d5dd1dd0}


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 {\em capacity\/}, {\em cpuid\/} and {\em srcid\/} parameters.

\begin{Desc}
\item[Returns:]Any of the return codes from LCI\_\-init \end{Desc}


References LCI\_\-init().\hypertarget{lci_8h_3f5607d9d9b5c085f23fbdc15f29d811}{
\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 (void)}}
\label{lci_8h_3f5607d9d9b5c085f23fbdc15f29d811}


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{Desc}
\item[Returns:]The size, in bytes, of the extended run information. \end{Desc}
\hypertarget{lci_8h_bdd61cff8129f3677b0e1ed6cdeb60d8}{
\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 (void)}}
\label{lci_8h_bdd61cff8129f3677b0e1ed6cdeb60d8}


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{Desc}
\item[Returns:]Any of the return codes from LCI\_\-startTask \end{Desc}


References LCI\_\-start().\hypertarget{lci_8h_b990de0d4b06a814804b8f30e8f45f15}{
\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 (void)}}
\label{lci_8h_b990de0d4b06a814804b8f30e8f45f15}


Stop the LCI task. 

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

\begin{Desc}
\item[Returns:]LCI\_\-STATE if the state is not WAITING, an error status code from ITC\_\-stopTask or LCI\_\-SUCCESS if all goes well \end{Desc}
\hypertarget{lci_8h_189dae1a7ccb27b31bac5fb6dc89c9e7}{
\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 (void)}}
\label{lci_8h_189dae1a7ccb27b31bac5fb6dc89c9e7}


Tear down the calibration system. 

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

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LCI\_\-STATE}]If the LCI task is not in the INITIALISED state\item[{\em LCI\_\-SUCCESS}]If all goes well \end{description}
\end{Desc}


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

Referenced by LCI\_\-init().