\hypertarget{LHK_8h}{
\section{LHK.h File Reference}
\label{LHK_8h}\index{LHK.h@{LHK.h}}
}
Public interface to LHK routines. 

{\tt \#include \char`\"{}PBS/TASK.h\char`\"{}}\par


Include dependency graph for LHK.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=103pt]{LHK_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=155pt]{LHK_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned int \hyperlink{LHK_8h_a0}{LHK\_\-init} (void)
\begin{CompactList}\small\item\em Initializes the housekeeping system. \item\end{CompactList}\item 
unsigned int \hyperlink{LHK_8h_a1}{LHK\_\-initialize} (unsigned int arg0, unsigned int arg1, unsigned int arg2, unsigned int arg3)
\begin{CompactList}\small\item\em Initializes the housekeeping system. \item\end{CompactList}\item 
unsigned int \hyperlink{LHK_8h_a2}{LHK\_\-start} (void)
\begin{CompactList}\small\item\em Starts all LHK tasks. \item\end{CompactList}\item 
unsigned int \hyperlink{LHK_8h_a3}{LHK\_\-start\-Task} (const TASK\_\-attr sched\_\-attr, const TASK\_\-attr cmd\_\-attr)
\begin{CompactList}\small\item\em Starts all LHK tasks with attribute blocks. \item\end{CompactList}\item 
unsigned int \hyperlink{LHK_8h_a4}{LHK\_\-stop} (void)
\begin{CompactList}\small\item\em Stops all LHK tasks and resets all control structures. \item\end{CompactList}\item 
unsigned int \hyperlink{LHK_8h_a5}{LHK\_\-shutdown} (void)
\begin{CompactList}\small\item\em Shuts down LHK and frees memory structures. \item\end{CompactList}\item 
unsigned int \hyperlink{LHK_8h_a6}{LHK\_\-ctdb\_\-cb} (void $\ast$pkt, void $\ast$arg)
\begin{CompactList}\small\item\em This function is the CTDB 1553 callback routine. The CTDB driver requests a new telemetry packet at 4Hz. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Public interface to LHK routines. 

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


\subsection{Function Documentation}
\hypertarget{LHK_8h_a6}{
\index{LHK.h@{LHK.h}!LHK_ctdb_cb@{LHK\_\-ctdb\_\-cb}}
\index{LHK_ctdb_cb@{LHK\_\-ctdb\_\-cb}!LHK.h@{LHK.h}}
\subsubsection[LHK\_\-ctdb\_\-cb]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LHK\_\-ctdb\_\-cb (void $\ast$ {\em pkt}, void $\ast$ {\em arg})}}
\label{LHK_8h_a6}


This function is the CTDB 1553 callback routine. The CTDB driver requests a new telemetry packet at 4Hz. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]Packet buffer pointer \item[{\em arg}]User supplied argument \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]LHK\_\-SUCCESS on success\end{Desc}
\hypertarget{LHK_8h_a0}{
\index{LHK.h@{LHK.h}!LHK_init@{LHK\_\-init}}
\index{LHK_init@{LHK\_\-init}!LHK.h@{LHK.h}}
\subsubsection[LHK\_\-init]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LHK\_\-init (void)}}
\label{LHK_8h_a0}


Initializes the housekeeping system. 

\begin{Desc}
\item[Returns:]LHK\_\-SUCCESS on success\end{Desc}
\hypertarget{LHK_8h_a1}{
\index{LHK.h@{LHK.h}!LHK_initialize@{LHK\_\-initialize}}
\index{LHK_initialize@{LHK\_\-initialize}!LHK.h@{LHK.h}}
\subsubsection[LHK\_\-initialize]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LHK\_\-initialize (unsigned int {\em arg0}, unsigned int {\em arg1}, unsigned int {\em arg2}, unsigned int {\em arg3})}}
\label{LHK_8h_a1}


Initializes the housekeeping system. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em arg0}]cfg file id \item[{\em arg1}]cfg file id \item[{\em arg2}]cfg file id \item[{\em arg3}]cfg file id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]LHK\_\-SUCCESS on success\end{Desc}
\hypertarget{LHK_8h_a5}{
\index{LHK.h@{LHK.h}!LHK_shutdown@{LHK\_\-shutdown}}
\index{LHK_shutdown@{LHK\_\-shutdown}!LHK.h@{LHK.h}}
\subsubsection[LHK\_\-shutdown]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LHK\_\-shutdown (void)}}
\label{LHK_8h_a5}


Shuts down LHK and frees memory structures. 

\begin{Desc}
\item[Returns:]LHK\_\-SUCCESS on success\end{Desc}
\hypertarget{LHK_8h_a2}{
\index{LHK.h@{LHK.h}!LHK_start@{LHK\_\-start}}
\index{LHK_start@{LHK\_\-start}!LHK.h@{LHK.h}}
\subsubsection[LHK\_\-start]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LHK\_\-start (void)}}
\label{LHK_8h_a2}


Starts all LHK tasks. 

\begin{Desc}
\item[Returns:]LHK\_\-SUCCESS on success\end{Desc}
\hypertarget{LHK_8h_a3}{
\index{LHK.h@{LHK.h}!LHK_startTask@{LHK\_\-startTask}}
\index{LHK_startTask@{LHK\_\-startTask}!LHK.h@{LHK.h}}
\subsubsection[LHK\_\-startTask]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LHK\_\-start\-Task (TASK\_\-attr {\em sched\_\-attr}, TASK\_\-attr {\em cmd\_\-attr})}}
\label{LHK_8h_a3}


Starts all LHK tasks with attribute blocks. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sched\_\-attr}]Scheduler task attributes \item[{\em cmd\_\-attr}]Command task attribute \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]LHK\_\-SUCCESS on success\end{Desc}
\hypertarget{LHK_8h_a4}{
\index{LHK.h@{LHK.h}!LHK_stop@{LHK\_\-stop}}
\index{LHK_stop@{LHK\_\-stop}!LHK.h@{LHK.h}}
\subsubsection[LHK\_\-stop]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LHK\_\-stop (void)}}
\label{LHK_8h_a4}


Stops all LHK tasks and resets all control structures. 

\begin{Desc}
\item[Returns:]LHK\_\-SUCCESS on success\end{Desc}
