\hypertarget{gDAB_8c}{
\section{g\-DAB.c File Reference}
\label{gDAB_8c}\index{gDAB.c@{gDAB.c}}
}
Implements command/response for the DAB.  


{\tt \#include $<$string.h$>$}\par
{\tt \#include \char`\"{}GDAB/g\-DAB.h\char`\"{}}\par
{\tt \#include \char`\"{}GDAB/gdab\_\-err.h\char`\"{}}\par
{\tt \#include \char`\"{}GNAT/log.h\char`\"{}}\par
{\tt \#include \char`\"{}GNAT/gnat.h\char`\"{}}\par
{\tt \#include \char`\"{}GNAT/latp.h\char`\"{}}\par
{\tt \#include \char`\"{}g\-DAB\_\-p.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{gDAB_8c_a0}{calc\-Short\-Parity} (unsigned short n\-Words, unsigned short $\ast$arr)
\begin{CompactList}\small\item\em Calculates the odd parity in {\em arr\/}. \item\end{CompactList}\item 
void \hyperlink{gDAB_8c_a1}{set\-AD} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short func, unsigned short block, unsigned short reg, \hyperlink{union__gdabLATpAD}{gdab\-LATp\-AD} $\ast$ad)
\begin{CompactList}\small\item\em initializes an access descriptor structure for a DAB \item\end{CompactList}\item 
void \hyperlink{gDAB_8c_a2}{pack\-Payload\-DAB} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short ad, unsigned short n\-Words, unsigned short $\ast$value, unsigned short $\ast$payload)
\begin{CompactList}\small\item\em Packs the ad and value into the payload. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a3}{\_\-\_\-g\-DABcmd} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short dab\-Addr, unsigned short block, unsigned short opcode)
\begin{CompactList}\small\item\em Sends a dataless command to the DAB address. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a4}{\_\-\_\-g\-DABload} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short dab\-Addr, unsigned short block, unsigned short reg, unsigned short n\-Words, unsigned short $\ast$value)
\begin{CompactList}\small\item\em Loads a register with value. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a5}{\_\-\_\-g\-DABread} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short dab\-Addr, unsigned short block, unsigned short reg, unsigned short n\-Words, unsigned short $\ast$value)
\begin{CompactList}\small\item\em Reads a register returing value in {\em val\/}. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a6}{g\-DABlam} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short dab\-Addr)
\begin{CompactList}\small\item\em Sends the \char`\"{}Look At Me\char`\"{} message to the DAB. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a7}{set\-Cell\-Header\-Parity} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short p)
\begin{CompactList}\small\item\em {\em p\/} determines if the LATp Cell\-Header Parity is inverted \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a8}{get\-Cell\-Header\-Parity} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short $\ast$p)
\begin{CompactList}\small\item\em Returns the current LATp cell header parity setting in {\em p\/}. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a9}{set\-Cell\-Body\-Parity} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short p)
\begin{CompactList}\small\item\em {\em p\/} determines if the LATp Cell Body Parity is inverted \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a10}{get\-Cell\-Body\-Parity} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short $\ast$p)
\begin{CompactList}\small\item\em Returns the current LATp cell body parity setting in {\em p\/}. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a11}{set\-Cmd\-Str\-Parity\-DAB} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short p)
\begin{CompactList}\small\item\em {\em p\/} determines if the DAB command string parity is inverted \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a12}{get\-Cmd\-Str\-Parity\-DAB} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short $\ast$p)
\begin{CompactList}\small\item\em Returns the current DAB command string parity. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a13}{set\-Access\-Desc\-Parity\-DAB} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short p)
\begin{CompactList}\small\item\em {\em p\/} determines if the DAB access descriptor parity is inverted \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a14}{get\-Access\-Desc\-Parity\-DAB} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short $\ast$p)
\begin{CompactList}\small\item\em Returns the current DAB access descriptor parity. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a15}{set\-Cmd\-Payload\-Parity\-DAB} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short p)
\begin{CompactList}\small\item\em {\em p\/} determines if the DAB command payload parity is inverted \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a16}{get\-Cmd\-Payload\-Parity\-DAB} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short $\ast$p)
\begin{CompactList}\small\item\em Returns current DAB command payload parity. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a17}{g\-DAB\_\-Set\-GEMAddr} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short addr)
\begin{CompactList}\small\item\em Address of GEM on the C/R fabric. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a18}{g\-DAB\_\-Get\-GEMAddr} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short $\ast$addr)
\begin{CompactList}\small\item\em Gets system wide LATp address of GEM. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a19}{g\-DAB\_\-Set\-EBMAddr} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short addr)
\begin{CompactList}\small\item\em Address of EBM on the C/R fabric. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a20}{g\-DAB\_\-Get\-EBMAddr} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short $\ast$addr)
\begin{CompactList}\small\item\em Gets system wide LATp address of EBM. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a21}{g\-DAB\_\-Set\-CRUAddr} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short addr)
\begin{CompactList}\small\item\em Address of CRU on the C/R fabric. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a22}{g\-DAB\_\-Get\-CRUAddr} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, unsigned short $\ast$addr)
\begin{CompactList}\small\item\em Gets system wide LATp address of CRU. \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a23}{g\-DAB\_\-Get\-Block\-Addr} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, short $\ast$addr)
\begin{CompactList}\small\item\em Gets the block address being used to overide default values (as used inside eg CRU functions). \item\end{CompactList}\item 
int \hyperlink{gDAB_8c_a24}{g\-DAB\_\-Set\-Block\-Addr} (\hyperlink{struct__gdab}{gdab\-Handle} gdab, short addr)
\begin{CompactList}\small\item\em Block address for registers. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Implements command/response for the DAB. 

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


\subsection{Function Documentation}
\hypertarget{gDAB_8c_a3}{
\index{gDAB.c@{g\-DAB.c}!__gDABcmd@{\_\-\_\-gDABcmd}}
\index{__gDABcmd@{\_\-\_\-gDABcmd}!gDAB.c@{g\-DAB.c}}
\subsubsection[\_\-\_\-gDABcmd]{\setlength{\rightskip}{0pt plus 5cm}int \_\-\_\-g\-DABcmd (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em dab\-Addr}, unsigned short {\em block}, unsigned short {\em opcode})}}
\label{gDAB_8c_a3}


Sends a dataless command to the DAB address. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em dab\-Addr}]DAB address of command \item[{\em block}]block to whom the command is addressed \item[{\em opcode}]opcode of command to send \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Sends the dataless command specified by {\em opcode\/} to the block specified by {\em block\/} at DAB address specified by {\em dab\-Addr\/}. \hypertarget{gDAB_8c_a4}{
\index{gDAB.c@{g\-DAB.c}!__gDABload@{\_\-\_\-gDABload}}
\index{__gDABload@{\_\-\_\-gDABload}!gDAB.c@{g\-DAB.c}}
\subsubsection[\_\-\_\-gDABload]{\setlength{\rightskip}{0pt plus 5cm}int \_\-\_\-g\-DABload (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em dab\-Addr}, unsigned short {\em block}, unsigned short {\em reg}, unsigned short {\em n\-Words}, unsigned short $\ast$ {\em value})}}
\label{gDAB_8c_a4}


Loads a register with value. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em dab\-Addr}]DAB address of command \item[{\em block}]block to whom this write is directed. \item[{\em reg}]register of DABC to load \item[{\em n\-Words}]number of 16-bit words in the value. \item[{\em value}]array of 16-bit words to load into DABC register \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Loads the DAB register specified by {\em reg\/} in block specified by {\em block\/} with {\em value\/} \hypertarget{gDAB_8c_a5}{
\index{gDAB.c@{g\-DAB.c}!__gDABread@{\_\-\_\-gDABread}}
\index{__gDABread@{\_\-\_\-gDABread}!gDAB.c@{g\-DAB.c}}
\subsubsection[\_\-\_\-gDABread]{\setlength{\rightskip}{0pt plus 5cm}int \_\-\_\-g\-DABread (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em dab\-Addr}, unsigned short {\em block}, unsigned short {\em reg}, unsigned short {\em n\-Words}, unsigned short $\ast$ {\em value})}}
\label{gDAB_8c_a5}


Reads a register returing value in {\em val\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em dab\-Addr}]DAB address of command \item[{\em block}]block for whence the register value is to be read. \item[{\em reg}]register of DABC to read \item[{\em n\-Words}]number of words expected \item[{\em value}]pointer to storage to hold the response of the read command \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Reads the register specified by {\em reg\/}. {\em val\/} is filled on return.

The following error codes are returned when LATp errors occur:

\begin{itemize}
\item GERR\_\-LATP\_\-HEADER\_\-PARITY \item GERR\_\-LATP\_\-CELL\_\-PARITY \item GERR\_\-LATP\_\-TRUNCATE \end{itemize}
\hypertarget{gDAB_8c_a0}{
\index{gDAB.c@{g\-DAB.c}!calcShortParity@{calcShortParity}}
\index{calcShortParity@{calcShortParity}!gDAB.c@{g\-DAB.c}}
\subsubsection[calcShortParity]{\setlength{\rightskip}{0pt plus 5cm}int calc\-Short\-Parity (unsigned short {\em n\-Words}, unsigned short $\ast$ {\em arr})}}
\label{gDAB_8c_a0}


Calculates the odd parity in {\em arr\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em n\-Words}]Number of unsigned shorts in @ arr \item[{\em arr}]Array of unsigned shorts \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]odd parity of the bits contained in @ arr. \end{Desc}
\hypertarget{gDAB_8c_a23}{
\index{gDAB.c@{g\-DAB.c}!gDAB_GetBlockAddr@{gDAB\_\-GetBlockAddr}}
\index{gDAB_GetBlockAddr@{gDAB\_\-GetBlockAddr}!gDAB.c@{g\-DAB.c}}
\subsubsection[gDAB\_\-GetBlockAddr]{\setlength{\rightskip}{0pt plus 5cm}int g\-DAB\_\-Get\-Block\-Addr (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, short $\ast$ {\em addr})}}
\label{gDAB_8c_a23}


Gets the block address being used to overide default values (as used inside eg CRU functions). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for cpt on the DAB \item[{\em addr}]pointer to hold address \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gDAB_8h_a17}{g\-DAB\_\-Set\-Block\-Addr()} \end{Desc}
\hypertarget{gDAB_8c_a22}{
\index{gDAB.c@{g\-DAB.c}!gDAB_GetCRUAddr@{gDAB\_\-GetCRUAddr}}
\index{gDAB_GetCRUAddr@{gDAB\_\-GetCRUAddr}!gDAB.c@{g\-DAB.c}}
\subsubsection[gDAB\_\-GetCRUAddr]{\setlength{\rightskip}{0pt plus 5cm}int g\-DAB\_\-Get\-CRUAddr (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short $\ast$ {\em addr})}}
\label{gDAB_8c_a22}


Gets system wide LATp address of CRU. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for cpt on the DAB \item[{\em addr}]pointer to hold address \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gDAB_8h_a15}{g\-DAB\_\-Set\-CRUAddr()}\end{Desc}
Gets the system-wide LATp address of CRU \hypertarget{gDAB_8c_a20}{
\index{gDAB.c@{g\-DAB.c}!gDAB_GetEBMAddr@{gDAB\_\-GetEBMAddr}}
\index{gDAB_GetEBMAddr@{gDAB\_\-GetEBMAddr}!gDAB.c@{g\-DAB.c}}
\subsubsection[gDAB\_\-GetEBMAddr]{\setlength{\rightskip}{0pt plus 5cm}int g\-DAB\_\-Get\-EBMAddr (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short $\ast$ {\em addr})}}
\label{gDAB_8c_a20}


Gets system wide LATp address of EBM. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for cpt on the DAB \item[{\em addr}]pointer to hold address \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gDAB_8h_a13}{g\-DAB\_\-Set\-EBMAddr()}\end{Desc}
Gets the system-wide LATp address of EBM \hypertarget{gDAB_8c_a18}{
\index{gDAB.c@{g\-DAB.c}!gDAB_GetGEMAddr@{gDAB\_\-GetGEMAddr}}
\index{gDAB_GetGEMAddr@{gDAB\_\-GetGEMAddr}!gDAB.c@{g\-DAB.c}}
\subsubsection[gDAB\_\-GetGEMAddr]{\setlength{\rightskip}{0pt plus 5cm}int g\-DAB\_\-Get\-GEMAddr (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short $\ast$ {\em addr})}}
\label{gDAB_8c_a18}


Gets system wide LATp address of GEM. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for cpt on the DAB \item[{\em addr}]pointer to hold address \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{gDAB_8h_a11}{g\-DAB\_\-Set\-GEMAddr()}\end{Desc}
Gets the system-wide LATp address of GEM \hypertarget{gDAB_8c_a24}{
\index{gDAB.c@{g\-DAB.c}!gDAB_SetBlockAddr@{gDAB\_\-SetBlockAddr}}
\index{gDAB_SetBlockAddr@{gDAB\_\-SetBlockAddr}!gDAB.c@{g\-DAB.c}}
\subsubsection[gDAB\_\-SetBlockAddr]{\setlength{\rightskip}{0pt plus 5cm}int g\-DAB\_\-Set\-Block\-Addr (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, short {\em addr})}}
\label{gDAB_8c_a24}


Block address for registers. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for cpt on the DAB \item[{\em addr}]Block address to be used instead of default inside CRU functions \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
This overides the usual settings for block address in some commands. Used for testing the LATp engine using the CRU as a test bed. Should be set to -1 for normal operation. \hypertarget{gDAB_8c_a21}{
\index{gDAB.c@{g\-DAB.c}!gDAB_SetCRUAddr@{gDAB\_\-SetCRUAddr}}
\index{gDAB_SetCRUAddr@{gDAB\_\-SetCRUAddr}!gDAB.c@{g\-DAB.c}}
\subsubsection[gDAB\_\-SetCRUAddr]{\setlength{\rightskip}{0pt plus 5cm}int g\-DAB\_\-Set\-CRUAddr (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em addr})}}
\label{gDAB_8c_a21}


Address of CRU on the C/R fabric. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for cpt on the DAB \item[{\em addr}]LATp address of CRU \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Sets the system-wide LATp address of CRU. This function is intended to be called once during system initialization. It might also be useful during testing. \hypertarget{gDAB_8c_a19}{
\index{gDAB.c@{g\-DAB.c}!gDAB_SetEBMAddr@{gDAB\_\-SetEBMAddr}}
\index{gDAB_SetEBMAddr@{gDAB\_\-SetEBMAddr}!gDAB.c@{g\-DAB.c}}
\subsubsection[gDAB\_\-SetEBMAddr]{\setlength{\rightskip}{0pt plus 5cm}int g\-DAB\_\-Set\-EBMAddr (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em addr})}}
\label{gDAB_8c_a19}


Address of EBM on the C/R fabric. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for cpt on the DAB \item[{\em addr}]LATp address of EBM \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Sets the system-wide LATp address of EBM. This function is intended to be called once during system initialization. It might also be useful during testing. \hypertarget{gDAB_8c_a17}{
\index{gDAB.c@{g\-DAB.c}!gDAB_SetGEMAddr@{gDAB\_\-SetGEMAddr}}
\index{gDAB_SetGEMAddr@{gDAB\_\-SetGEMAddr}!gDAB.c@{g\-DAB.c}}
\subsubsection[gDAB\_\-SetGEMAddr]{\setlength{\rightskip}{0pt plus 5cm}int g\-DAB\_\-Set\-GEMAddr (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em addr})}}
\label{gDAB_8c_a17}


Address of GEM on the C/R fabric. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for cpt on the DAB \item[{\em addr}]LATp address of GEM \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Sets the system-wide LATp address of GEM. This function is intended to be called once during system initialization. It might also be useful during testing. \hypertarget{gDAB_8c_a6}{
\index{gDAB.c@{g\-DAB.c}!gDABlam@{gDABlam}}
\index{gDABlam@{gDABlam}!gDAB.c@{g\-DAB.c}}
\subsubsection[gDABlam]{\setlength{\rightskip}{0pt plus 5cm}int g\-DABlam (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em dab\-Addr})}}
\label{gDAB_8c_a6}


Sends the \char`\"{}Look At Me\char`\"{} message to the DAB. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em dab\-Addr}]DAB address of command \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK on success\end{Desc}
Sends the \char`\"{}Look At Me\char`\"{} message to the DAB. This is used to switch the command/response wire used by the DAB. If the DAB decodes the \char`\"{}Look At Me\char`\"{} message on either it's A or B command channel it will switch to that channel for future commanding. \hypertarget{gDAB_8c_a14}{
\index{gDAB.c@{g\-DAB.c}!getAccessDescParityDAB@{getAccessDescParityDAB}}
\index{getAccessDescParityDAB@{getAccessDescParityDAB}!gDAB.c@{g\-DAB.c}}
\subsubsection[getAccessDescParityDAB]{\setlength{\rightskip}{0pt plus 5cm}int get\-Access\-Desc\-Parity\-DAB (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short $\ast$ {\em p})}}
\label{gDAB_8c_a14}


Returns the current DAB access descriptor parity. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em p}]pointer to hold boolean value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]STATUS\end{Desc}
if {\em p\/} is non-zero then all out going DAB commands will have their access descriptor parity inverted. This is used for testing parity errors. The default value is 0. \hypertarget{gDAB_8c_a10}{
\index{gDAB.c@{g\-DAB.c}!getCellBodyParity@{getCellBodyParity}}
\index{getCellBodyParity@{getCellBodyParity}!gDAB.c@{g\-DAB.c}}
\subsubsection[getCellBodyParity]{\setlength{\rightskip}{0pt plus 5cm}int get\-Cell\-Body\-Parity (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short $\ast$ {\em p})}}
\label{gDAB_8c_a10}


Returns the current LATp cell body parity setting in {\em p\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em p}]pointer to hold boolean value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]STATUS\end{Desc}
If {\em p\/} is non-zero then all out going LATp packets will have their cell body parity inverted. This is used for testing parity errors. The default value is 0. \hypertarget{gDAB_8c_a8}{
\index{gDAB.c@{g\-DAB.c}!getCellHeaderParity@{getCellHeaderParity}}
\index{getCellHeaderParity@{getCellHeaderParity}!gDAB.c@{g\-DAB.c}}
\subsubsection[getCellHeaderParity]{\setlength{\rightskip}{0pt plus 5cm}int get\-Cell\-Header\-Parity (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short $\ast$ {\em p})}}
\label{gDAB_8c_a8}


Returns the current LATp cell header parity setting in {\em p\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em p}]pointer to hold boolean value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]STATUS\end{Desc}
If {\em p\/} is non-zero then all out going LATp packets will have their cell header parity inverted. This is used for testing parity errors. The default value is 0. \hypertarget{gDAB_8c_a16}{
\index{gDAB.c@{g\-DAB.c}!getCmdPayloadParityDAB@{getCmdPayloadParityDAB}}
\index{getCmdPayloadParityDAB@{getCmdPayloadParityDAB}!gDAB.c@{g\-DAB.c}}
\subsubsection[getCmdPayloadParityDAB]{\setlength{\rightskip}{0pt plus 5cm}int get\-Cmd\-Payload\-Parity\-DAB (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short $\ast$ {\em p})}}
\label{gDAB_8c_a16}


Returns current DAB command payload parity. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em p}]pointer to hold boolean value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]STATUS\end{Desc}
if {\em p\/} is non-zero then all out going DAB commands will have their command payload parity inverted. This is used for testing parity errors. The default value is 0. \hypertarget{gDAB_8c_a12}{
\index{gDAB.c@{g\-DAB.c}!getCmdStrParityDAB@{getCmdStrParityDAB}}
\index{getCmdStrParityDAB@{getCmdStrParityDAB}!gDAB.c@{g\-DAB.c}}
\subsubsection[getCmdStrParityDAB]{\setlength{\rightskip}{0pt plus 5cm}int get\-Cmd\-Str\-Parity\-DAB (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short $\ast$ {\em p})}}
\label{gDAB_8c_a12}


Returns the current DAB command string parity. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em p}]pointer to hold boolean value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]STATUS\end{Desc}
if {\em p\/} is non-zero then all out going DAB commands will have their command string parity inverted. This is used for testing parity errors. The default value is 0. \hypertarget{gDAB_8c_a2}{
\index{gDAB.c@{g\-DAB.c}!packPayloadDAB@{packPayloadDAB}}
\index{packPayloadDAB@{packPayloadDAB}!gDAB.c@{g\-DAB.c}}
\subsubsection[packPayloadDAB]{\setlength{\rightskip}{0pt plus 5cm}void pack\-Payload\-DAB (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em ad}, unsigned short {\em n\-Words}, unsigned short $\ast$ {\em value}, unsigned short $\ast$ {\em payload})}}
\label{gDAB_8c_a2}


Packs the ad and value into the payload. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em ad}]16-bit access descriptor \item[{\em n\-Words}]number of words in value \item[{\em value}]array of 16-bit words to load into register \item[{\em payload}]pointer to pre-allocated storage \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void\end{Desc}
Packs the bits of {\em ad\/} and {\em value\/} into the storage pointed to by {\em payload\/}. \hypertarget{gDAB_8c_a13}{
\index{gDAB.c@{g\-DAB.c}!setAccessDescParityDAB@{setAccessDescParityDAB}}
\index{setAccessDescParityDAB@{setAccessDescParityDAB}!gDAB.c@{g\-DAB.c}}
\subsubsection[setAccessDescParityDAB]{\setlength{\rightskip}{0pt plus 5cm}int set\-Access\-Desc\-Parity\-DAB (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em p})}}
\label{gDAB_8c_a13}


{\em p\/} determines if the DAB access descriptor parity is inverted 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em p}]boolean value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK\end{Desc}
if {\em p\/} is non-zero then all out going DAB commands will have their access descriptor parity inverted. This is used for testing parity errors. The default value is 0. \hypertarget{gDAB_8c_a1}{
\index{gDAB.c@{g\-DAB.c}!setAD@{setAD}}
\index{setAD@{setAD}!gDAB.c@{g\-DAB.c}}
\subsubsection[setAD]{\setlength{\rightskip}{0pt plus 5cm}void set\-AD (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em func}, unsigned short {\em block}, unsigned short {\em reg}, \hyperlink{union__gdabLATpAD}{gdab\-LATp\-AD} $\ast$ {\em ad})}}
\label{gDAB_8c_a1}


initializes an access descriptor structure for a DAB 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em block}]Sepcifies the register block \item[{\em func}]DAB fucntion code \item[{\em reg}]register of DAB \item[{\em ad}]reference to GDAB access descriptor structure \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]void \end{Desc}
\hypertarget{gDAB_8c_a9}{
\index{gDAB.c@{g\-DAB.c}!setCellBodyParity@{setCellBodyParity}}
\index{setCellBodyParity@{setCellBodyParity}!gDAB.c@{g\-DAB.c}}
\subsubsection[setCellBodyParity]{\setlength{\rightskip}{0pt plus 5cm}int set\-Cell\-Body\-Parity (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em p})}}
\label{gDAB_8c_a9}


{\em p\/} determines if the LATp Cell Body Parity is inverted 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em p}]boolean value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]STATUS\end{Desc}
If {\em p\/} is non-zero then all out going LATp packets will have their cell body parity inverted. This is used for testing parity errors. The default value is 0. \hypertarget{gDAB_8c_a7}{
\index{gDAB.c@{g\-DAB.c}!setCellHeaderParity@{setCellHeaderParity}}
\index{setCellHeaderParity@{setCellHeaderParity}!gDAB.c@{g\-DAB.c}}
\subsubsection[setCellHeaderParity]{\setlength{\rightskip}{0pt plus 5cm}int set\-Cell\-Header\-Parity (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em p})}}
\label{gDAB_8c_a7}


{\em p\/} determines if the LATp Cell\-Header Parity is inverted 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em p}]boolean value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]STATUS\end{Desc}
If {\em p\/} is non-zero then all out going LATp packets will have their cell header parity inverted. This is used for testing parity errors. The default value is 0. \hypertarget{gDAB_8c_a15}{
\index{gDAB.c@{g\-DAB.c}!setCmdPayloadParityDAB@{setCmdPayloadParityDAB}}
\index{setCmdPayloadParityDAB@{setCmdPayloadParityDAB}!gDAB.c@{g\-DAB.c}}
\subsubsection[setCmdPayloadParityDAB]{\setlength{\rightskip}{0pt plus 5cm}int set\-Cmd\-Payload\-Parity\-DAB (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em p})}}
\label{gDAB_8c_a15}


{\em p\/} determines if the DAB command payload parity is inverted 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em p}]boolean value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK\end{Desc}
if {\em p\/} is non-zero then all out going DAB commands will have their command payload parity inverted. This is used for testing parity errors. The default value is 0. \hypertarget{gDAB_8c_a11}{
\index{gDAB.c@{g\-DAB.c}!setCmdStrParityDAB@{setCmdStrParityDAB}}
\index{setCmdStrParityDAB@{setCmdStrParityDAB}!gDAB.c@{g\-DAB.c}}
\subsubsection[setCmdStrParityDAB]{\setlength{\rightskip}{0pt plus 5cm}int set\-Cmd\-Str\-Parity\-DAB (\hyperlink{struct__gdab}{gdab\-Handle} {\em gdab}, unsigned short {\em p})}}
\label{gDAB_8c_a11}


{\em p\/} determines if the DAB command string parity is inverted 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gdab}]gdab\-Handle for DAB \item[{\em p}]boolean value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]G\_\-OK\end{Desc}
if {\em p\/} is non-zero then all out going DAB commands will have their command string parity inverted. This is used for testing parity errors. The default value is 0. 