\hypertarget{number_8ic}{
\section{number.ic File Reference}
\label{number_8ic}\index{number.ic@{number.ic}}
}
Static inline functions that calculate some numerical values.  


{\tt \#include $<$AG\_\-number\_\-s.h$>$}\par
{\tt \#include $<$string.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
static size\_\-t \hyperlink{number_8ic_f09985fd44381c688934bd435da72ed8}{sizeofMap} (LATC\_\-type type)
\begin{CompactList}\small\item\em Return the size of the 32-bit word bit-map that would hold enough bits to map all the instances of this type. \item\end{CompactList}\item 
static void \hyperlink{number_8ic_d73d7e7a12f6bed371c6cdd8ac7810d5}{clearMap} (unsigned $\ast$map, LATC\_\-type type)
\begin{CompactList}\small\item\em Set all bits to zero. \item\end{CompactList}\item 
static void \hyperlink{number_8ic_8bb9538d898834dfa6233df2c9279c46}{setMap} (unsigned $\ast$map, LATC\_\-type type)
\begin{CompactList}\small\item\em Set all bits to one. \item\end{CompactList}\item 
static unsigned \hyperlink{number_8ic_e11564d7db4fe9d7f29420dff75bed1e}{countMap} (const unsigned $\ast$map, LATC\_\-type type)
\begin{CompactList}\small\item\em Count the number of set bits. \item\end{CompactList}\item 
static void \hyperlink{number_8ic_0f23989b63cb7a8a947635626e3a82b9}{setBit} (unsigned $\ast$map, unsigned index)
\begin{CompactList}\small\item\em Set bit {\em i\/}. \item\end{CompactList}\item 
static void \hyperlink{number_8ic_22ecb112d3102802111b3aa7b9334d23}{clearBit} (unsigned $\ast$map, unsigned index)
\begin{CompactList}\small\item\em Clear bit {\em i\/}. \item\end{CompactList}\item 
static int \hyperlink{number_8ic_93a12aa24db92ebd827bc16bc9500648}{checkBit} (const unsigned $\ast$map, unsigned index)
\begin{CompactList}\small\item\em Check bit {\em i\/}. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Static inline functions that calculate some numerical values. 

\begin{Desc}
\item[Author:]James Swain -- \href{mailto:jswain@slac.stanford.edu}{\tt jswain@slac.stanford.edu} \end{Desc}


\subsection{Function Documentation}
\hypertarget{number_8ic_93a12aa24db92ebd827bc16bc9500648}{
\index{number.ic@{number.ic}!checkBit@{checkBit}}
\index{checkBit@{checkBit}!number.ic@{number.ic}}
\subsubsection[{checkBit}]{\setlength{\rightskip}{0pt plus 5cm}int checkBit (const unsigned $\ast$ {\em map}, \/  unsigned {\em i})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{number_8ic_93a12aa24db92ebd827bc16bc9500648}


Check bit {\em i\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]Map being manipulated \item[{\em i}]Bit to check \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Value of the bit being checked (0/1) \end{Desc}


Referenced by LATC\_\-capture(), LATC\_\-record(), loadAfeConfig(), loadCfeConfig0(), loadCfeConfig1(), loadCpt(), loadSplit(), loadTfeDac(), loadTracker(), readSplit(), readTracker(), and traverseRead().\hypertarget{number_8ic_22ecb112d3102802111b3aa7b9334d23}{
\index{number.ic@{number.ic}!clearBit@{clearBit}}
\index{clearBit@{clearBit}!number.ic@{number.ic}}
\subsubsection[{clearBit}]{\setlength{\rightskip}{0pt plus 5cm}void clearBit (unsigned $\ast$ {\em map}, \/  unsigned {\em i})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{number_8ic_22ecb112d3102802111b3aa7b9334d23}


Clear bit {\em i\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]Map being manipulated \item[{\em i}]Bit to clear \end{description}
\end{Desc}


Referenced by handleReadErrors().\hypertarget{number_8ic_d73d7e7a12f6bed371c6cdd8ac7810d5}{
\index{number.ic@{number.ic}!clearMap@{clearMap}}
\index{clearMap@{clearMap}!number.ic@{number.ic}}
\subsubsection[{clearMap}]{\setlength{\rightskip}{0pt plus 5cm}void clearMap (unsigned $\ast$ {\em map}, \/  LATC\_\-type {\em type})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{number_8ic_d73d7e7a12f6bed371c6cdd8ac7810d5}


Set all bits to zero. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]Map being manipulated \item[{\em type}]Component type to be mapped \end{description}
\end{Desc}


References sizeofMap().\hypertarget{number_8ic_e11564d7db4fe9d7f29420dff75bed1e}{
\index{number.ic@{number.ic}!countMap@{countMap}}
\index{countMap@{countMap}!number.ic@{number.ic}}
\subsubsection[{countMap}]{\setlength{\rightskip}{0pt plus 5cm}unsigned countMap (const unsigned $\ast$ {\em map}, \/  LATC\_\-type {\em type})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{number_8ic_e11564d7db4fe9d7f29420dff75bed1e}


Count the number of set bits. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]Map being manipulated \item[{\em type}]Component type to be mapped \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of set bits \end{Desc}


Referenced by LATC\_\-record().\hypertarget{number_8ic_0f23989b63cb7a8a947635626e3a82b9}{
\index{number.ic@{number.ic}!setBit@{setBit}}
\index{setBit@{setBit}!number.ic@{number.ic}}
\subsubsection[{setBit}]{\setlength{\rightskip}{0pt plus 5cm}void setBit (unsigned $\ast$ {\em map}, \/  unsigned {\em i})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{number_8ic_0f23989b63cb7a8a947635626e3a82b9}


Set bit {\em i\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]Map being manipulated \item[{\em i}]Bit to set \end{description}
\end{Desc}


Referenced by readCpt(), and readSplit().\hypertarget{number_8ic_8bb9538d898834dfa6233df2c9279c46}{
\index{number.ic@{number.ic}!setMap@{setMap}}
\index{setMap@{setMap}!number.ic@{number.ic}}
\subsubsection[{setMap}]{\setlength{\rightskip}{0pt plus 5cm}void setMap (unsigned $\ast$ {\em map}, \/  LATC\_\-type {\em type})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{number_8ic_8bb9538d898834dfa6233df2c9279c46}


Set all bits to one. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]Map being manipulated \item[{\em type}]Component type to be mapped \end{description}
\end{Desc}


References sizeofMap().\hypertarget{number_8ic_f09985fd44381c688934bd435da72ed8}{
\index{number.ic@{number.ic}!sizeofMap@{sizeofMap}}
\index{sizeofMap@{sizeofMap}!number.ic@{number.ic}}
\subsubsection[{sizeofMap}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t sizeofMap (LATC\_\-type {\em type})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{number_8ic_f09985fd44381c688934bd435da72ed8}


Return the size of the 32-bit word bit-map that would hold enough bits to map all the instances of this type. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]Component type to be mapped \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Corresponding map size. \end{Desc}


Referenced by clearMap(), LATC\_\-record(), and setMap().