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


{\tt \#include $<$lci\_\-host\_\-p.h$>$}\par
{\tt \#include $<$configure\_\-p.h$>$}\par
{\tt \#include $<$LCI/LCI\_\-msgs.h$>$}\par
{\tt \#include $<$LSEC/LSEC\_\-ctx.h$>$}\par
{\tt \#include $<$FBS/FBS\_\-pubrtos.h$>$}\par
{\tt \#include $<$MSG/MSG\_\-pubdefs.h$>$}\par
{\tt \#include $<$PBS/BSWP.h$>$}\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.9 2011/03/29 19:32:57 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[{LCI\_\-create}]{\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}


References \_\-LCI\_\-configuration::fd, LCI\_\-version::maj, LCI\_\-version::min, LCI\_\-version::mode, and \_\-LCI\_\-configuration::ver.\hypertarget{create_8c_c8ea4361a6e410e51f6c15a9d271f04f}{
\index{create.c@{create.c}!LCI\_\-finish@{LCI\_\-finish}}
\index{LCI\_\-finish@{LCI\_\-finish}!create.c@{create.c}}
\subsubsection[{LCI\_\-finish}]{\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}


References \_\-LCI\_\-configuration::fd.\hypertarget{create_8c_068ef02dfc037a894ff6637da8e2bee4}{
\index{create.c@{create.c}!LCI\_\-write@{LCI\_\-write}}
\index{LCI\_\-write@{LCI\_\-write}!create.c@{create.c}}
\subsubsection[{LCI\_\-write}]{\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}


References LCI\_\-cnfInput::acd, LCI\_\-cnfInput::cal, \_\-LCI\_\-configuration::fd, LCI\_\-cnfInput::gem, \_\-LCI\_\-configuration::inp, LCI\_\-version::mode, LCI\_\-cnfInput::tkr, and \_\-LCI\_\-configuration::ver.\hypertarget{create_8c_252fc1017c6f00c075530f35bbadec12}{
\index{create.c@{create.c}!LCI\_\-writeHdr@{LCI\_\-writeHdr}}
\index{LCI\_\-writeHdr@{LCI\_\-writeHdr}!create.c@{create.c}}
\subsubsection[{LCI\_\-writeHdr}]{\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}


References \_\-LCI\_\-configuration::fd, and \_\-LCI\_\-configuration::ver.