\hypertarget{LTX_8c}{
\section{LTX.c File Reference}
\label{LTX_8c}\index{LTX.c@{LTX.c}}
}
LTX library, contains the socket initialization and LAT flight software and hardware discovery routines.  


{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$time.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$ctype.h$>$}\par
{\tt \#include \char`\"{}CMX/CMX\_\-as\-Built\-Pub.h\char`\"{}}\par
{\tt \#include \char`\"{}LTX\_\-pcihdr.h\char`\"{}}\par
{\tt \#include \char`\"{}LTX/LTX\_\-pub.h\char`\"{}}\par
{\tt \#include \char`\"{}LTX\_\-priv.h\char`\"{}}\par
{\tt \#include \char`\"{}LTX/LTX\_\-server.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{LTX_8c_a0}{LTX\_\-SOCK\_\-BUFSIZE}\ 256
\item 
\#define \hyperlink{LTX_8c_a1}{LTX\_\-STR\_\-SIZE}\ 32
\item 
\#define \hyperlink{LTX_8c_a2}{LTX\_\-TASK\_\-ID}\ \char`\"{}t\-LTXrx\char`\"{}
\item 
\#define \hyperlink{LTX_8c_a3}{LTX\_\-TASK\_\-PRI}\ 160
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{LTX_8c_a6}{LTX\_\-Initialize} (int tx\_\-port, int rx\_\-port)
\begin{CompactList}\small\item\em Initializes the socket server. \item\end{CompactList}\item 
int \hyperlink{LTX_8c_a7}{LTX\_\-Shutdown} (void)
\begin{CompactList}\small\item\em Shuts down the socket server. \item\end{CompactList}\item 
int \hyperlink{LTX_8c_a8}{LTX\_\-Sw\-Report} (void)
\begin{CompactList}\small\item\em Runs the software reporting mechanism. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
void $\ast$ \hyperlink{LTX_8c_a4}{svr}
\item 
\hyperlink{struct__LTX__server__config}{LTX\_\-server\_\-config} \hyperlink{LTX_8c_a5}{svr\-Cfg}
\end{CompactItemize}


\subsection{Detailed Description}
LTX library, contains the socket initialization and LAT flight software and hardware discovery routines. 

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


\footnotesize\begin{verbatim}

   CVS $Id: LTX.c,v 1.3 2003/10/10 15:54:06 smaldona Exp $
   
\end{verbatim}\normalsize


\subsection{Define Documentation}
\hypertarget{LTX_8c_a0}{
\index{LTX.c@{LTX.c}!LTX_SOCK_BUFSIZE@{LTX\_\-SOCK\_\-BUFSIZE}}
\index{LTX_SOCK_BUFSIZE@{LTX\_\-SOCK\_\-BUFSIZE}!LTX.c@{LTX.c}}
\subsubsection[LTX\_\-SOCK\_\-BUFSIZE]{\setlength{\rightskip}{0pt plus 5cm}\#define LTX\_\-SOCK\_\-BUFSIZE\ 256}}
\label{LTX_8c_a0}


Socket buffer size \hypertarget{LTX_8c_a1}{
\index{LTX.c@{LTX.c}!LTX_STR_SIZE@{LTX\_\-STR\_\-SIZE}}
\index{LTX_STR_SIZE@{LTX\_\-STR\_\-SIZE}!LTX.c@{LTX.c}}
\subsubsection[LTX\_\-STR\_\-SIZE]{\setlength{\rightskip}{0pt plus 5cm}\#define LTX\_\-STR\_\-SIZE\ 32}}
\label{LTX_8c_a1}


The max string size \hypertarget{LTX_8c_a2}{
\index{LTX.c@{LTX.c}!LTX_TASK_ID@{LTX\_\-TASK\_\-ID}}
\index{LTX_TASK_ID@{LTX\_\-TASK\_\-ID}!LTX.c@{LTX.c}}
\subsubsection[LTX\_\-TASK\_\-ID]{\setlength{\rightskip}{0pt plus 5cm}\#define LTX\_\-TASK\_\-ID\ \char`\"{}t\-LTXrx\char`\"{}}}
\label{LTX_8c_a2}


The LTX task ID \hypertarget{LTX_8c_a3}{
\index{LTX.c@{LTX.c}!LTX_TASK_PRI@{LTX\_\-TASK\_\-PRI}}
\index{LTX_TASK_PRI@{LTX\_\-TASK\_\-PRI}!LTX.c@{LTX.c}}
\subsubsection[LTX\_\-TASK\_\-PRI]{\setlength{\rightskip}{0pt plus 5cm}\#define LTX\_\-TASK\_\-PRI\ 160}}
\label{LTX_8c_a3}


The LTX task priority 

\subsection{Function Documentation}
\hypertarget{LTX_8c_a6}{
\index{LTX.c@{LTX.c}!LTX_Initialize@{LTX\_\-Initialize}}
\index{LTX_Initialize@{LTX\_\-Initialize}!LTX.c@{LTX.c}}
\subsubsection[LTX\_\-Initialize]{\setlength{\rightskip}{0pt plus 5cm}int LTX\_\-Initialize (int {\em tx\_\-port}, int {\em rx\_\-port})}}
\label{LTX_8c_a6}


Initializes the socket server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em tx\_\-port}]The transmit socket port number. \item[{\em rx\_\-port}]The receive socket port number.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LTX\_\-OK}]Success. \item[{\em LTX\_\-ERR}]Failure. \end{description}
\end{Desc}
\hypertarget{LTX_8c_a7}{
\index{LTX.c@{LTX.c}!LTX_Shutdown@{LTX\_\-Shutdown}}
\index{LTX_Shutdown@{LTX\_\-Shutdown}!LTX.c@{LTX.c}}
\subsubsection[LTX\_\-Shutdown]{\setlength{\rightskip}{0pt plus 5cm}int LTX\_\-Shutdown (void)}}
\label{LTX_8c_a7}


Shuts down the socket server. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LTX\_\-OK}]Success. \item[{\em LTX\_\-ERR}]Failure. \end{description}
\end{Desc}
\hypertarget{LTX_8c_a8}{
\index{LTX.c@{LTX.c}!LTX_SwReport@{LTX\_\-SwReport}}
\index{LTX_SwReport@{LTX\_\-SwReport}!LTX.c@{LTX.c}}
\subsubsection[LTX\_\-SwReport]{\setlength{\rightskip}{0pt plus 5cm}int LTX\_\-Sw\-Report (void)}}
\label{LTX_8c_a8}


Runs the software reporting mechanism. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LTX\_\-OK}]Success. \item[{\em LTX\_\-ERR}]Failure. \end{description}
\end{Desc}


\subsection{Variable Documentation}
\hypertarget{LTX_8c_a4}{
\index{LTX.c@{LTX.c}!svr@{svr}}
\index{svr@{svr}!LTX.c@{LTX.c}}
\subsubsection[svr]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ \hyperlink{LTX_8c_a4}{svr}}}
\label{LTX_8c_a4}


Socket server handle \hypertarget{LTX_8c_a5}{
\index{LTX.c@{LTX.c}!svrCfg@{svrCfg}}
\index{svrCfg@{svrCfg}!LTX.c@{LTX.c}}
\subsubsection[svrCfg]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__LTX__server__config}{LTX\_\-server\_\-config} \hyperlink{LTX_8c_a5}{svr\-Cfg}}}
\label{LTX_8c_a5}


Socket server configuration handle 