\hypertarget{create_8c}{
\section{create.c File Reference}
\label{create_8c}\index{create.c@{create.c}}
}
Calibration configuration file creation functions. 

{\tt \#include \char`\"{}lci\_\-host\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}configure\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}LCI/LCI\_\-msgs.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEC/LSEC\_\-ctx.h\char`\"{}}\par
{\tt \#include \char`\"{}FBS/FBS\_\-pubrtos.h\char`\"{}}\par
{\tt \#include \char`\"{}MSG/MSG\_\-pubdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/BSWP.h\char`\"{}}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$fcntl.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned \hyperlink{create_8c_3a846ff20a4be0eec20b39d0de760612}{LCI\_\-create} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, const char $\ast$filename, int mode)
\begin{CompactList}\small\item\em Open the file and associate it with this configuration structure. \item\end{CompactList}\item 
unsigned \hyperlink{create_8c_252fc1017c6f00c075530f35bbadec12}{LCI\_\-writeHdr} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)
\begin{CompactList}\small\item\em Write the configuration header to its file. \item\end{CompactList}\item 
unsigned \hyperlink{create_8c_068ef02dfc037a894ff6637da8e2bee4}{LCI\_\-write} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)
\begin{CompactList}\small\item\em Write the configuration structure to its file. \item\end{CompactList}\item 
unsigned \hyperlink{create_8c_c8ea4361a6e410e51f6c15a9d271f04f}{LCI\_\-finish} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)
\begin{CompactList}\small\item\em Close the configuration file. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Calibration configuration file creation functions. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
{\bf \$Id:} \hyperlink{create_8c}{create.c},v 1.8 2010/05/03 20:43:58 saxton Exp \$ 

\subsection{Function Documentation}
\hypertarget{create_8c_3a846ff20a4be0eec20b39d0de760612}{
\index{create.c@{create.c}!LCI_create@{LCI\_\-create}}
\index{LCI_create@{LCI\_\-create}!create.c@{create.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-create ({\bf LCI\_\-configuration} $\ast$ {\em cnf}, const char $\ast$ {\em filename}, int {\em mode})}}
\label{create_8c_3a846ff20a4be0eec20b39d0de760612}


Open the file and associate it with this configuration structure. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to an initialised configuration structure\item[{\em filename}]Name of the file to create\item[{\em mode}]Calibration mode\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LCI\_\-SUCCESS}]if the file opens successfully \item[{\em LCI\_\-FOPEN}]if the file failed to open successfully \item[{\em LCI\_\-TYPE}]if the specified type is not one of ACD, CAL or TKR \item[{\em LCI\_\-FWRITE}]if an error occurs writing the file verion information \end{description}
\end{Desc}
\hypertarget{create_8c_c8ea4361a6e410e51f6c15a9d271f04f}{
\index{create.c@{create.c}!LCI_finish@{LCI\_\-finish}}
\index{LCI_finish@{LCI\_\-finish}!create.c@{create.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-finish ({\bf LCI\_\-configuration} $\ast$ {\em cnf})}}
\label{create_8c_c8ea4361a6e410e51f6c15a9d271f04f}


Close the configuration file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to an opened configuration\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LCI\_\-SUCCESS}]If the file closes successfully \item[{\em LCI\_\-FCLOSE}]If there is an error closing the file \end{description}
\end{Desc}
\hypertarget{create_8c_068ef02dfc037a894ff6637da8e2bee4}{
\index{create.c@{create.c}!LCI_write@{LCI\_\-write}}
\index{LCI_write@{LCI\_\-write}!create.c@{create.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-write ({\bf LCI\_\-configuration} $\ast$ {\em cnf})}}
\label{create_8c_068ef02dfc037a894ff6637da8e2bee4}


Write the configuration structure to its file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to an opened configuration\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LCI\_\-SUCCESS}]if a configuration was written successfully \item[{\em LCI\_\-FWRITE}]if there was an error during the write \item[{\em LCI\_\-TYPE}]if the configuration type is bad (not reported) \end{description}
\end{Desc}
\hypertarget{create_8c_252fc1017c6f00c075530f35bbadec12}{
\index{create.c@{create.c}!LCI_writeHdr@{LCI\_\-writeHdr}}
\index{LCI_writeHdr@{LCI\_\-writeHdr}!create.c@{create.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-writeHdr ({\bf LCI\_\-configuration} $\ast$ {\em cnf})}}
\label{create_8c_252fc1017c6f00c075530f35bbadec12}


Write the configuration header to its file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to an opened configuration\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LCI\_\-SUCCESS}]if a configuration was written successfully \item[{\em LCI\_\-FWRITE}]if there was an error during the write \end{description}
\end{Desc}
