\section{create.c File Reference}
\label{create_8c}\index{create.c@{create.c}}


Calibration configuration file creation functions.  


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


\subsection{Detailed Description}
Calibration configuration file creation functions. \begin{DoxyAuthor}{Author}
James Swain \& Owen Saxton
\end{DoxyAuthor}
{\bfseries \$Id:} \hyperlink{create_8c}{create.c},v 1.9 2011/03/29 19:32:57 saxton Exp \$ 

\subsection{Function Documentation}
\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 (
\begin{DoxyParamCaption}
\item[{{\bf LCI\_\-configuration} $\ast$}]{cnf, }
\item[{const char $\ast$}]{filename, }
\item[{int}]{mode}
\end{DoxyParamCaption}
)}\label{create_8c_a3a846ff20a4be0eec20b39d0de760612}


Open the file and associate it with this configuration structure. 


\begin{DoxyParams}{Parameters}
{\em cnf} & Pointer to an initialised configuration structure\\
\hline
{\em filename} & Name of the file to create\\
\hline
{\em mode} & Calibration mode\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em LCI\_\-SUCCESS} & if the file opens successfully \\
\hline
{\em LCI\_\-FOPEN} & if the file failed to open successfully \\
\hline
{\em LCI\_\-TYPE} & if the specified type is not one of ACD, CAL or TKR \\
\hline
{\em LCI\_\-FWRITE} & if an error occurs writing the file verion information \\
\hline
\end{DoxyRetVals}


References \_\-LCI\_\-configuration::fd, LCI\_\-version::maj, LCI\_\-version::min, LCI\_\-version::mode, and \_\-LCI\_\-configuration::ver.

\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 (
\begin{DoxyParamCaption}
\item[{{\bf LCI\_\-configuration} $\ast$}]{cnf}
\end{DoxyParamCaption}
)}\label{create_8c_ac8ea4361a6e410e51f6c15a9d271f04f}


Close the configuration file. 


\begin{DoxyParams}{Parameters}
{\em cnf} & Pointer to an opened configuration\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em LCI\_\-SUCCESS} & If the file closes successfully \\
\hline
{\em LCI\_\-FCLOSE} & If there is an error closing the file \\
\hline
\end{DoxyRetVals}


References \_\-LCI\_\-configuration::fd.

\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 (
\begin{DoxyParamCaption}
\item[{{\bf LCI\_\-configuration} $\ast$}]{cnf}
\end{DoxyParamCaption}
)}\label{create_8c_a068ef02dfc037a894ff6637da8e2bee4}


Write the configuration structure to its file. 


\begin{DoxyParams}{Parameters}
{\em cnf} & Pointer to an opened configuration\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em LCI\_\-SUCCESS} & if a configuration was written successfully \\
\hline
{\em LCI\_\-FWRITE} & if there was an error during the write \\
\hline
{\em LCI\_\-TYPE} & if the configuration type is bad (not reported) \\
\hline
\end{DoxyRetVals}


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.

\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 (
\begin{DoxyParamCaption}
\item[{{\bf LCI\_\-configuration} $\ast$}]{cnf}
\end{DoxyParamCaption}
)}\label{create_8c_a252fc1017c6f00c075530f35bbadec12}


Write the configuration header to its file. 


\begin{DoxyParams}{Parameters}
{\em cnf} & Pointer to an opened configuration\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em LCI\_\-SUCCESS} & if a configuration was written successfully \\
\hline
{\em LCI\_\-FWRITE} & if there was an error during the write \\
\hline
\end{DoxyRetVals}


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

