\hypertarget{configure_8c}{
\section{configure.c File Reference}
\label{configure_8c}\index{configure.c@{configure.c}}
}
Routines that manipulate the configuration structure and the associated data file. 

{\tt \#include \char`\"{}LCI/LCI\_\-msgs.h\char`\"{}}\par
{\tt \#include \char`\"{}configure\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}enums\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}macros\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}LATC/latc.h\char`\"{}}\par
{\tt \#include \char`\"{}LATC/lrd.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEC/LSEC\_\-ctx.h\char`\"{}}\par
{\tt \#include \char`\"{}LSEC/enums.h\char`\"{}}\par
{\tt \#include \char`\"{}FBS/FBS\_\-pubrtos.h\char`\"{}}\par
{\tt \#include \char`\"{}LEM/msg\_\-macros.h\char`\"{}}\par
{\tt \#include \char`\"{}LEM/defs.h\char`\"{}}\par
{\tt \#include \char`\"{}LEM/encode.h\char`\"{}}\par
{\tt \#include \char`\"{}LEM/decode.h\char`\"{}}\par
{\tt \#include \char`\"{}MSG/MSG\_\-pubdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/BSWP.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/MBA.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/TASK.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/TOV.h\char`\"{}}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$fcntl.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par


Include dependency graph for configure.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=252pt]{configure_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hypertarget{configure_8c_a0}{
static unsigned {\bf refresh} (void $\ast$inp, size\_\-t size, int fd)}
\label{configure_8c_a0}

\item 
\hypertarget{configure_8c_a1}{
static unsigned {\bf refresh\-Acd} (\hyperlink{structLCI__acdValues}{LCI\_\-acd\-Values} $\ast$val, \hyperlink{structLCI__acdInput}{LCI\_\-acd\-Input} $\ast$inp, unsigned $\ast$rld, int fd)}
\label{configure_8c_a1}

\item 
\hypertarget{configure_8c_a2}{
static unsigned {\bf refresh\-Cal} (\hyperlink{structLCI__calValues}{LCI\_\-cal\-Values} $\ast$val, \hyperlink{structLCI__calInput}{LCI\_\-cal\-Input} $\ast$inp, unsigned $\ast$rld, int fd)}
\label{configure_8c_a2}

\item 
\hypertarget{configure_8c_a3}{
static unsigned {\bf refresh\-Tkr} (\hyperlink{structLCI__tkrValues}{LCI\_\-tkr\-Values} $\ast$val, \hyperlink{structLCI__tkrInput}{LCI\_\-tkr\-Input} $\ast$inp, unsigned $\ast$rld, int fd)}
\label{configure_8c_a3}

\item 
\hypertarget{configure_8c_a4}{
static unsigned {\bf read\-Acd} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)}
\label{configure_8c_a4}

\item 
\hypertarget{configure_8c_a5}{
static unsigned {\bf read\-Cal} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)}
\label{configure_8c_a5}

\item 
\hypertarget{configure_8c_a6}{
static unsigned {\bf read\-Tkr} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)}
\label{configure_8c_a6}

\item 
\hypertarget{configure_8c_a7}{
static unsigned {\bf increment} (unsigned short $\ast$val, \hyperlink{structLCI__cnfItem}{LCI\_\-cnf\-Item} $\ast$itm)}
\label{configure_8c_a7}

\item 
\hypertarget{configure_8c_a8}{
static unsigned {\bf configure\-Gem} (\hyperlink{structLCI__gemInput}{LCI\_\-gem\-Input} $\ast$inp, LEM\_\-micr $\ast$cr, unsigned siu\_\-id)}
\label{configure_8c_a8}

\item 
\hypertarget{configure_8c_a9}{
static unsigned {\bf configure\-Acd} (\hyperlink{structLCI__acdValues}{LCI\_\-acd\-Values} $\ast$val, LEM\_\-micr $\ast$cr)}
\label{configure_8c_a9}

\item 
\hypertarget{configure_8c_a10}{
static unsigned {\bf configure\-Cal} (\hyperlink{structLCI__calValues}{LCI\_\-cal\-Values} $\ast$val, LEM\_\-micr $\ast$cr)}
\label{configure_8c_a10}

\item 
\hypertarget{configure_8c_a11}{
static unsigned {\bf configure\-Tkr} (\hyperlink{structLCI__tkrValues}{LCI\_\-tkr\-Values} $\ast$val, LEM\_\-micr $\ast$cr)}
\label{configure_8c_a11}

\item 
\hypertarget{configure_8c_a12}{
static void {\bf report\-Acd} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, FILE $\ast$fp)}
\label{configure_8c_a12}

\item 
\hypertarget{configure_8c_a13}{
static void {\bf report\-Cal} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, FILE $\ast$fp)}
\label{configure_8c_a13}

\item 
\hypertarget{configure_8c_a14}{
static void {\bf report\-Tkr} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, FILE $\ast$fp)}
\label{configure_8c_a14}

\item 
\hypertarget{configure_8c_a15}{
static void {\bf report\-Gem} (\hyperlink{structLCI__gemInput}{LCI\_\-gem\-Input} $\ast$gem, FILE $\ast$fp)}
\label{configure_8c_a15}

\item 
\hypertarget{configure_8c_a16}{
static void {\bf report\-Item} (\hyperlink{structLCI__cnfItem}{LCI\_\-cnf\-Item} $\ast$itm, const char $\ast$title, FILE $\ast$fp, unsigned $\ast$cib)}
\label{configure_8c_a16}

\item 
\hypertarget{configure_8c_a17}{
static void {\bf report\-Parm} (int value, const char $\ast$title, FILE $\ast$fp)}
\label{configure_8c_a17}

\item 
\hypertarget{configure_8c_a18}{
static void {\bf report\-On\-Off} (int value, const char $\ast$title, FILE $\ast$fp)}
\label{configure_8c_a18}

\item 
\hypertarget{configure_8c_a19}{
static void {\bf report\-Hi\-Lo} (int value, const char $\ast$title, FILE $\ast$fp)}
\label{configure_8c_a19}

\item 
\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ \hyperlink{configure_8c_a20}{LCI\_\-new\-Configuration} (void)
\begin{CompactList}\small\item\em Allocate memory for a configuration structure and initialise (clear) it. \item\end{CompactList}\item 
void \hyperlink{configure_8c_a21}{LCI\_\-delete\-Configuration} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)
\begin{CompactList}\small\item\em Free memory previously allocated with a call to LCI\_\-new\-Configuration. \item\end{CompactList}\item 
void \hyperlink{configure_8c_a22}{LCI\_\-copy\-Configuration} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf\-In, \hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf\-Out)
\begin{CompactList}\small\item\em Copy a configuration. \item\end{CompactList}\item 
unsigned \hyperlink{configure_8c_a23}{LCI\_\-open\-Fid} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, unsigned fid)
\begin{CompactList}\small\item\em Open the file and associate it with this configuration structure. \item\end{CompactList}\item 
unsigned \hyperlink{configure_8c_a24}{LCI\_\-open} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, const char $\ast$fn)
\begin{CompactList}\small\item\em Open the file and associate it with this configuration structure. \item\end{CompactList}\item 
unsigned \hyperlink{configure_8c_a25}{LCI\_\-read} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)
\begin{CompactList}\small\item\em Get the values for the next step of the configuration. \item\end{CompactList}\item 
unsigned \hyperlink{configure_8c_a26}{LCI\_\-close} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)
\begin{CompactList}\small\item\em Close the file that acts as the source of the configuration. \item\end{CompactList}\item 
unsigned \hyperlink{configure_8c_a27}{LCI\_\-cache} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, unsigned latc\_\-fid)
\begin{CompactList}\small\item\em Read in the LATC files. \item\end{CompactList}\item 
void \hyperlink{configure_8c_a28}{LCI\_\-node\-Id} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, unsigned siu\_\-id)
\begin{CompactList}\small\item\em Set the destination address to be used in the TAM configuration. \item\end{CompactList}\item 
unsigned \hyperlink{configure_8c_a29}{LCI\_\-configure} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, LEM\_\-micr $\ast$cr, unsigned run\-Id)
\begin{CompactList}\small\item\em Load the configuration onto the LAT. \item\end{CompactList}\item 
unsigned int \hyperlink{configure_8c_a30}{LCI\_\-sizeof\-Ctx32} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)
\begin{CompactList}\small\item\em Calculate the number of 32-bit words required to hold the current configuration values. \item\end{CompactList}\item 
unsigned int $\ast$ \hyperlink{configure_8c_a31}{LCI\_\-consign\-Ctx} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, unsigned int $\ast$buf)
\begin{CompactList}\small\item\em Copy the current configuration values into the buffer. \item\end{CompactList}\item 
unsigned \hyperlink{configure_8c_a32}{LCI\_\-mode} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)
\begin{CompactList}\small\item\em Return the configuration type. \item\end{CompactList}\item 
unsigned \hyperlink{configure_8c_a33}{LCI\_\-range} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)
\begin{CompactList}\small\item\em Return the readout range. \item\end{CompactList}\item 
unsigned \hyperlink{configure_8c_a34}{LCI\_\-triggers} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)
\begin{CompactList}\small\item\em Return the number of triggers required. \item\end{CompactList}\item 
unsigned \hyperlink{configure_8c_a35}{LCI\_\-period} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf)
\begin{CompactList}\small\item\em Return the period between triggers. \item\end{CompactList}\item 
unsigned \hyperlink{configure_8c_a36}{LCI\_\-set\-Buffer\-Model} (unsigned select, LEM\_\-micr $\ast$cr)
\begin{CompactList}\small\item\em Set the buffer model select bit of the TEM CONFIGURATION register. \item\end{CompactList}\item 
void \hyperlink{configure_8c_a37}{LCI\_\-report} (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$cnf, FILE $\ast$fp)
\begin{CompactList}\small\item\em Produce a formatted report of the contents of a binary configuration. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Routines that manipulate the configuration structure and the associated data file. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\hyperlink{configure_8c}{configure.c},v 1.23 2007/08/26 21:43:23 saxton Exp \end{Desc}


\subsection{Function Documentation}
\hypertarget{configure_8c_a27}{
\index{configure.c@{configure.c}!LCI_cache@{LCI\_\-cache}}
\index{LCI_cache@{LCI\_\-cache}!configure.c@{configure.c}}
\subsubsection[LCI\_\-cache]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-cache (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf}, unsigned {\em latc\_\-fid})}}
\label{configure_8c_a27}


Read in the LATC files. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to an initialised configuration structure\item[{\em latc\_\-fid}]ID of the LATC configuration to cache\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LCI\_\-SUCCESS}]if all goes well \item[{\em LATC\_\-BADFOPEN}]if the fid, or any of the names the LAT configuration master file contains, does not match a valid file. \item[{\em LATC\_\-BADTYPE}]if the LATC file contains a bad type identifier \item[{\em LATC\_\-BADREAD}]if an error occurs whilst the file is being read\end{description}
\end{Desc}
\hypertarget{configure_8c_a26}{
\index{configure.c@{configure.c}!LCI_close@{LCI\_\-close}}
\index{LCI_close@{LCI\_\-close}!configure.c@{configure.c}}
\subsubsection[LCI\_\-close]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-close (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf})}}
\label{configure_8c_a26}


Close the file that acts as the source of the configuration. 

\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{configure_8c_a29}{
\index{configure.c@{configure.c}!LCI_configure@{LCI\_\-configure}}
\index{LCI_configure@{LCI\_\-configure}!configure.c@{configure.c}}
\subsubsection[LCI\_\-configure]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-configure (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf}, LEM\_\-micr $\ast$ {\em cr}, unsigned {\em run\-Id})}}
\label{configure_8c_a29}


Load the configuration onto the LAT. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to a populated configuration structure\item[{\em cr}]Pointer to the common configuration multi-item command response list\item[{\em run\-Id}]The current run ID.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]LCI\_\-SUCCESS if all goes well, or one of the LEM errors if there is a problem loading the configuration onto the LAT\end{Desc}
\hypertarget{configure_8c_a31}{
\index{configure.c@{configure.c}!LCI_consignCtx@{LCI\_\-consignCtx}}
\index{LCI_consignCtx@{LCI\_\-consignCtx}!configure.c@{configure.c}}
\subsubsection[LCI\_\-consignCtx]{\setlength{\rightskip}{0pt plus 5cm}unsigned int$\ast$ LCI\_\-consign\-Ctx (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf}, unsigned int $\ast$ {\em buf})}}
\label{configure_8c_a31}


Copy the current configuration values into the buffer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]pointer to a configuration structure\item[{\em buf}]Location to place the current configuration values\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer to the next output location\end{Desc}
\hypertarget{configure_8c_a22}{
\index{configure.c@{configure.c}!LCI_copyConfiguration@{LCI\_\-copyConfiguration}}
\index{LCI_copyConfiguration@{LCI\_\-copyConfiguration}!configure.c@{configure.c}}
\subsubsection[LCI\_\-copyConfiguration]{\setlength{\rightskip}{0pt plus 5cm}void LCI\_\-copy\-Configuration (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf\-In}, \hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf\-Out})}}
\label{configure_8c_a22}


Copy a configuration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf\-In}]The configuration structure to be copied from\item[{\em cnf\-Out}]The configuration structure to be copied to\end{description}
\end{Desc}
\hypertarget{configure_8c_a21}{
\index{configure.c@{configure.c}!LCI_deleteConfiguration@{LCI\_\-deleteConfiguration}}
\index{LCI_deleteConfiguration@{LCI\_\-deleteConfiguration}!configure.c@{configure.c}}
\subsubsection[LCI\_\-deleteConfiguration]{\setlength{\rightskip}{0pt plus 5cm}void LCI\_\-delete\-Configuration (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf})}}
\label{configure_8c_a21}


Free memory previously allocated with a call to LCI\_\-new\-Configuration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]A configuration structure created by a call to LCI\_\-new\-Configuration\end{description}
\end{Desc}
\hypertarget{configure_8c_a32}{
\index{configure.c@{configure.c}!LCI_mode@{LCI\_\-mode}}
\index{LCI_mode@{LCI\_\-mode}!configure.c@{configure.c}}
\subsubsection[LCI\_\-mode]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-mode (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf})}}
\label{configure_8c_a32}


Return the configuration type. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to the configuration structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]One of LSEC\_\-MODE\_\-XXX\end{Desc}
\hypertarget{configure_8c_a20}{
\index{configure.c@{configure.c}!LCI_newConfiguration@{LCI\_\-newConfiguration}}
\index{LCI_newConfiguration@{LCI\_\-newConfiguration}!configure.c@{configure.c}}
\subsubsection[LCI\_\-newConfiguration]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__LCI__configuration}{LCI\_\-configuration}$\ast$ LCI\_\-new\-Configuration (void)}}
\label{configure_8c_a20}


Allocate memory for a configuration structure and initialise (clear) it. 

\begin{Desc}
\item[Returns:]Pointer to an allocated, initialised configuration structure\end{Desc}
\hypertarget{configure_8c_a28}{
\index{configure.c@{configure.c}!LCI_nodeId@{LCI\_\-nodeId}}
\index{LCI_nodeId@{LCI\_\-nodeId}!configure.c@{configure.c}}
\subsubsection[LCI\_\-nodeId]{\setlength{\rightskip}{0pt plus 5cm}void LCI\_\-node\-Id (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf}, unsigned {\em siu\_\-id})}}
\label{configure_8c_a28}


Set the destination address to be used in the TAM configuration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to the configuration structure\item[{\em siu\_\-id}]LATp address of the node that the events will be collected on\end{description}
\end{Desc}
\hypertarget{configure_8c_a24}{
\index{configure.c@{configure.c}!LCI_open@{LCI\_\-open}}
\index{LCI_open@{LCI\_\-open}!configure.c@{configure.c}}
\subsubsection[LCI\_\-open]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-open (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf}, const char $\ast$ {\em fn})}}
\label{configure_8c_a24}


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 fn}]Name of file to open\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\_\-FREAD}]if there is an error recovering the version information \item[{\em LCI\_\-VERSION}]if the file version information is bad (unknown type, major version mismatch, minor version decrease). \item[{\em LCI\_\-ENDOFILE}]if the file has no actual configurations (returned, but not reported).\end{description}
\end{Desc}
\hypertarget{configure_8c_a23}{
\index{configure.c@{configure.c}!LCI_openFid@{LCI\_\-openFid}}
\index{LCI_openFid@{LCI\_\-openFid}!configure.c@{configure.c}}
\subsubsection[LCI\_\-openFid]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-open\-Fid (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf}, unsigned {\em fid})}}
\label{configure_8c_a23}


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 fid}]The ID of the file to open\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\_\-FREAD}]if there is an error recovering the version information \item[{\em LCI\_\-VERSION}]if the file version information is bad (unknown type, major version mismatch, minor version decrease). \item[{\em LCI\_\-ENDOFILE}]if the file has no actual configurations (returned, but not reported).\end{description}
\end{Desc}
\hypertarget{configure_8c_a35}{
\index{configure.c@{configure.c}!LCI_period@{LCI\_\-period}}
\index{LCI_period@{LCI\_\-period}!configure.c@{configure.c}}
\subsubsection[LCI\_\-period]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-period (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf})}}
\label{configure_8c_a35}


Return the period between triggers. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to an initialised, populated configuration structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The period between triggers (in 50ns clock ticks)\end{Desc}
\hypertarget{configure_8c_a33}{
\index{configure.c@{configure.c}!LCI_range@{LCI\_\-range}}
\index{LCI_range@{LCI\_\-range}!configure.c@{configure.c}}
\subsubsection[LCI\_\-range]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-range (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf})}}
\label{configure_8c_a33}


Return the readout range. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to the configuration structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The range for this configuration (LSEC\_\-XXX\_\-RANGE)\end{Desc}
\hypertarget{configure_8c_a25}{
\index{configure.c@{configure.c}!LCI_read@{LCI\_\-read}}
\index{LCI_read@{LCI\_\-read}!configure.c@{configure.c}}
\subsubsection[LCI\_\-read]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-read (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf})}}
\label{configure_8c_a25}


Get the values for the next step of the configuration. 

\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 read successfully \item[{\em LCI\_\-ENDOFILE}]if there are no more configurations in the file (returned, but not reported). \item[{\em LCI\_\-READ}]if there is an error during the read or the configuration is incomplete\end{description}
\end{Desc}
\hypertarget{configure_8c_a37}{
\index{configure.c@{configure.c}!LCI_report@{LCI\_\-report}}
\index{LCI_report@{LCI\_\-report}!configure.c@{configure.c}}
\subsubsection[LCI\_\-report]{\setlength{\rightskip}{0pt plus 5cm}void LCI\_\-report (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf}, FILE $\ast$ {\em fp})}}
\label{configure_8c_a37}


Produce a formatted report of the contents of a binary configuration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to the configuration structure to output\item[{\em fp}]Pointer to file to print report\end{description}
\end{Desc}
\hypertarget{configure_8c_a36}{
\index{configure.c@{configure.c}!LCI_setBufferModel@{LCI\_\-setBufferModel}}
\index{LCI_setBufferModel@{LCI\_\-setBufferModel}!configure.c@{configure.c}}
\subsubsection[LCI\_\-setBufferModel]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-set\-Buffer\-Model (unsigned {\em select}, LEM\_\-micr $\ast$ {\em cr})}}
\label{configure_8c_a36}


Set the buffer model select bit of the TEM CONFIGURATION register. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em select}]Zero to select the multi buffer model, non-zero to select the single buffer model\item[{\em cr}]Pointer to the multi-item command/response list.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em LCI\_\-SUCCESS}]Success \item[{\em LCI\_\-TEMCR}]The command and response masks don't have the same TEMs present \item[{\em LEM\_\-$\ast$}]If there was an error reading or loading one of the registers\end{description}
\end{Desc}
\hypertarget{configure_8c_a30}{
\index{configure.c@{configure.c}!LCI_sizeofCtx32@{LCI\_\-sizeofCtx32}}
\index{LCI_sizeofCtx32@{LCI\_\-sizeofCtx32}!configure.c@{configure.c}}
\subsubsection[LCI\_\-sizeofCtx32]{\setlength{\rightskip}{0pt plus 5cm}unsigned int LCI\_\-sizeof\-Ctx32 (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf})}}
\label{configure_8c_a30}


Calculate the number of 32-bit words required to hold the current configuration values. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to a configuration structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of 32-bit words required to hold the current configuration values\end{Desc}
\hypertarget{configure_8c_a34}{
\index{configure.c@{configure.c}!LCI_triggers@{LCI\_\-triggers}}
\index{LCI_triggers@{LCI\_\-triggers}!configure.c@{configure.c}}
\subsubsection[LCI\_\-triggers]{\setlength{\rightskip}{0pt plus 5cm}unsigned LCI\_\-triggers (\hyperlink{struct__LCI__configuration}{LCI\_\-configuration} $\ast$ {\em cnf})}}
\label{configure_8c_a34}


Return the number of triggers required. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cnf}]Pointer to an initialised, populated configuration structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of triggers to request for this configuration\end{Desc}
