\hypertarget{QPIG_8c}{
\section{QPIG.c File Reference}
\label{QPIG_8c}\index{QPIG.c@{QPIG.c}}
}
Manages the handling of PIG register state datagrams. 

{\tt \#include \char`\"{}QPIG\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}QPIG/QPIG.h\char`\"{}}\par
{\tt \#include \char`\"{}QPIG/state.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-ids.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-scan.h\char`\"{}}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par


Include dependency graph for QPIG.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=207pt]{QPIG_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{struct__QPIG}{QPIG} $\ast$ \hyperlink{QPIG_8c_a0}{QPIG\_\-alloc} (void)
\begin{CompactList}\small\item\em Allocate and construct the QPIG context block. \item\end{CompactList}\item 
size\_\-t \hyperlink{QPIG_8c_a1}{QPIG\_\-sizeof} (void $\ast$prm)
\begin{CompactList}\small\item\em Return the size, in bytes, of the QPIG context block. \item\end{CompactList}\item 
\hyperlink{struct__QPIG}{QPIG} $\ast$ \hyperlink{QPIG_8c_a2}{QPIG\_\-construct} (\hyperlink{struct__QPIG}{QPIG} $\ast$qpig, void $\ast$prm)
\begin{CompactList}\small\item\em Construct (initialize) the QPIG context block. \item\end{CompactList}\item 
void \hyperlink{QPIG_8c_a3}{QPIG\_\-destruct} (\hyperlink{struct__QPIG}{QPIG} $\ast$qpig)
\begin{CompactList}\small\item\em Destroy the QPIG context block. \item\end{CompactList}\item 
void \hyperlink{QPIG_8c_a4}{QPIG\_\-update\-At\-Datagram} (\hyperlink{struct__QPIG}{QPIG} $\ast$qpig, const LSF\_\-datagram $\ast$dgm)
\begin{CompactList}\small\item\em Update the register state information in the QPIG context. \item\end{CompactList}\item 
const \hyperlink{struct__QPIG__state}{QPIG\_\-state} $\ast$ \hyperlink{QPIG_8c_a5}{QPIG\_\-state\-Get} (const \hyperlink{struct__QPIG}{QPIG} $\ast$qpig)
\begin{CompactList}\small\item\em Return the address of the QPIG register state data. \item\end{CompactList}\item 
int \hyperlink{QPIG_8c_a6}{QPIG\_\-version\-Get} (const \hyperlink{struct__QPIG}{QPIG} $\ast$qpig)
\begin{CompactList}\small\item\em Return the version of the QPIG register state data. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Manages the handling of PIG register state datagrams. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\hyperlink{QPIG_8c}{QPIG.c},v 1.4 2009/02/20 22:58:31 saxton Exp \end{Desc}


\subsection{Function Documentation}
\hypertarget{QPIG_8c_a0}{
\index{QPIG.c@{QPIG.c}!QPIG_alloc@{QPIG\_\-alloc}}
\index{QPIG_alloc@{QPIG\_\-alloc}!QPIG.c@{QPIG.c}}
\subsubsection[QPIG\_\-alloc]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__QPIG}{QPIG}$\ast$ QPIG\_\-alloc (void)}}
\label{QPIG_8c_a0}


Allocate and construct the QPIG context block. 

\begin{Desc}
\item[Returns:]A pointer to the new QPIG context block (context handle)\end{Desc}
\hypertarget{QPIG_8c_a2}{
\index{QPIG.c@{QPIG.c}!QPIG_construct@{QPIG\_\-construct}}
\index{QPIG_construct@{QPIG\_\-construct}!QPIG.c@{QPIG.c}}
\subsubsection[QPIG\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__QPIG}{QPIG}$\ast$ QPIG\_\-construct (\hyperlink{struct__QPIG}{QPIG} $\ast$ {\em qpig}, void $\ast$ {\em prm})}}
\label{QPIG_8c_a2}


Construct (initialize) the QPIG context block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qpig}]The block to initialize; if specified as NULL, one will be allocated.\item[{\em prm}]A run-time set parameter used to stylize the configuration (not used)\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The QPIG context handle\end{Desc}
\hypertarget{QPIG_8c_a3}{
\index{QPIG.c@{QPIG.c}!QPIG_destruct@{QPIG\_\-destruct}}
\index{QPIG_destruct@{QPIG\_\-destruct}!QPIG.c@{QPIG.c}}
\subsubsection[QPIG\_\-destruct]{\setlength{\rightskip}{0pt plus 5cm}void QPIG\_\-destruct (\hyperlink{struct__QPIG}{QPIG} $\ast$ {\em qpig})}}
\label{QPIG_8c_a3}


Destroy the QPIG context block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qpig}]The QPIG context handle.\end{description}
\end{Desc}
\hypertarget{QPIG_8c_a1}{
\index{QPIG.c@{QPIG.c}!QPIG_sizeof@{QPIG\_\-sizeof}}
\index{QPIG_sizeof@{QPIG\_\-sizeof}!QPIG.c@{QPIG.c}}
\subsubsection[QPIG\_\-sizeof]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t QPIG\_\-sizeof (void $\ast$ {\em prm})}}
\label{QPIG_8c_a1}


Return the size, in bytes, of the QPIG context block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prm}]A run-time set parameter used to stylize the configuration\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The size, in bytes, of the context block\end{Desc}
\hypertarget{QPIG_8c_a5}{
\index{QPIG.c@{QPIG.c}!QPIG_stateGet@{QPIG\_\-stateGet}}
\index{QPIG_stateGet@{QPIG\_\-stateGet}!QPIG.c@{QPIG.c}}
\subsubsection[QPIG\_\-stateGet]{\setlength{\rightskip}{0pt plus 5cm}const \hyperlink{struct__QPIG__state}{QPIG\_\-state}$\ast$ QPIG\_\-state\-Get (const \hyperlink{struct__QPIG}{QPIG} $\ast$ {\em qpig})}}
\label{QPIG_8c_a5}


Return the address of the QPIG register state data. 

This routine is just an accessor to keep the structure of QPIG private.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qpig}]The QPIG context handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A pointer to the QPIG register state data\end{Desc}
\hypertarget{QPIG_8c_a4}{
\index{QPIG.c@{QPIG.c}!QPIG_updateAtDatagram@{QPIG\_\-updateAtDatagram}}
\index{QPIG_updateAtDatagram@{QPIG\_\-updateAtDatagram}!QPIG.c@{QPIG.c}}
\subsubsection[QPIG\_\-updateAtDatagram]{\setlength{\rightskip}{0pt plus 5cm}void QPIG\_\-update\-At\-Datagram (\hyperlink{struct__QPIG}{QPIG} $\ast$ {\em qpig}, const LSF\_\-datagram $\ast$ {\em dgm})}}
\label{QPIG_8c_a4}


Update the register state information in the QPIG context. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qpig}]The QPIG context handle\item[{\em dgm}]The PIG register state datagram\end{description}
\end{Desc}
\hypertarget{QPIG_8c_a6}{
\index{QPIG.c@{QPIG.c}!QPIG_versionGet@{QPIG\_\-versionGet}}
\index{QPIG_versionGet@{QPIG\_\-versionGet}!QPIG.c@{QPIG.c}}
\subsubsection[QPIG\_\-versionGet]{\setlength{\rightskip}{0pt plus 5cm}int QPIG\_\-version\-Get (const \hyperlink{struct__QPIG}{QPIG} $\ast$ {\em qpig})}}
\label{QPIG_8c_a6}


Return the version of the QPIG register state data. 

This routine is just an accessor to keep the structure of QPIG private.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qpig}]The QPIG context handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The version of the QPIG register state data\end{Desc}
